Write the daychange control break function

Assignment Help Basic Computer Science
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.

188_815f1df0-9bbd-4fc9-a59c-0747690ceac3.png

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.

Reference no: EM131397435

Questions Cloud

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.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd