iLAB STEPS STEP 1: Understand the UML Class Diagram Back to Top 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

computer science

Description

iLAB STEPS STEP 1: Understand the UML Class Diagram Back to Top 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 Back to Top Create a new project called "CIS247B_WK2_Lab_Carnell". Using the provided Class Diagram from Step 1, code the Employee class in the new project (i.e., "Realize the UML Class diagrams"). The default constructor should set the attributes as follows: firstName = "not given" lastName = "not given" gender = "U" (for unknown) dependents = 0 annualSalary = 20,000 The multi-arg constructor should initialize all of the attributes using values passed in using its parameter list. 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. The calculatePay( ) method of the Employee class should return the value of annual salary divided by 52 (return annualSalary / 52;). 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! Inside displayEmployee, create a NumberFormat object for currency with the following:


Related Questions in computer science category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.