Question
The Passaic County Contracting Company, PCCC, negotiates building projects/job contracts. For each contract, the company have to subcontract an electrician to do the electrical, a
The Passaic County Contracting Company, PCCC, negotiates building projects/job contracts. For each contract, the company have to subcontract an electrician to do the electrical, a plumber to do the pluming, a roofer to do the roofing, and a landscaper to do the landscaping. All other work is done internally by their employees. For each project they assign a minimum of 5 employees who are paid salary that varies from employee to employee. The company orders and pays for material which consists of wood, concrete, windows, doors, sheetrock and spackle.
As the programmer for PCCC, they assigned you the task of writing a C++ program to accept the number of the projects/jobs that PCCC has won.
For each job, the program should accept:
The amount of the contract
The amount they paid each subcontractor.
For internal work:
The salary for each of the employees working on the project, is entered as input until the sentinel 0 is entered (the number of employees is unknown but a minimum of 5).
The cost of the material for each of the items listed above.
For each contract the program should output to a file, the amount of the contract, the cost of the contract, and the profit/loss from the contract.
At the end, the program will output, to the same file:
the total electrical cost, total plumbing cost, total roofing cost, total landscaping cost, total cost for material and total cost for salaries for all contracts
it then outputs to the same file, the total of all contracts, the cost for all contracts, and the profit/loss for all contracts.
Requirements:
Comment as needed.
All functions have specifications.
All data is passed by value / by reference as appropriate.
Main is the driver function, hardly any statements other than function calls, may appear in main.
Use loops as is appropriate to complete the specified task/subtask.
Calculate all totals as requested.
Write the report to a file with proper headings, identifications etc.
Hints:
Be sure to initialize your totals and grand totals appropriately.
Keep running totals and grand totals between different contracts.
Grading criteria:
5 points | Documentation, every function has a detailed specification. |
5 points | Proper spacing, comments, use of variables, general program appearance. |
5 points | Functions are self-contained, and accomplishes their tasks |
5 points | main() is used as driver, contains no statements, just function calls. |
8 points | A loop is used to run as many times as the number of contracts |
7 points | A sentinel loop to enter employees' salaries is used correctly. |
5 points | Appropriate pass by value and pass by reference. |
5 points | Only needed variables are passed between functions, otherwise they are local. |
5 points | Accumulators and counters are initialized appropriately |
5 points | A flowchart of the function main is handed-in and is correct. |
5 points | Hierarchical chart showing all functions and relationships is included and is correct. |
10 points | All specified totals are calculated and printed clearly. |
15 points | Program runs correctly and produces the intended results. |
5 points | Input data is submitted. |
5 points | Report is neat, clear, and with appropriate titles/headers. |
5 points | Output file is printed and handed in. |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started