Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Bartleby Related Questions Icon
Related questions
Question
please solve it
Transcribed Image Text:Write a Java program to generate a user's daily average number of walking steps for a given month of the year. To
do so, write the appropriate code for each of the following steps:
a) First the program should prompt the user to enter the month's number (from 1 to 12) as an integer type.
Assume all input is valid.
b) Use switch case to determine the number of days in the given month (Suppose that month 2 has 28 days,
months 1,3,5,7,8, 10,12 have 31 days and the other months have 30 days).
c) Use a counter-based loop (for-loop or while-loop) to ask the user to enter the number of steps walked in each
of the days of the entered month.
d) Calculate and display the daily average number of walked steps as follows:
Total steps walked in a given month
Daily Average of walked steps
Number of days of a given month
SAMPLE INPUT/OUTPUT
Input the month: 2
Input the num. of steps for each of the 28 days of month 2:
227 1232 119 12002 1222 ... ...
222
Daily Average of Walked Steps = 4732.28322
Note: Your answer should follow the given sample input / output.
Expert Solution
Check MarkThis question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
bartleby
This is a popular solution
bartleby
Trending nowThis is a popular solution!
bartleby
Step by stepSolved in 6 steps with 4 images
Knowledge Booster
Background pattern image
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Question 4: Use a proof by contradiction to prove that the sum of an irrational number x and a rational number y is irrational.arrow_forwardNumerous engineering and scientific applications require finding solutions to a set of equations. Ex: 8x + 7y = 38 and 3x - 5y = -1 have a solution x = 3, y = 2. Given integer coefficients of two linear equations with variables x and y, use brute force to find an integer solution for x and y in the range -10 to 10. program language is carrow_forwardPlease show the steps on how to accomplish this task 2. For equation X^2=X among infinite from left numbers there are 3 known solution: 0= ...00000, 1= ...00001 and 5^2^infinity = ...12890625. Give last 8 digits of one more solution whose last digit is 6: ...??????????6arrow_forward
- please solve it ASAP!!! show ALL the steps please THANK YOUarrow_forwardMETHODS OF PROOF PROVE THE FOLLOWING: 1. By contradiction, prove that "for all real numbers x, if x is irrational, then -x is irrational. *Please provide a clear proof. THANK YOU.arrow_forwardExists a computer algorithm for every conceivable problem?Explain.arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Text book imageDatabase System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationText book imageStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONText book imageDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- Text book imageC How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONText book imageDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningText book imageProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education