Question
First, launch NetBeans and close any previous projects that may be open (at the top menu go to File ==> Close All Projects). Then create
First, launch NetBeans and close any previous projects that may be open (at the top menu go to File ==> Close All Projects).
Then create a new Java application called "Averager" (without the quotation marks) to get positive (i.e., any number greater than 0), double numbers from the user at the command line until they enter -1 (the sentinel). Use a do-while loop. Compute the average of the series of numbers and print the average to the command line. Don't include the sentinel in calculation of the average. Include suitable data validations for invalid data (e.g. the user enters a letter instead of a number), but stay in the loop until the sentinel is entered.
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