Understand the uml class diagram

Assignment Help Basic Computer Science
Reference no: EM131498986

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.

Reference no: EM131498986

Questions Cloud

Nonconstant growth and corporate valuation : TTC recently introduced a new line of products that has been wildly successful. On the basis of this success and anticipated future success.
What do we mean when we say : "What do we mean when we say"make sure an object is in a proper state when it is created" and how is this accomplished in object-oriented programming?
Bonds will firm have to issue to receive needed funds : Gillian Stationery Corporation needs to raise ? $616,000 to to improve its manufacturing plant. How many bonds will firm have to issue to receive needed funds.
Develop a plan for evaluation of training effectiveness : Develop SMART (Specific, Measurable, Attainable, Realistic, and Timely) training objectives based on the needs assessment.
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
How could strategic decision makers address the disadvantage : Many organizations are putting customer service activities online and making them available 24/7. What would be the advantages of this strategic approach?.
Current organization or a previous employer : Write a 2- to 3-page paper evaluating the business operations and network design of your current organization or a previous employer. Include the following:
Objectives for your training and development plan : Post a rewritten version of your topic and objectives for your training and development plan.
Rebalancing strategies : Suppose you initially have $100 in stock and $35 in T-bills creating a portfolio with total assets of $135. Your optimal S/TA ratio

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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