Understand the uml diagram | Computer Science homework help

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

Due this week:

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

https://lms.courselearn.net/lms/CourseExport/files/8e0149a0-9e83-4b44-8d5a-6df2ad73fa53/images--cis247c_w5_ilab_01.gif

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

https://lms.courselearn.net/lms/CourseExport/files/8e0149a0-9e83-4b44-8d5a-6df2ad73fa53/images--cis247c_w5_ilab_02.gif

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

Partial Sample output

https://lms.courselearn.net/lms/CourseExport/files/8e0149a0-9e83-4b44-8d5a-6df2ad73fa53/images--cis247c_w5_ilab_03.gif

 

 

 

 

 

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

Partial Sample output

https://lms.courselearn.net/lms/CourseExport/files/8e0149a0-9e83-4b44-8d5a-6df2ad73fa53/images--cis247c_w5_ilab_04.gif

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.

https://lms.courselearn.net/lms/CourseExport/files/8e0149a0-9e83-4b44-8d5a-6df2ad73fa53/images--cis247c_w5_ilab_05.gif

STEP 8: Label Title

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







Calculate Your Essay Price
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Order your essay today and save 10% with the coupon code: best10