Answered step by step
Verified Expert Solution
Question
1 Approved Answer
es Project #7: Employee Struct Due Monday by 11:59pm Points 10 1. name (string) 2. payRate (double) 3. hours (double) This exercise is designed
es Project #7: Employee Struct Due Monday by 11:59pm Points 10 1. name (string) 2. payRate (double) 3. hours (double) This exercise is designed to be done as individuals, but with consultation from your peers. This week I want you to write a program that contains a structure definition for a struct called employee. The struct should represent an employee with three member variables. employee o a.name a payRate 18.50; a.hours 55; cout < < o nome Then write a function called calculatePay() which takes an employee as an argument and returns the amount of money they need to be paid this pay period. Employees should be paid "time and a half" for all hours over 40. (You should set values for the employee's hours and payRate before sending it to the function.) You could use the following code in your main() function to test that your struct and function are setup properly. "Sterling Archer"; has earned Start Assignment Submitting a file upload Available until Oct 11 at 11:59pm des M < < calculatePay(0) < < this week. ";
Step by Step Solution
★★★★★
3.31 Rating (157 Votes )
There are 3 Steps involved in it
Step: 1
cpp include include Define the employee struct struct Employee stdstring name double payRate double ...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