Eclipse

 

Using the data provided in the attachment, create a program that will display a child’s predicted adult height.

This program will need to create an array of objects to search.

This program needs to validate the input for valid range and input values. If invalid data is given, the program needs to indicate that data is invalid and suggest appropriate values/ranges.  However, you do not need to validate alphabetic data given for numeric input. 1. The program will need to prompt the user for a child’s gender, age, and height in inches.  2. The program will take this data and compute and display the expected adult height.  The data is to be obtained via an array of objects. 3. The program will need to prompt to try again.

Ten extra credit points will be awarded to additionally display the expected height in feet and inches. All other requirements must be met to qualify.

The general tasks are as follows:

Create 2 fixed arrays for the data. One array for girl’s data. One array for boy’s data. You will need to type in the values given into your program’s code..

You can ignore ages 1/4, 1/2, 3/4, 1 1/2 and 2 1/2.  Thus the age should correspond to the index of the array.  I.E – Birth is index 0, Age 1 is index 1, Age 2 is index 2, etc. The contents of the arrays needs to be the growth percentage for that age as in the attachment.

Create a class that would indicate age, gender, and growth percentage. Use appropriate data types.   If you wish, the class can be based on age and include both boy and girl percentages.

Using data from the arrays, create objects for this data and store the objects into a new array. The array of objects is to be used to obtaining data for computations.