subject

The point of this exercise is to (1) use some of the arithmetic
operators, and (2) start thinking about compound entities (like time of day)
that are represented with multiple values.
1. Create a new program called Time. java. From now on, we won’t remind
you to start with a small, working program, but you should.
2. Following the example program in Section 2.4, create variables named
hour, minute, and second. Assign values that are roughly the current
time. Use a 24-hour clock so that at 2pm the value of hour is 14.
3. Make the program calculate and display the number of seconds since
midnight.
4. Calculate and display the number of seconds remaining in the day.
5. Calculate and display the percentage of the day that has passed. You
might run into problems when computing percentages with integers, so
consider using floating-point.
6. Change the values of hour, minute, and second to reflect the current
time. Then write code to compute the elapsed time since you started
working on this exercise.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 20:00
An excel which cell contains =b2 is copied to row below, the same column. what will be the new cell's content
Answers: 2
question
Computers and Technology, 22.06.2019 15:00
This is not a factor that you should use to determine the content of your presentation. your audience your goals your purpose your technology
Answers: 1
question
Computers and Technology, 22.06.2019 17:30
The forerunner to cell phones, pdas, and smartphones was
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
List the five on-board vehicle subsystems
Answers: 1
You know the right answer?
The point of this exercise is to (1) use some of the arithmetic
operators, and (2) start think...
Questions
question
Mathematics, 13.10.2020 01:01
question
Mathematics, 13.10.2020 01:01
question
Mathematics, 13.10.2020 01:01
Questions on the website: 13722367