代写C代码 代做C程序 C辅导 C家教

远程写代码 Debug 讲解答疑 不是中介,本人直接写

微信: ittutor QQ: 14061936 Email: ittutor@qq.com

导航

  Problem: In this problem, you will print information on 15 People. However, 10 of the People are actually Students and 5 of the Students are actually Alums. That is, you will have:

·         Five strictly People objects;

·         Five strictly Student objects; and

·         Five strictly Alum objects.

 

The following UML Class Diagram summarizes what parameters and methods each class should have and which classes extend which. Note that each class defines its own display method; that is, Student overrides the display method of Person and Alum in turn overrides the display method of Student.

 

 

The display methods should print output that looks something like:

Person

Student

Alum

I am a Person.

First Name: <firstName>

Last Name: <lastName>

I am a Student.

First Name: <firstName>

Last Name: <lastName>

800-Number: <studentId>

Major: <major>

Minor: <minor>

I am an Alum.

First Name: <firstName>

Last Name: <lastName>

800-Number: <studentId>

Major: <major>

Minor: <minor>

Degree Earned: <degreeEarned>

 

In the PersonTest class, in the main method, you will:

·         initialize an array for 15 People objects;

·         initialize the first 5 elements of the array as new People objects;

·         initialize the next 5 elements of the array as new Student objects;

·         initialize the last 5 elements of the array as new Alum objects; and

·         finally call the display method for each element in the array.

 

 

Note: Keep in mind that each class, other than PersonTest of course, should have at least one constructor and, optionally, getters and setters.

 

GRADING:

·         5 pts: group report

·         3 pts: brief description

·         3 pts: inline and method comments

·         2 pts: readability

·         6 pts: proper classes (Person, Student, Alum, and extending)

·         3 pts: proper output (display methods and overriding)

·         3 pts: compilation and execution

相关推荐