Question
Create a program that asks a user for their ageand nameand displays their age(as a whole number)in a variety of animal years.Provide them a menu
Create a program that asks a user for their ageand nameand displays their age(as a whole number)in a variety of animal years.Provide them a menu of 4 animal options to select from. One human year is equal to:
5.33 Chicken years
4.2Duck years
8.89 Kangaroo years
2.29 LionyearsSpecific requirements:
Createa Javadoc comment above your class. Include a description, your name, and date.
Use constantsto hold the conversion ratefor each animal year
.Use the Scanner class for this lab, not dialog boxes
.Ask for the users age first, and then their name
.Run your program 5 times(one for each animal and one where they dont provide a valid option)and paste the individual runs into one set of output. (See example outputbelow. You dont have touse the same names/ages as I do in myoutput.)
Hint: having trouble getting your math equations to compile? Maybe pages 66-67 will help.Grading
Rubric:1. Correctness (meets specification) 4points
2. Design (well-constructed solution) 1
3. Validation & Verification (Testing) 2Total 7points
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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