Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago