Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Write a program that asks the user to enter a person's age. The program should then display a message indicating whether the person is
1. Write a program that asks the user to enter a person's age. The program should then display a message indicating whether the person is an infant, a child, a teenager, or an adult. Following are the guidelines: (9) If the person is 1 year old or less, he or she is an infant. If the person is older than 1 year, but younger than 13 years, he or she is a child. If the person is at least 13 years old, but less than 20 years old, he or she is a teenager. If the person is at least 20 years old, he or she is an adult. Sample outputs: TEMP>java Example Enter your age: 5 You are considered a Child TEMP>java Example Enter your age: 15 You are considered a Teenager 2. Write a program that asks the user for a number in the range of 1 through 7. The program should then display the corresponding day of the week, where 1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = Friday, 6 = Saturday, and 7 = Sunday. For any other input, "Invalid Input" should be displayed. (9) Sample outputs: Quizzes\TEMP>java WeekDay \Quizzes\TEMP>java WeekDay Enter a number >= 1 and = 1 and
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