Create a complete Java program that shall allow the user to accept three integer values representing the START, END, and STEP respectively. The START should always be lesser than the END value, and the STEP is always greater than zero. The program shall print vertically the values starting from the START to the last value which can be equal to or lesser than the END incremented by the STEP value, and finally the SUM of all the output values.
Example:
INPUT SCREEN:
Input START value = __ (assuming 1 is entered by the user)
Input END value = __ (assuming 10 is entered by the user)
Input STEP value = __ (assuming 2 is entered by the user)
OUTPUT SCREEN:
1
3
5
7
9
SUM = 25
Do you want to try again (Y/N) ? __ (assuming Y is entered by the user. The program should repeat again.)
Requirements:
1. Your program should automatically detect any errors in the initial input.
2. Your program should have an additional feature that asks the user whether the user wants TO TRY AGAIN. The Program will not terminate until the user inputs any character other than ‘Y’ or ‘y’.
3. Implement the program using any looping constructs discussed previously.
4. Copy and paste your complete source code here then submit it.
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 3 images
- Write a console in c#arrow_forwardQuestio Write a program that receives a series of characters from the user, the program stops if the user enters the same character two consecutive times, the program should display the number of entered characters at the end of the program (the last duplicated character is counted only once): Sample Run: Enter your characters: asbnmkrr we got 7 characters please wirte it in java using loops please answer it in java using netbeans.arrow_forwardc languagearrow_forward
- Develop a body mass index (BMI) calculator program that reads body weight and height as inputs and calculate the BMI based on the following formula: BMI - Weight/Height Using the caleulated BMI, determine the individual weight category based on the following Table I and the program will count how many user's BMI get a particular category: Table 1 BMI Category > 30 25- 30 18.5-24.9 You are obese Your weight is overweight You have an ideal weight You are too thin S18.5 Use if..else statements or switch statements and loop where it is appropriate and create a program with the following output Sample program's output is as below, the rumbers in bold/underline are user's input: ******..* PROGRAM TO CALCULATE BMI CATEGORY*****.. Please enter your weight (kg) : Please enter your height (m) Your BMI is 19.38, Xour have an ideal weight 56 1.7 Would you like to calculate arother BMI? y- yes, n noy Please enter your weight (kg) : Please enter your height (m) Your BMI is 30.47. 78 1.6 You are…arrow_forwardIn java Write a program that computes the average of 5 students grades which are entered by the user.arrow_forward3. A company XYZ hires its employees only when the age of the employees is greater or equal to 18 years. Write a JAVA program in which the user can enter his/her age the program prints whether the user is eligible to be an employee of the company or not.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education