Create a class called salaried that is derived from employee

Assignment Help Software Engineering
Reference no: EM131586932

Assignment: Understand the UML Diagram

Scenario/Summary

The objective of the lab is to take the UML Class diagram and enhance last week's Employee class by making the following changes:

1. Create a class called Salaried that is derived from Employee.
2. Create a class called Hourly that is also derived from Employee.
3. Override the base class calculatePay() method.
4. Override the displayEmployee() method.

Deliverables

• Capture the Console output window and paste into a Word document.
• Zip the project folder file.
• Upload the zip file and screenshots (Word document).

Lab Steps

STEP 1: Understand the UML Diagram

Notice the change in UML diagram. It is common practice to leave out the accessors and mutators (getters and setters) from UML class diagrams, since there can be so many of them. Unless otherwise specified, it is assumed that there is an accessor (getter) and a mutator (setter) for every class attribute.

STEP 2: Create the Project

Create a new project and name it CIS247C_WK5_Lab_LASTNAME. Copy all the source files from the Week 4 project into the Week 5 project.
Before you move on to the next step, build and execute the Week 5 project.

STEP 3: Modify the Employee Class

1. Using the updated Employee class diagram, modify the attributes to be protected.
2. Delete the iEmployee interface class, and remove the reference from the Employee class.

STEP 4: Create the Salaried Class

1. Using the UML Diagrams from Step 1, create the Salaried classes, ensuring to specify that the Salary class inherits from the Employee class.

2. For each of the constructors listed in the Salaried class, ensure to invoke the appropriate base class constructor and pass the correct arguments to the base class constructor. This will initialize the protected attributes and update the numEmployees counter.

3. The valid management levels are 0, 1, 2, and 3, and should be implemented as a constant.

4. Override the calculatePay method to add a 10 percent bonus for each of the management levels (i.e., bonus percentage = managementLevel * .10). The bonus percentage should be implemented as a constant.

5. Override the displayEmployee() method to add the management level to the employee information.

STEP 5: Create the Hourly Class

1. Using the UML Diagrams from Step 1, create the Hourly classes, ensuring to specify that the Hourly class inherits from the Employee class.

2. For each of the constructors listed in the Hourly class, ensure to invoke the appropriate base class constructor and pass the correct arguments to the base class constructor. This will initialize the protected attributes and update the numEmployees counter.

3. The valid category types are "temporary", "part time", and "full time".

4. The provided hours must be more than 0 hours and less than 50 hours, and the limits should be implemented as constants.

5. The provided wage must be between 10 and 75, and the limits should be implemented as constants.

6. Override the calculatePay method by multiplying the wages by the number of hours.

7. Override the Employee setAnnualSalary method and set the annual salary by multiplying the weekly pay by 50.

8. Override the displayEmployee() method to add the category to the hourly employee information.

STEP 6: Modify the Main Method

1. Using previous weeks' assignments as an example, create at least one Employee, Hourly, and Salaried employee.

2. For each object created, display the number of employees created.

3. For each object created, write statements to exercise each of the public methods listed in the Class diagram.

4. For each object created, invoke the object's displayEmployee() method to display the employee's information.

5. For employee, the following information needs to be displayed:

Partial Sample output

6. For salaried employee, the following information needs to be displayed:

Partial Sample output

For hourly employee, the following information needs to be displayed:

Partial Sample output

STEP 7: Compile and Test

When done, compile and run your code.

Then, debug any errors until your code is error-free.Check your output to ensure that you have the desired output, modify your code as necessary, and rebuild.

Below is the complete sample program output for your reference.

STEP 8: Label Title

• Capture the Console output window and paste into a Word document.
• Upload the zip file and screenshots (Word document).

Attachment:- Understand-The-UML-Diagram.rar

Reference no: EM131586932

Questions Cloud

Write out the first several terms of the given sequence : For each of the following closed forms, write out the first several terms of the sequence (at least five) and use this to create a recursion for the sequence.
Profit-maximizing price per drug treatment : Suppose that the marginal cost per drug treatment is constant at $20. What is the profit-maximizing price per drug treatment?
Write a status report - indication of status of the project : Write a one page status report (excluding the title page) to the sponsors providing a clear indication of status of the project
Define how you would monitor the effectiveness of your plan : Define how you would monitor the effectiveness of your plan while also setting new goals for the next influenza season.
Create a class called salaried that is derived from employee : Create a class called Salaried that is derived from Employee. Create a class called Hourly that is also derived from Employee.
How will price and output in this industry adjust : What will happen to the number of spinach growers in the long run? How will price and output in this industry adjust in the long run?
What are the types of cost reimbursable contracts : What are the types of Cost Reimbursable contracts? Describe the benefits of using these types of contracts .
What types of resource constraints affected the project : Provide an example of a project you have been involved with that had limited resources. What types of resource constraints affected the project, and how?
Find the market demand for ice cream : Travis's demand for ice cream is QT = 12 - 3P and Maya's is QM = 6 - P. 1) Find the market demand for ice cream if Travis and Maya are the only two consumers.

Reviews

Write a Review

Software Engineering Questions & Answers

  Research report on software design

Write a Research Report on software design and answer diffrent type of questions related to design. Report contain diffrent basic questions related to software design.

  A case study in c to java conversion and extensibility

A Case Study in C to Java Conversion and Extensibility

  Create a structural model

Structural modeling is a different view of the same system that you analyzed from a functional perspective. This model shows how data is organized within the system.

  Write an report on a significant software security

Write an report on a significant software security

  Development of a small software system

Analysis, design and development of a small software system.

  Systems analysis and design requirements

Systems Analysis and Design requirements

  Create a complete limited entry decision table

Create a complete limited entry decision table

  Explain flow boundaries map

Explain flow boundaries map the dfd into a software architecture using transform mapping.

  Frame diagrams

Prepare a frame diagram for the software systems.

  Identified systems and elements of the sap system

Identify computing devices, which could be used to support Your Improved Process

  Design a wireframe prototype

Design a wireframe prototype to meet the needs of the personas and requirements.

  Explain the characteristics of visual studio 2005

Explain the characteristics of Visual Studio 2005.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd