Exercise-1: Write a program based on the given criteria below: 1- Creates a class Student with 3 attributes: name, id an

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Exercise-1: Write a program based on the given criteria below: 1- Creates a class Student with 3 attributes: name, id an

Post by answerhappygod »

Exercise 1 Write A Program Based On The Given Criteria Below 1 Creates A Class Student With 3 Attributes Name Id An 1
Exercise 1 Write A Program Based On The Given Criteria Below 1 Creates A Class Student With 3 Attributes Name Id An 1 (146.85 KiB) Viewed 39 times
Exercise-1: Write a program based on the given criteria below: 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 getld and getLevel; C. Add the method display able to display the attributes, 2- Creates a class Student PhD extending the class Student with two more attributes: specialty and supervisor Name; 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: 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 PhD Student. 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; 29 Page b. overload the operator += (PhDStudent): able to add a PhD Student 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 PhD Strudent; c. Creates a College; d. Add all previous Students and PhD Students to the College; e. Find a PhdStudent by his supervisor's name; f. Display the College;
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply