Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Business Management Expert

STEP 1: Understand the UML Class Diagram

Use the following UML diagram to build the class. The first section specifies the attributes. The second section specifies the behaviors, and the first character specifies the access modifier value, where:

  • "-" means that the class member is private, and
  • "+" means that the class member is public.

STEP 2: Code the Employee Class

  1. Create a new project called "CIS247B_Week2Lab_YourName".
  2. Using the provided Class Diagram from Step 1, code the Employee class in the new project (i.e., "Realize the UML Class diagrams").
  3. The default constructor should set the attributes as follows: firstName = "not given", lastName = "not given", gender = "U" (for unknown), dependents = 0, and annualSalary = 20,000.
  4. The multi-arg constructor should initialize all of the attributes using values passed in using its parameter list.
  5. As shown in the Class diagram, each attribute should have a "getter" to retrieve the stored attribute value, and a "setter" that modifies the value.
  6. The calculatePay( ) method of the Employee class should return the value of annual salary divided by 52 (return annualSalary / 52;).
  7. The displayEmployee() method should display all the attributes of the Employee object in a well-formatted string with logical labels applied to each attribute. Don't forget to call calculatePay from within the displayEmployee method in order to display the Employee's weekly pay as well!

STEP 3: Code the Main Program

In the Main class, create code statements that perform the following operations. Be sure you follow proper commenting and programming styles (header, indentation, line spacing, etc.).

  1. Create an Employee object using the default constructor.
  2. Prompt for and then set the first name, last name, gender, dependents, and annual salary. (Remember that you have to convert gender, dependents, and annual salary from strings to the appropriate data type.)
  3. Using your code from last week, display a divider that contains the string "Employee Information"
  4. Format the currency using the following formatting services:
  5. Display the Employee information.
  6. Create a second Employee object using the multi-argument constructor, setting each of the attributes with appropriate valid values.
  7. Using your code from last week, display a divider that contains the string "Employee Information".
  8. Display the Employee information for the second Employee object.

STEP 4: 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.

STEP 5: Screen Prints

Capture the Console output window and paste into a Word document. The following is a sample screen.

STEP 6: Submit Deliverables

  • Capture the Console output window and paste into a Word document.
  • Put the zip file and screen shots (Word document that contains programming code and screen shots of program output) in the Dropbox.

Business Management, Management Studies

  • Category:- Business Management
  • Reference No.:- M92305368
  • Price:- $30

Priced at Now at $30, Verified Solution

Have any Question?


Related Questions in Business Management

1 how should a project manager handle cases in which racial

1. How should a project manager handle cases in which racial or sexual harassment has occurred? Justify the actions that you recommend? 2. Why should project managers concern themselves with the diversity issue? 3. Recom ...

Why is emotional intelligence particularly important in

Why is emotional intelligence particularly important in service jobs?

Considering their code of ethics compare the mission of the

Considering their code of ethics, compare the mission of the following IT professional organization: ACM, IEEE, AITP, and PMI.

What would applying the idea of organizational culture tell

What would applying the idea of organizational culture tell you about the place you work, or of any other place that someone might work at?

A cartel is branch of an oligopoly there are still a

A cartel is branch of an oligopoly. There are still a handful of large firms and many smaller firms. For instance, the diamond industry and the petroleum industries are examples are oligopolies. However, the main differe ...

Broad environmentdiscuss thenbspeffects of the impact of

Broad Environment. Discuss the effects of the impact of the Millennial generation on Strengths or Opportunities for Businesses. In addition to your discussion, provide an example to illustrate your point.

Of the three questions for blockbuster why do you think

Of the three questions for Blockbuster, why do you think they failed as a company and went out of business?

What is the benefit the beyond budgeting please also

What is the benefit the Beyond budgeting? Please also explain how each are used.

What is empowerment and why do you think empowerment

What is empowerment and why do you think empowerment increases motivation?

Question 1 john runs a fresh fruit stand at the beach

Question 1. John runs a fresh fruit stand at the beach. Unfortunately, his cooling capabilities are limited, hence at the end of the week he has to discard any unsold fruits. John ' s best-selling items are oranges. Ever ...

  • 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