Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2:37 PM Mon Feb 10 @ 100% Not Secure mars.umhb.edu In this project, you will write a Java program that rounds hours to days. A

image text in transcribed
2:37 PM Mon Feb 10 @ 100% Not Secure mars.umhb.edu In this project, you will write a Java program that rounds hours to days. A long-term parking garage charges parking fees based on the number of days of parking. The parking time is rounded up to the next hour, and the parking hours are rounded up to the next whole day. For example, 10 hours are counted as 1 day, 25 hours are rounded up to 2 days, and 50 hours go up to 3 days, as illustrated in the following chart: Days Hours 1 - 24 hours 25 - 48 hours 49 - 72 hours 1 day 2 days 3 days The program gets parking hours from the keyboard, rounds the hours up to days, and displays the number of days on the screen. The screenshot of the program execution looks like the following. User inputs are put into italics. Parking time in a Parking time in Days: 1 Parking time in Hours: 23 Parking time in Days: 2 1. The program processes integer values. The program reads just one integer number, as the parking time in hours, from the keyboard. The program displays the number of days, which is also an integer value, on the screen. (5 points) 2. The program coverts the parking hours to days correctly. (15 points) Hint: Fill in the following table about the integer division and remainder operations on hours. Then check the relationship among integer quotient, remainder, and days. Days Hours Hours / 24 Hours % 24 1 - 23 24 25 - 47 482 49- 713 72 1 1 2 Submission Guidelines

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Foundations Technology Fundamentals For IT Success

Authors: Bob Bryla

1st Edition

0782143725, 9780782143720

More Books

Students also viewed these Databases questions

Question

1. Organize and support your main points

Answered: 1 week ago

Question

3. Move smoothly from point to point

Answered: 1 week ago

Question

5. Develop a strong introduction, a crucial part of all speeches

Answered: 1 week ago