Respuesta :
Answer:
There are two portions of this question; first is the program to solve the problem and second is to make documentation of that program.
a) A program required by a supermarket owner to calculate gross salaries of the workers with comments for explanation.
b) The raptor to illustrate the working of the program.
Explanation:
#include<iostream>
using namespace std;
main()
{
// variables decleration
int EmployeeID;
float HourlyRate;
int RegHours;
int OvertimeHours;
float GrossPay;
float Tax;
float Parking;
float NetPay;
// input data
cout<<"Enter Employee ID:";
cin>>EmployeeID;
cout<<endl;
cout<<"Enter Hourly Rates:";
cin>>HourlyRate;
cout<<endl;
cout<<"Enter Regular Work Hour:";
cin>>RegHours;
cout<<endl;
cout<<"Enter Overtime Hours:";
cin>>OvertimeHours;
// calculation salary
GrossPay = (RegHours * HourlyRate) + (OvertimeHours * (HourlyRate * 1.5));
Tax = GrossPay * (30 / 100); //tax is 30% of the Gross Pay
Parking = 10; //parking is $10
NetPay = GrossPay - (GrossPay * Tax) - Parking;
//output information
cout<<endl;
cout<<"****RESULTS****"<<endl;
cout<<"Employee ID :"<<EmployeeID<<endl;
cout<<"Gross Pay :$"<<GrossPay<<endl;
cout<<"Net Pay :$"<<NetPay<<endl;
}
