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
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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Heres a Java program that includes the StudentCreator class and a main method to create student obje...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started