Reference no: EM131397435
ACCUMULATING TOTALS IN SINGLE-LEVEL CONTROL BREAK PROGRAMS In this lab, you 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 fast food restaurant owner to help her keep track of hours worked by her part-time employees. The report should include the day of the week and the number of hours worked for each employee for each day of the week, the total hours for the day of the week, and at the end of the week, the total hours worked that week. The report should look similar to the one shown in Figure 8-4.

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 function. Be sure to accumulate the daily totals and the grand total for all days in the week. Comments in the code tell you where to write your code. You can use the Bookstore program in this chapter as a guide for this new program.
1. Open the source code file named HoursWorked.cpp using Notepad or the text editor of your choice.
2. Study the prewritten code to understand what has already been done.
3. Write the control break code in the main function.
4. Write the dayChange control break function.
5. Save this source code file in a directory of your choice and then make that directory your working directory.
6. Compile the source code file HoursWorked.cpp.
7. Execute the program.
Execute this program using the following input values: Monday - 3 hours (employee 1) Tuesday - 4 hours (employee 1) Wednesday - 5 hours (employee 1) Thursday - 5 hours (employee 1) Friday - 3 hours (employee 1), 4 hours (employee 2) Saturday - 7 hours (employee 1), 8 hours (employee 2) Sunday - 0 hours The program results should include: A total of 3 hours worked on Monday. A total of 4 hours worked on Tuesday. A total of 5 hours worked on Wednesday. A total of 5 hours worked on Thursday. A total of 7 hours worked on Friday. A total of 15 hours worked on Saturday. A total of 0 hours worked on Sunday. A grand total of 39 hours worked for the week.
What is the control break variable
: In a control break program, it doesn't matter if the records in the input file are in a specified order. True or false?
|
Why did you choose the given photographer
: Why did you choose this photographer? Explain any personal associations, feelings, or experiences that relate to the selected image.
|
What does job analysis have to do with internal alignment
: Define “internal equity” and explain the reason for its existence and its impact on the organization. What does job analysis have to do with internal alignment? What is the critical advantage of quantitative approaches over conventional approaches to..
|
Balance at the end of month 10
: You plan to save $100 per month at the end of each month. Assume the saving account pays 6% annual interest rate compounded monthly. a) What will be your balance at the end of month 10?
|
Write the daychange control break function
: Save this source code file in a directory of your choice and then make that directory your working directory.
|
Simply and build toward greater complexity
: When visual aids fail, it is usually because they are not well-suited to the subject matter. Explanations should begin simply and build toward greater complexity.
|
Equation of the line passing through the points
: Find the equation of the line passing through the points left parenthesis negative two thirds comma 1 right parenthesis-23,1 and left parenthesis negative 4 comma one half right parenthesis-4,12. Write the equation in point-slope form, slope-interc..
|
Critical issues in business management
: Identify and analyse the main causes of the economic crisis 2007-2008, Critically evaluate the effectiveness of tools used for forecasting events and predicting crises in the business environment
|
Blood increases the risk of heart disease
: Too much cholesterol in the blood increases the risk of heart disease. The cholesterol levels of young women aged 20 to 34 vary approximately Normally with mean 185 milligrams per deciliter (mg/dl) and standard deviation 39 mg/dl.
|