Question: Question 2 : ( 3 0 pts ) Problem: Age groups Write a java program that analyzes a sequence of ages and categorizes them into
Question : 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 to
Teenager: Age to
Adult: Age to
Senior: Age 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 lets call it followed by ages that must be valid positive integers.
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
