Question: Question 2 : ( 3 0 pts ) Problem: Age groups Write a java program that analyzes a sequence of ages and categorizes them into

Question 2: (30 pts)
Problem: Age groups
Write a java program that analyzes a sequence of ages and categorizes them into different age groups. The program should classify each age into one of the following groups:
Child: Age 0 to 12
Teenager: Age 13 to 19
Adult: Age 20 to 59
Senior: Age 60 and above
Additionally, the program should display the number of people in each group, calulate the average age of all people in the list and identify the youngest and oldest person in the list.
The user will first enter the number of people (let's call it n)n1, followed by n ages that must be valid positive integers.
Question 2 : ( 3 0 pts ) Problem: Age groups

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!