Question: Lab 6 Wages Program CSCI 111 Programming and Algorithms I Due Sunday February 7, 11:59pm on turnin 10 Points NEW CONCEPTS: Successful completion of this
Lab 6
Wages Program
CSCI 111 Programming and Algorithms I
Due Sunday February 7, 11:59pm on turnin
10 Points
NEW CONCEPTS: Successful completion of this lab incorporates the following new concepts.
Type declarations double/string
getline function
cout << fixed << setprecision(2);
. iomanip library
Properly indent your code. In vi/vim command mode, type in: gg=G
Here is some sample code you should be familiar with.
#include
using namespace std;
int main ()
{
string color;
cout << "Enter a color. " << endl;
getline (cin, color);
cout << "The color you typed in is " << color << endl;
return 0;
}
Task list:
1. Ensure you have a good understanding of the code above.
2. Create a source code file named lab6.cpp which calculates the gross wages (i.e. number of hours multiplied by hourly rate). The hourly rate depends on the number of people working in the organization. If the organization has 50 or fewer employees, the hourly rate is $11.00 per hour, otherwise it is $11.50 per hour.
3. Refer to the expected output listing below. Notice the decimal formatting.
4. Compile and execute the code. Refer to previous labs for compile/execute command syntax.
5. Confirm that your code is correct for both conditions.
6. If you are working on this lab remotely, then transfer the lab6.cpp code from jaguar to your laptop.
7. Submit your lab6.cpp file on https://turnin.ecst.csuchico.edu/
8. Ensure that you get a successful message after submitting work via turnin.
GRADING
To achieve a maximum score, students will need to clearly prove that they completed the goal.
Points lost for incompleteness, sloppiness, lateness, or failure to follow instructions.
Refer to syllabus for late policy
SAMPLE OUTPUT
/user/faculty/jraigoza/CSCI111/Labs/lab6 $ ./lab6
Enter your name.
Ruben
Enter the number of hours worked.
35
Enter the number of people who work for your company.
15
Hours = 35.00 People = 15 Rate = 11.00
Your gross wage amount is $385.00
Good Bye Ruben
/user/faculty/jraigoza/CSCI111/Labs/lab6 $ ./lab6
Enter your name.
Lupe
Enter the number of hours worked.
55
Enter the number of people who work for your company.
100
Hours = 55.00 People = 100 Rate = 11.50
Your gross wage amount is $632.50
Good Bye Lupe
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
