Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Software Engineering Expert

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

Software Engineering, Computer Science

  • Category:- Software Engineering
  • Reference No.:- M92395646
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in Software Engineering

Reply to this article with apa referencehate crimes

Reply to this article with APA reference. Hate crimes According to Merriam-Webster, hate crime is any of various crimes (such as assault or defacement of property) when motivated by hostility to the victim as a member of ...

Write review on this article with apa formatgovernment

Write review on this article with APA format. Government surveillance is a major issue in the United States and globally. Surveillance refers to any collection and processing of personal data, whether, identifiable or no ...

Instructionsprivacy-preserving data miningdata mining

INSTRUCTIONS PRIVACY-PRESERVING DATA MINING Data mining technology can be exploited to reveal sensitive information from the original data. Thus it is important to preservethe privacy of the parties that the data refer t ...

Instructions - onion routingin this assignment you will

INSTRUCTIONS - ONION ROUTING In this assignment, you will answer the following questions related to Onion Routing and Tor. 1. Describe the infrastructure of Onion Routing and explain how it works for providing anonymity ...

In this assignment you will answer the following review

In this assignment, you will answer the following review questions from the reading materials of the module/week. 1. "What are the key components of a typical P2P application? Describe their functions." 2. "What are the ...

Write reply to this article with references with apa

Write reply to this article with references with APA bibliography. Hate Crimes Over the past couple of years, hate crimes have been on the rise in America's largest cities. Studies show that there were sharp spikes in th ...

Research projectin the course we have covered various

RESEARCH PROJECT In the course, we have covered various security and privacy issues that arise in the cyberspace field. We have learned to identify these risks and have discussed the current approaches and developments f ...

Assignment part 1objectives to learn to identify the

Assignment Part 1 Objectives: To learn to identify the relevant use cases for a given application, describe the use cases and develop an object-oriented domain model. Problem Statement - Standing Orders Management System ...

Overviewyou are required to modify and logically extend

Overview You are required to modify and logically extend the functionality of a provided code base to implement a game. This requires you to modify the code base as well as create documentation and implement various user ...

Assignment lab - statement of workclient liberty vacation

Assignment Lab - Statement of Work Client: Liberty Vacation Planning Inc. (LVP) Project: Website Assessment 1. Project Objectives With this statement of work, LVP is engaging you to conduct a website assessment to determ ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As