Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA Composite Class Assignment with UMLS Outcome: Student will demonstrate the ability to create a user-define data type (Class) Student will demonstrate the ability to

JAVA Composite Class Assignment with UMLS

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. The class with main. A class that defines a Name (first name, middle name, and last name) A class that defines a Person (name, gender, age, and salary) You will define all setters and getters, constructors and toString methods You will create and attach a UML for the Person and Name classes. 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

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Sham Navathe

4th Edition

0321122267, 978-0321122261

Students also viewed these Databases questions

Question

=+ c. a company president deciding whether to open a new factory

Answered: 1 week ago