Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need to a program in java that will find the average age of a group of students. The first question the program should ask
I need to a program in java that will find the average age of a group of students. The first question the program should ask the user is how many students are there in the class? The user should then be prompted to enter the ages one at a time, and the program should display the average age at the end. But, if the age is entered less than 0 by mistake, the program should show an error message and let the user enter this age again. The program should be able to detect a situation that the user entered is not a number.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered 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