Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Below Program is a Hint that the professor mentions in the project description. Its not a complete program its just a reference program to

The Below Program is a Hint that the professor mentions in the project description. Its not a complete program its just a reference program to help you get started. I just posted it for your reference. the language is C++.

// This program produces a student tests report #include #include using namespace std;

// Function prototypes void dualSort(int [], int [], int); void showOrder(int [], int [], int);

// NUM_STUDENTS is the number of students. const int NUM_STUDENTS = 10;

int main() { // Array with student ID numbers int id[NUM_STUDENTS] = {1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022};

// Array with tests scores int tests[NUM_STUDENTS] = {99, 78, 69, 88,83, 91, 75, 83,63, 56};

// Display the student id and test scores before sorting.

// Sort the elements in the tests array in descending // order and shuffle the ID numbers in the id array to // keep them in parallel.

// Display the student id and test scores after sorting.

return 0; }

/** dualSort * This function performs a descending order selection sort on * the tests array. The elements of the id array are exchanged * identically as those of the tests array. size is the number * of elements in each array. * @Pre: id and tests arrays: id[] and tests[] the number of elements in each array: size * @Post:sorted array id[] and tests[] */

void dualSort(int id[], int tests[], int size) { // fill the code }

/** showOrder * The function first displays a heading, then the sorted list * of student numbers and tests. * @Pre: id and tests arrays: id[] and tests[] the number of elements in each array: size * @Post:none */ void showOrder(int tests[], int id[], int num) { cout

======Below Pictures are what i need your help with====Please follow her requirement she is very strict about requirements.==You can ignore the structure chart and algorithm requirement.

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Problems Modify Project 4 (Payroll System) so that employees' information can be sorted by ID, hourly rate, hours worked or wage. You are asked to use a menu to provide these services for the users. The menu might look like this: Menu 1. Display employees' information to screen 2. Display employee's information to screen according the order of ID 3. Display employee's information to screen according the order of hourly rate 4. Display employee's information to screen according the order of hours worked 5. Display employee's information to screen according the order of wage 6. Quit the system Before the menu is shown, you need to build employee database first as you did in Project 4. Then ask the user how to show employees' information. [Hint] Follow the way of dual sort employee information in Lab 9. Input Employee's id, hourly rate and hours worked. A user's option for displaying data (a number from 1 ~6) Output Employee's information including ID, hourly rate, hours worked and calculated gross wage. An Example of Test Run The output of your program might look like this: csci>a.out -- XXXXXX Payroll System Build Employee Database CSC Spri Enter an employee's information by the order of ID number, rate, hours: 123450 12.5 80 Do you want to calculate another employee's gross wage? y Enter an employee's information by the order of ID number, rate, hours: 123123 25.5 89.5 Do you want to calculate another employee's gross wage? y Enter an employee's information by the order of ID number, rate, hours: 125689 8.5 112.5 Do you want to calculate another employee's gross wage? y Enter an employee's information by the order of ID number, rate, hours: 100251 10.3 45.0 Do you want to calculate another employee's gross wage? y Enter an employee's information by the order of ID number, rate, hours: 101104 7.5 56.0 Do you want to calculate another employee's gross wage? y Enter an employee's information by the order of ID number, rate, hours: 100025 8.0 40.0 Do you want to calculate another employee's gross wage? n The result is reported to the file "employeeWages.dat" XXXXXX Payroll System Display Employee Data 1. Display employees' information to screen 2. Display employees' information to screen according the order of ID 3. Display employees' information to screen according the order of hourly rate 4. Display employees' information to screen according the order of hours worked 5. Display employees' information to screen according CSCI 201 Computer Science I Spring 2021 3 order of ID 3. Display employees' information to screen according the order of hourly rate 4. Display employees' information to screen according the order of hours worked 5. Display employees' information to screen according the order of wage 6. Quit the system Enter your option --> 5 hours 40.0 ID 100025 101104 110251 125689 123450 123123 56.0 Hourly rate 8.0 7.5 10.3 8.5 12.5 25.5 Wage 320.0 420.0 461.3 45.0 112.5 80.0 89.5 956.3 1000.0 2282.3 XXXXXX Payroll System Display Employee Data 1. Display employees' information to screen 2. Display employees' information to screen according the order of ID 3. Display employees' information to screen according the order of hourly rate 4. Display employees' information to screen according the order of hours worked 5. Display employees' information to screen according the order of wage 6. Quit the system Enter your option --> 6 Thank you for using XXXXXX Payroll System! Requirements 1. Design your algorithm FIRST. CSCI 201 Computer Science I Spring 2021 2. Develop a structure chart for the program that solves the problem. 3. Write the program according to the structure chart in step 2. It should include main function and other functions. 4. The output format should be same as the example above. 5. Insert comments in the program so that it can be read easily. Don't forget to include your name, your startID, section number, file location and a description of the purpose of this program on the top of your program. . 6. Insert necessary documentation for each function required for this problem. You should also include comments about all parameters. See how this should be done by following the "Requirements for Programming Project in D2L course page. 7. You should test each option separately. Before you test the program, design test data for all possible cases. Explain why you choose these data. 8. For other requirement, please see Requirements for Programming Project posted on D2L course page

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Probabilistic Databases

Authors: Dan Suciu, Dan Olteanu, Christopher Re, Christoph Koch

1st Edition

3031007514, 978-3031007514

More Books

Students also viewed these Databases questions

Question

What are the three main tasks the operating system performs?

Answered: 1 week ago