Question: Write a Java program that prompts for and reads a number of seconds, and then counts down from that number to zero, displaying the update

Write a Java program that prompts for and reads a number of seconds, and then counts down from that number to zero, displaying the update count each second. There are three required functions, main(), doCountDown), and waitASec(). Optionally, a fourth function will perform user interaction receives n, the number of seconds to count down. docountoounc) cslls waitseco) n times, each call followed by the output els n ea of the new countdown value. Function waitASec) spins for one second. waitASec) is void main() prompts for an integer, the number to count down from. It then passes this number to doCountDown() which handles the rest. How does main() prompt for and read an input? One way is with the following simple function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
