Question: Composite Class Assignment with UMLS this assignment is in java Outcome: Student will demonstrate the ability to create a user-define data type (Class) Student will

Composite Class Assignment with UMLS

this assignment is in java

Outcome:

Student will demonstrate the ability to create a user-define data type (Class)

Student will demonstrate the ability to under the HAS A relationship

Student will demonstrate the ability to create a class using another class (composite class)

Student will demonstrate the ability to generate all necessary methods within the user defined data types.

Student will demonstrate the ability to write code in the setters to validate data.

Student will use SETTER METHODS in CONSTRUCTORS instead of the ASSIGNMENT OPERATOR. You should NEVER use the assignment operator in a CONSTRUCTOR.

Program Specifications:

Create a program that has at least three classes.

1. The class with main.

2. A class that defines a Name (first name, middle name, and last name)

3. A class that defines a Person (name, gender, age, and salary)

4. You will define all setters and getters, constructors and toString methods

5. You will create and attach a UML for the Person and Name classes.

6. You do not need to create or attach a design tool for this assignment (other than the UMLs)

The program will create and populate at least three different people.

The program will allow a user to change the fields for a person.

The program will output all three people.

Rules:

1. Gender must equal M or F only.

2. Age must be between 1 and 120.

3. Salary must be a positive number.

4. The first and last name must be in sentence case. (Dennis B. Hunchuck)

5. A middle name is optional (the code will account for this)

YOU CANNOT:

Use global variables

Use the word goto

Use the break command outside a case statement

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!