Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CPS 180 Lab Assignment #7 Day Schedule Assignment Due: 6/12/17 Assigned: 6/5/17 Points: 40 Create a program that generates a simple day schedule with 3

image text in transcribed
image text in transcribed
image text in transcribed
CPS 180 Lab Assignment #7 Day Schedule Assignment Due: 6/12/17 Assigned: 6/5/17 Points: 40 Create a program that generates a simple day schedule with 3 activities, based upon the following inputs: 1. Activity Name (Keep it to a short word if you are using tabs, or in the length range using a .formato or print statement) 2. Activity Starting Hour (in military time, which is a 24 hr clock, acceptable numbers 1-24-do data validation) 3. Activity Ending Hour (in military time also)-perform a validity check to be sure that this number is greater than or equal to Starting Hour 4. Hints: Activities do not have to be entered in chronological order, but there should be no overlapping. Start/End numbers are inclusive. Utilize a nested loop, the outer loop goes from 1.24 for the hour of day. For each iteration of the outer loop, have an inner foro loop that goes from col-1 to col 3 Use a switch statement to test for the case of 1,2, and 3 to represent each of 3 cols/activities. Then, under the case, use an if statement to test if the hour falls between the start/end time for this activity. Then perform the output of the activity into the appropriate column (tabs work here, or you can use the printfoor.format0 method, which is preferred. If using tabs, you can tab out when processing activity 1 two tabs, activity 2-three tabs, and activity 3-four tabs, for example. Perform data validation to prevent bad input. This program requires at least 3 variables for each of the 3 activities you are logging, and 21oop counter variables. Arrays are not necessary, but if you want to use them you may. Sample 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

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions

Question

What is monetary policy?

Answered: 1 week ago

Question

4. How does eff ective listening diff er across listening goals?

Answered: 1 week ago

Question

Explain the sources of recruitment.

Answered: 1 week ago

Question

Differentiate sin(5x+2)

Answered: 1 week ago

Question

Compute the derivative f(x)=1/ax+bx

Answered: 1 week ago

Question

What is job enlargement ?

Answered: 1 week ago

Question

=+professionalism and competency in handling global HR issues?

Answered: 1 week ago

Question

=+3 In what ways can an MNE improve or change its approach to IHRM?

Answered: 1 week ago