Purchase Solution

Employee Production Worker Program

Not what you're looking for?

Ask Custom Question

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.

Purchase this Solution

Solution Summary

This posting contains the pseudocode and flowchart required.

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 ...

Purchase this Solution


Free BrainMass Quizzes
Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Basic Networking Questions

This quiz consists of some basic networking questions.