Question: Part 1: In your Lab8_YourLastName folder, create a C++ Program called Lab8_YourFirstName_YourLastName.cpp * Scenario: Complete the following C++ program by including the definition for the

Part 1:

In your Lab8_YourLastName folder, create a C++ Program called Lab8_YourFirstName_YourLastName.cpp

* Scenario:

Complete the following C++ program by including the definition for the function named weeklyPay that returns weekly pay. The function has the formal parameter hours to pass the value of the number of hours worked in a week and the formal, parameter rate to pass the value of the hourly rate, the name should be passed as a third parameter, a fourth parameter of type (int, where 1=fulltime, 2=partime).

Additional specifications

*Output a dollar sign in from to each weekly pay

*Set precision to 2 decimal places

*Assume 12% FIT rate where hourly rate is less than $15, and 15% otherwise

*Assume full 6.2% Social Security rate

*Assume 1.45% Medicare Rate

*If and only if a full time employee, Assume $17.00 for dental

*If and only if a full time employee, Assume $77.00 Employer contribution toward retirement

*Assume overtime pay a 2 times time's regular rate beyond 40 clockedHours for fulltime employees only

*Output to the screen the employees name IN-ALL-CAPS (using toupper()), weekly pay in $, and whether or not he/she is a full time or partime employee.

*Highlight the employees name in color, and leave the rest of the text in black/white.

For help using toupper(), see http://www.cplusplus.com/reference/std/locale/toupper/

*Part-time employees do not get dental, retirement, or overtime benefits.

*Test values (use the names and values below in your code).

o YOURNAME(Edwardo): clockedHours = 47, hourlyRate = 505.75, full time

o Melivin: clockedHours = 45, hourlyRate = 55.25, full time

o Susan: clockedHours = 15, hourlyRate = 65.25, part time

o Mika: clockedHours = 41, hourlyRate = 14.75, full time

o Eldridge: clockedHours = 25, hourlyRate =15.0, part time

o Freedom: clockedHours = 55, hourlyRate =203.50, full time

#include using namespace std; double weeklyPay(double, double,string,int);// function prototype int main( ) { cout << weeklyPay (32.5, 100.25,Tyson,1) << endl;

system(pause); return 0; }

double weeklyPay(double hours, double rate, string name, int empType) {// complete the function definition }

Part 2: Extending code in an existing C++ file you wrote.

In your int main() function of your Lab8_YourFirstName_YourLastName.cpp above, use the built in

tolower()function to convert and output to the screen the following text "TCC-TR IS COOL"

//hint: run the (tolower() Function through a loop for each character).

toupper()function to convert and output to the screen the following text "i will succeed at c++"

//hint: run the (toupper() Function through a loop for each character).

Part 3:

Download the (below) attached Integer_to_Words_YourLastname.cpp (or see below) file and save it to your Lab8_YourLastName folder as Integer_to_Words_YourLastName.cpp (modify filename to have your lastname)

Add a comment at the top of the file with your firstname and your lastname, and the date that you modified the program.

Add a function call to the int main() portion of the program that passes the entered number to the EnglishNumber function

Hint: this line of code is best entered on line 124

Add appropriate C++ Comments to explain the logic behind your chosen method for solving the problem. Comments are also helpful for the reference of future programmers, and for you.

Use the appropriate data types, variables, and constant variables to solve the program

Add a Multiple line C++ comment to the top of the program with your first name, last name, course name section, Name of Text Editor/Software used to creae the program, and the a summary of what the program does.

Save, build and execute your programs being sure that they are free of errors.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!