Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The language is C# I have to make my own example. Even though this is incomplete I just need something similar. Instructions Create an inheritance

image text in transcribed

The language is C#
I have to make my own example. Even though this is incomplete I just need something similar.
Instructions Create an inheritance hierarchy that is: at least three levels deep (one parent class, two child classes, one child class of one the child classes) shares at least one property through all levels has at least one property or method that is modified inside of each child class Incomplete Example: A parent class called person contains a name, a type, and a pointOfContact. Methods exist to get and set each of these fields. From this parent class is derived a child class called student. It contains the same information: a name, a type, and a pointOfContact. However, the student class also requires a GPA field. The setType method will be limited to containing [Freshman | Sophomore] and the type can only change from Freshman to Sophomore. It will not normally change from Sophomore to Freshman. Person Student -name: String -type: String -pointOfContact: String getName(): String -setName(): void -getType(): String -setType(): void -getPOCO): String -setPOCO): void Aname: String Atype: String pointOfContact: String -GPA: double getName(): String setname(): void "getType(): String setType(): void getPOC(): String -setPOCI): void +getGPA(): Double +freshToSoph(): void Instructions Create an inheritance hierarchy that is: at least three levels deep (one parent class, two child classes, one child class of one the child classes) shares at least one property through all levels has at least one property or method that is modified inside of each child class Incomplete Example: A parent class called person contains a name, a type, and a pointOfContact. Methods exist to get and set each of these fields. From this parent class is derived a child class called student. It contains the same information: a name, a type, and a pointOfContact. However, the student class also requires a GPA field. The setType method will be limited to containing [Freshman | Sophomore] and the type can only change from Freshman to Sophomore. It will not normally change from Sophomore to Freshman. Person Student -name: String -type: String -pointOfContact: String getName(): String -setName(): void -getType(): String -setType(): void -getPOCO): String -setPOCO): void Aname: String Atype: String pointOfContact: String -GPA: double getName(): String setname(): void "getType(): String setType(): void getPOC(): String -setPOCI): void +getGPA(): Double +freshToSoph(): void

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

Databases DeMYSTiFieD

Authors: Andy Oppel

2nd Edition

0071747990, 978-0071747998

More Books

Students also viewed these Databases questions

Question

Define two major standards: U.S. GAAP and IFRS.

Answered: 1 week ago

Question

Who will implement and maintain the project after launch?

Answered: 1 week ago

Question

analyze aesthetic enhancing design rules.

Answered: 1 week ago

Question

apply communication design concepts into creative projects.

Answered: 1 week ago