Question: This is a C# program that's needed. 1. Create an abstract class Student.cs. Read page 329. 3 public string data members: firstName, lastName, studentID. Create

This is a C# program that's needed.

1. Create an abstract class "Student.cs". Read page 329.

3 public string data members: firstName, lastName, studentID.

Create a constructor to initialize each data member value.

Create read-only property for each data member. Read Page 329.

Create an abstract method "ImportantThing()", returns string.

2. Create an Interface "IMathClass.cs". Declare a method "Math()", returns string.

3. Create classes "ElementarySchoolStudent.cs", "MiddleSchoolStudent.cs", "HighSchoolStudent.cs", "CollegeStudent.cs", inherit "Student.cs" and "IMathClass.cs" to each of them.

ElementarySchoolStudent.cs o Constructor with three parameters for firstName, lastName, studentID. Read page 301.

o ImportantThing() returns "Farm field trip!".

o Math() returns "Basic Math."

o Override toString().

MiddleSchoolStudent.cs o Constructor with three parameters for firstName, lastName, studentID.

o ImportantThing() returns "Summer Camp!".

o Math() returns "Geometry."

o Override toString().

HighSchoolStudent.cs o Constructor with three parameters for firstName, lastName, studentID.

o ImportantThing() returns "SAT exam.".

o Math() returns "Basic Algebra."

o Override toString().

CollegeStudent.cs o Constructor with three parameters for firstName, lastName, studentID.

o ImportantThing() returns "Major.".

o Math() returns "Advanced Algebra.".

o Override toString().

4. In "Program.cs", in method "main()", create an "Student" type array with size of 4. Read page 321.

First element is ElementarySchoolStudent object with any first name, last name, student ID for constructor.

Second element is MiddleSchoolStudent object with any first name, last name, student ID for constructor.

Third element is HighSchoolStudent object with any first name, last name, student ID for constructor.

Fourth element is CollegeStudent object with any first name, last name, student ID for constructor.

for loop to go through array, call .toString for each object.

Student

FirstName

LastName

StudentID

abstract ImportantThing()

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!