In this lab, you will use what you have learned about accumulating totals in a single-level control break program to complete a C++ program. The program should produce a report for a supermarket manager to help her keep track of the hours worked by her part-time employees. The report should include the day of the week and the total hours worked by all employees each day. The student file provided for this lab includes the necessary variable declarations and input and output statements. You need to implement the code that recognizes when a control break should occur. You also need to complete the control break code. Be sure to accumulate the daily totals for all days in the week. Comments in the code tell you where to write your code. Instructions Study the prewritten code to understand what has already been done. Write the control break code, including the code for the dayChange() function, in the main() function. Execute the program by clicking the Run button at the bottom of the screen. Use the following input values: Monday—6 hours (employee 1) Tuesday—2 hours (employee 1), 3 hours (employee 2) Wednesday—5 hours (employee 1), 3 hours (employee 2) Thursday—6 hours (employee 1) Friday—3 hours (employee 1), 5 hours (employee 2) Saturday—7 hours (employee 1), 7 hours (employee 2), 7 hours (employee 3) Sunday—0 hours An example program execution is shown below: WEEKLY HOURS WORKED Enter day of week or done to quit: Monday Enter hours worked: 2 Monday 2 Enter a day of week or done to quit: Monday Enter hours worked: 4 Monday 4 Enter a day of week or done to quit: Tuesday Enter hours worked: 8 Day Total (Monday) 6 Tuesday 8 Enter a day of week or done to quit: done Day Total (Tuesday) 8

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

In this lab, you will use what you have learned about accumulating totals in a single-level control break program to complete a C++ program. The program should produce a report for a supermarket manager to help her keep track of the hours worked by her part-time employees. The report should include the day of the week and the total hours worked by all employees each day.

The student file provided for this lab includes the necessary variable declarations and input and output statements. You need to implement the code that recognizes when a control break should occur. You also need to complete the control break code. Be sure to accumulate the daily totals for all days in the week. Comments in the code tell you where to write your code.

Instructions

  1. Study the prewritten code to understand what has already been done.
  2. Write the control break code, including the code for the dayChange() function, in the main() function.
  3. Execute the program by clicking the Run button at the bottom of the screen. Use the following input values:

    Monday—6 hours (employee 1)

    Tuesday—2 hours (employee 1), 3 hours (employee 2)

    Wednesday—5 hours (employee 1), 3 hours (employee 2)

    Thursday—6 hours (employee 1)

    Friday—3 hours (employee 1), 5 hours (employee 2)

    Saturday—7 hours (employee 1), 7 hours (employee 2), 7 hours (employee 3)

    Sunday—0 hours

An example program execution is shown below:

WEEKLY HOURS WORKED Enter day of week or done to quit: Monday Enter hours worked: 2 Monday 2 Enter a day of week or done to quit: Monday Enter hours worked: 4 Monday 4 Enter a day of week or done to quit: Tuesday Enter hours worked: 8 Day Total (Monday) 6 Tuesday 8 Enter a day of week or done to quit: done Day Total (Tuesday) 8

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 7 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY