Question: Can you help me with this part in C# ? Thank you Create a class called Relation that has one attribute: RelationshipType: values can be

Can you help me with this part in C# ? Thank you

Create a class called Relation that has one attribute:

RelationshipType: values can be Sister, Brother, Mother or Father

Ensure the Relation class has the following method:

ShowRelationShip: accepts two Person objects and displays the relationship between them

Create a Main class.

Create four objects using the following data:

personId

firstName

lastName

favoriteColour

age

isWorking

1

Ian

Brooks

Red

30

Yes

2

Gina

James

Green

18

No

3

Mike

Briscoe

Blue

45

Yes

4

Mary

Beals

Yellow

28

Yes

Create two Relation Objects that show that Gina and Mary are sisters, and that Ian and Mike are brothers. Then, display both relationships.

Add all the Person objects to a list, and then use the list to display the following:

The average age of the people in the list

The youngest person and the oldest person

Sample Run

2: Gina Jamess favorite colour is Green

PersonId: 3

FirstName: Mike

LastName: Briscoe

FavoriteColour: Blue

Age: 45

IsWorking: True

1: Ian Brookss favorite colour is: White

Mary Bealss Age in 10 years is: 38

Relationship between Gina and Mary is: Sisterhood

Relationship between Ian and Mike is: Brotherhood

Average age is: 30.25

The youngest person is: Gina

The oldest person is: Mike

PersonId: 3

FirstName: Mike

LastName: Briscoe

FavoriteColour: Blue

Age: 45

IsWorking: True

PersonId: 4

FirstName: Mary

LastName: Beals

FavoriteColour: Yellow

Age: 28

IsWorking: True

PersonId: 3

FirstName: Mike

LastName: Briscoe

FavoriteColour: Blue

Age: 45

IsWorking: True

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!