Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Main topics: Composition - Aggregation Inheritance Program Specification: You are to design and implement a set of exactly five classes which can be used

Java

Main topics:

Composition - Aggregation

Inheritance

Program Specification:

You are to design and implement a set of exactly five classes which can be used to model the most basic feature of an orginization.

Person - has only a name.

Member - extends Person to include a unique id.

Leader - extends Member to include what term of a 2 year term of office they are in.

Org:

A Person can only be the Leader of a single Org.

A Person can be a Member of multiple Orgs.

An Org has a name.

An Org has a single Leader.

An Org may have many Members.

An Org can generate a String representation of the list of its Leader and all its Members.

Driver - A class which must fully test all of the above classes functionality by minimally constructing two unique Orgs - with unique Leaders, and multiple Members - at least one of which is a Member of multiple Orgs.

Rules and Requirements:

When designing your classes you must use Inheritance, Composition and Aggregation correctly to Enforce the defining characteristics above.

For each class (other than Driver):

An appropriate default and specifying constructor must be included. In derived classes, the corresponding super constructor must be utilized.

All access of instance variables (within each class), by the other instance methods must be made via the classes accessor(s) and/or mutator(s).

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

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions

Question

What are multi-meters. Explain the term thoroughly.

Answered: 1 week ago

Question

3. What strategies might you use?

Answered: 1 week ago

Question

3. Is there opportunity to improve current circumstances? How so?

Answered: 1 week ago