Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this first problem, will you start implementing a program that will keep track of the user's active time (in minutes) for a specified month.

image text in transcribed
image text in transcribed
In this first problem, will you start implementing a program that will keep track of the user's active time (in minutes) for a specified month. The program will also calculate the total amount of active minutes on that particular month. Your program will first read a number from 1 to 12 (included). This number will represent which month the user will input his active minutes. Based on that, you should define how many days exist on the month. Assume that February always has 28 days. After, you will start reading the day and the active minutes of that day. You will keep reading day and minutes until you read O as an input for the day value. There can be multiple entries for the same day. Once you read zero for the day number, you should stop and not read the minutes. Please be aware that the user might mistakenly input a day value that is not within the range of numbers in a month (e.g., day 31 in April or -10). If that occurs, you should discard the minutes (you still need to read the user's minutes). Once you are done reading the information, your program will print the total amount of active minutes on the month and the average active minutes. Remember that each day has 24 hours, and each hour has 60 minutes. You must limit your average value to 2 decimal points. If you are writing your assignment in Java, you can use the System.out.printf method. Input for Java AND Python: Inputs are separated by Enter, that is one number per line. Input One int representing the number of the month (1-12) One int representing the day One int representing the active minutes Output The total and average active minutes for that month . On month #7, you were active 1310 minutes or 0.03% of the time. 32 10000000 4 100 9 90 15 10 15 I 60 30 90 13 60 20 300 23 600

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_2

Step: 3

blur-text-image_3

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

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions

Question

How can you defend against SQL injection attacks?

Answered: 1 week ago

Question

8. Design office space to facilitate interaction between employees.

Answered: 1 week ago