Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SO 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,

image text in transcribed
SO 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 month Daily Average of walked steps Number of days a given month SAMPLE INPUT/OUTPUT Enter the month number: Emer the number of steps for each of the days of month 227 1202 119 12002 1222 222 The daily werage stope is 472.28322 Note: Your answer should follow the given sample input/output

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

Databases A Beginners Guide

Authors: Andy Oppel

1st Edition

007160846X, 978-0071608466

More Books

Students also viewed these Databases questions

Question

2 What are the steps that can aid effective communication?

Answered: 1 week ago

Question

Which are non projected Teaching aids in advance learning system?

Answered: 1 week ago

Question

5. A review of the key behaviors is included.

Answered: 1 week ago