CST 280 In-Class Practice – Week 1 C++ - 73884

Solution Posted by
jordanblink

jordanblink

Rating : (19)A+
Solution Detail
Price: $20.00
Request Description

CST 280 In-Class Practice – Week 1

Access the file newFunctions.cpp from the course web materials (code 8ah4). 

Create a new Visual C++ project. 

Next, add two functions that will perform the following:

1) Write a value-return function to receive the hours worked and pay rate for an 

hourly employee. Assume that the employee receives the hourly rate for each 

hour up to 40 hours, but then receives “time-and-a-half” for all hours over 40. 

Your function should then return the gross pay amount determined from the 

two input values.

2) Write a void function receive three integers and returns the sum and product

of the values.

Create simple function calls in main to demonstrate that your functions are working 

correctly.

Deliverables

• Execute program using realistic values to validate the functions

• Demonstrate the output and functions to your instructor.

 

Capture the following files from the course resources webpage for this week

(using code z34a):

• program file wxAnalysis.cpp and data file delta99Wx.txt

Create a project file using the C++ development tool in the classroom and store 

the files in the project.

Then, debug the program until you can successfully execute the code and create 

the weather/climate summary report. 

The expected output should be:

 Heating Cooling 

Month Deg. Days Deg. Days Precip 

 1 2663 0 2.27

 2 2703 0 0.67

 3 3074 0 0.76

 4 3414 0 4.02

 5 2552 44 2.30

 6 995 198 2.23

 7 258 270 4.16

 8 891 95 2.06

 9 1958 60 3.77

10 3421 0 1.25

11 3270 0 0.58

12 2946 0 2.04

Total 28145 667 26.11

Deliverables

Execute the program using the file provided. Upon completion of the program, 

demonstrate output (like above) to your instructor.

Solution Description

CST 280

Attachments
CPPCST280.zip
CPPCST280.zip