Solve as C++ Code please:  1- Creates a class Student with 3 attributes: name, id and level. a. Add a constructor able to create a Student; b. Add the methods getId and getLevel; c. Add the method display able to display the attributes, 2- Creates a class StudentPhD extending the class Student with two more attributes: specialty and supervisorName; a. Add a constructor to create a StudentPhd b. Add a display method: display need to override (polymorphism) the previous display method of Student class; 3- Creates a class called College with 6 attributes: a. maxStud: a maximum number of Student into the college; b. nbStud: the current number of Student into the college. When a College is created, the number nbStud is equal to 0; c. Student Stud[]: an array of Student. The size of this array is equal to maxStud; d. maxPhdStud: a maximum number of PhDStudent into the college; e. nbPhdStud: the current number of PhDStudent into the college. When a College is created, the number nbPhDStud is equal to 0; f. Student PhdStud[]: an array of PhDStudent. The size of this array is equal to maxPhdStud. Add the following methods: a. add(Student): able to add a Student to the College. The Student will be added to the Stud array if there are an available space; b. overload the operator += (PhDStudent): able to add a PhDStudent to the College. The PhDStudent will be added to the PhdStud. You need to be sure that an available space exits (uses the function assert ); c. find(supervisorName): this method allows to find a PhDStudent by his SupervisorName. If it exists, the PhDStudent will be displayed, else, am error message will be dsplayed; d. display: this method aims to display all the Students and PhDStudents existing into the college; 4- Creates a function main to test the program: a. Creates two Student; b. Creates two PhDStrudent; c. Creates a College; d. Add all previous Students and PhDStudents to the College; e. Find a PhdStudent by his supervisor's name; f. Display the College

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 5PE: Using classes, design an online address book to keep track of the names, addresses, phone numbers,...
icon
Related questions
Question

Solve as C++ Code please: 

1- Creates a class Student with 3 attributes: name, id and level. a. Add a constructor able to create a Student; b. Add the methods getId and getLevel; c. Add the method display able to display the attributes, 2- Creates a class StudentPhD extending the class Student with two more attributes: specialty and supervisorName; a. Add a constructor to create a StudentPhd b. Add a display method: display need to override (polymorphism) the previous display method of Student class; 3- Creates a class called College with 6 attributes: a. maxStud: a maximum number of Student into the college; b. nbStud: the current number of Student into the college. When a College is created, the number nbStud is equal to 0; c. Student Stud[]: an array of Student. The size of this array is equal to maxStud; d. maxPhdStud: a maximum number of PhDStudent into the college; e. nbPhdStud: the current number of PhDStudent into the college. When a College is created, the number nbPhDStud is equal to 0; f. Student PhdStud[]: an array of PhDStudent. The size of this array is equal to maxPhdStud. Add the following methods: a. add(Student): able to add a Student to the College. The Student will be added to the Stud array if there are an available space; b. overload the operator += (PhDStudent): able to add a PhDStudent to the College. The PhDStudent will be added to the PhdStud. You need to be sure that an available space exits (uses the function assert ); c. find(supervisorName): this method allows to find a PhDStudent by his SupervisorName. If it exists, the PhDStudent will be displayed, else, am error message will be dsplayed; d. display: this method aims to display all the Students and PhDStudents existing into the college; 4- Creates a function main to test the program: a. Creates two Student; b. Creates two PhDStrudent; c. Creates a College; d. Add all previous Students and PhDStudents to the College; e. Find a PhdStudent by his supervisor's name; f. Display the College

 

Solve as C++ Code Please.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 6 images

Blurred answer
Knowledge Booster
Data members
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning