Explore BrainMass
Share

Employee Production Worker Program

This content was STOLEN from BrainMass.com - View the original, and get the already-completed solution here!

Design an Employee class that has fields for the following pieces of information:

* Employee Name
* Employee Number

Also design a class named ProductionWorker that extends the Employee class. The ProductionWorker class should have fields to hold the following information:

* Shift Number (an integer, such as 1, 2, or 3)
* Hourly Pay Rate

The workday is divided into two shifts: day and night. The shift field will hold an integer value representing the shift that the employee works. The day shift is shift 1 and the night shift is shift 2. Design the appropriate accessor and mutator methods for each class.

After having designed the classes, design a program that creates an object of the
ProductionWorker class and prompts the user to enter data for each of the object’s fields. Store
the data in the object and then use the object’s accessor methods to retrieve it and display it on
the screen. Please provide a Flowchart, and a Pseudocode following the guidelines of good
program design, like meaningful variable names and thoroughly commented code.

After having designed the classes, design a program that creates an object of the ProductionWorker class and prompts the user to enter data for each of the object's fields. Store the data in the object and then use the object's accessor methods to retrieve it and display it on the screen. Please provide a Flowchart, and a Pseudocode following the guidelines of good program design, like meaningful variable names and thoroughly commented code.

© BrainMass Inc. brainmass.com October 25, 2018, 6:07 am ad1c9bdddf
https://brainmass.com/computer-science/pseudocode/employee-production-worker-program-449084

Solution Preview

Please see attached document for the complete solution (flowchart and pseudocode).

Program Pseudocode

//Class Employee
Begin Employee Class
//Initialize Class variables
Initialize EmployeeName
Initialize EmployeeNumber
//Initialize Class methods
Initialize setEmployeeName (name)
Initialize setEmployeeNumber (num)
Initialize getEmployeeName ()
Initialize getEmployeeNumber ()
End Employee Class

Begin Employee::setEmployeeName(name) Method
EmployeeName = name //Set employee name to Employee Name variable
Return //Return to the main program
End Employee::setEmployeeName(name) Method

Begin Employee::setEmployeeNumber(num) Method
EmployeeNumber = name //Set employee number to Employee Number variable
Return //Return to the main ...

Solution Summary

This posting contains the pseudocode and flowchart required.

$2.19
See Also This Related BrainMass Solution

The Case of Saturn Corporation (a wholly owned subsidiary of General Motors from 1984 to 1994)

The case of Saturn Corporation (a wholly owned subsidiary of General Motors from 1984 to 1994) outlines the successful and unique adaptation of a new approach to organizing in the U.S. automobile industry. The organization represents many of the characteristics typified by "Quality of Work Life" programs, and allows students to see the benefits of a cooperative and customer-focused HRM approach. Please answer the following questions:

1. What aspects of quality of work life (QWL) programs does the experiment at the Saturn plant illustrate?

2. How can Saturn assure that employees have not only the willingness to take responsibility but also the ability to do so?

3. In this case, a completely new company was started with considerable autonomy from General Motors. Why do you think so many large organizations turn to "greenfield" operations such as this when undertaking major changes in corporate culture and operations? Do you foresee any problems down the road for GM in this regard?

View Full Posting Details