Write a console program (java) that: Uses a while loop to perform the following steps:1. Prompt the user to input two integers: firstNum and secondNum wheresecondNum is at least 10 greater than firstNum, both numbers are positiveintegers, and secondNum is less than 1000.2. Verify that the user entered acceptable numbers, and if not, provide errorfeedback and prompt them again.3. Output all results to a file in the same directory as the program, placing anappropriate label between each section of output. Note that your programmust be able to run repeatedly overwriting the file from the previous run.4. Output all odd numbers between firstNum and secondNum inclusive, onenumber per line.5. Output the sum of all numbers between firstNum and secondNumexclusive. Uses a for loop to perform the following steps:1. Continue writing to the same file as before.2. Write a label as before.3. Output all numbers from secondNum to firstNum in a single line withcommas separating the numbers. Write the date and time as the last line in the file in the format yyyy-mm-dd hh:mm:ss.Notes:1. Inclusive means that the firstNum and secondNum are output ifappropriate.2. Exclusive means that the firstNum and secondNum are not output.3. The instructor will attempt to crash your program by entering numbersyou dont expect if you program throws an exception you will bemarked down!4. While this looks like a daunting task, it is actually very simple just thinkit through!
Programming
[Solved] SOLVED:Write a console program (java) that:
$25
File Name: SOLVED:Write_a_console_program_(java)_that:.zip
File Size: 405.06 KB
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.