WAP program StudentCreater class with a main method that creates at least two student objects with different
Question:
WAP program StudentCreater class with a main method that creates at least two student objects with different values and call getLoginName() to display login name for each student.
Q2 One way to estimate the adult height of a child is to use the following formula, which uses the height of the parents: Hmale_child = ((Hmother 13/12) + Hfather)/2 Hfemale_child = ((Hfather 12/13) + Hmother)/2 All heights are in inches. Your task is to write a program with a main method that takes as input the gender of the child, the height of the mother in inches, and the height of the father in inches, and outputs the estimated adult height of the child in inches. The program should allow the user to enter a new set of values and output the predicted height until the user decides to exit. Below shows a sample output of the program: Enter the gender of your future child. Use 1 for female, 0 for male. 1 Enter the height in inches of the mom. 60 Enter the height in inches of the dad. 70 Your future child is estimated to grow to 62 inches. Enter 'Y' to run again, anything else to exit. Y Enter the gender of your future child. Use 1 for female, 0 for male. 0 Enter the height in inches of the mom. 65
Enter the height in inches of the dad. 75 Your future child is estimated to grow to 72 inches. Enter 'Y' to run again, anything else to exit. N Program ends.
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch