|
|
|
|
|
|
|
11. Write a function that concatenates (joins) two strings into a third string. Use the declaration you wrote in Exercise 10. |
|
|
|
|
|
|
|
|
12. You are writing a program to keep track of a manufacturing company's inventory. For each part, the following information needs to be stored: |
|
|
|
 |
|
|
|
|
Part number
Part name
Cost
Quantity |
|
|
|
 |
|
|
|
|
Write a function and the necessary declarations to read in a variable of struct type Inventory. |
|
|
|
|
|
|
|
|
1. The MergeLists program merges three lists by merging two lists, and then merging the third list with the result of the merger of the first two. Another way of solving the same problem is to merge three lists at the same time, storing the result into a fourth list. Design a solution to the problem using this second strategy. Code your design in C++. Test your program thoroughly. |
|
|
|
|
|
|
|
|
2. The Emerging Manufacturing Company has just installed its first computer and hired you as a junior programmer. Your first program is to read employee pay data and produce two reports: 1) an error and control report, and 2) a report on pay amounts. The second report must contain a line for each employee and a line of totals at the end of the report. |
|
|
|
 |
|
|
|
|
Input: |
|
|
|
 |
|
|
|
|
Transaction File |
|
|
|
 |
|
|
|
|
Set of five job site number/name pairs |
|
|
|
 |
|
|
|
|
One line for each employee containing ID number, job site number, and number of hours worked |
|
|
|
 |
|
|
|
|
These data items have been presorted by ID number. |
|
|
|
 |
|
|
|
|
Master File |
|
|
|
 |
|
|
|
|
ID number
Name
Pay rate per hour
Number of dependents
Type of employee (1 is management, 0 is union)
Job site
Sex (M, F)
|
|
|
|
 |
|
|
|
|
This file is ordered by ID number. |
|
|
|
 |
|
|
|
|
Note: 1) Union members, unlike management, get time and a half for hours over 40. 2) The tax formula for tax computation is as follows: If number of dependents is 1, tax rate is 15%. Otherwise, the tax rate is the greater of 2.5% and |
|
|
|
|
|