Question: Write a Java program that will allow the user to enter his / her year of birth. The program then calculates the age, determines the
Write a Java program that will allow the user to enter hisher year of
birth. The program then calculates the age, determines the life stage
according to the following image, and then displays them in a message
see sample run below:
Stages of Life
Here is a sample run of how your program should behave the
underlined refers to data entered by the user:
Please enter your year of birth:
You are years old.
You are an adult!
Hint: use a multiway ifelse statement to determine the life stage.
Tip: to make sure your program works all the time, test it for each life
stage according to the following table:
Warning: Do NOT design your program to only work for the year of
births in the previous table. That is make sure your program works for
ANY year of birth entered by the user.
In addition to your source code, provide SIX screen shots of testing your
program using the data in the previous table.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
