but basically when user enter female and adds value it should tell you the height value in float
or if user enter male tell height value in float based on gender.
The objective of my program is : For our next programming assignment we will write
an application that uses a relatively simply
predictive approach that is actually quite good:
1.Find the average of the parents’ height by
adding together the mother’s and father’s height
(either in inches or centimeters) and dividing by 2.
2.To calculate the height of a boy, add 2.5 inches
(6.5 centimeters) to the average of the parents’
height. To calculate the height of a girl,
subtract 2.5 inches (6.5 centimeters) to the
average of the parents’ height.
3.The resulting number is the “mid-parental height”
for girls or boys. The child’s adult height can be
expected to fall within a range of 4 inches
(10 centimeters) less or more than the
mid-parental height.
The requirements are:
•Write an application that will allow a user to
input (use dialog boxes) the parent's heights and
then outputs the predicted height as a range
•Implement a person class that has:
•attributes for gender and height,
•a constructor with two parameters (gender and height),
•a constructor with one parameter (gender),
•a constructor with one parameter (height),
•a default constructor,
•methods to get and set the attributes, and
•a method that accepts two parameters (Person objects)
and returns the estimated height as a float
I remember if it is a female child you subtract the age. if it is a boy child it is added.
------------------------------------------------------------------------------------------------------------------------------
i found this link that explains it:
https://coderanch.com/t/569079/java/java/loops