Question: Define a class named Student which has 4 Data members std ID: a string type Course codes: a string array with a unlimatied size, to

Define a class named Student which has 4 Data members
std ID: a string type
Course codes: a string array with a unlimatied size, to save all Course codes registered to the student . "dynamic array"
max_num: an integer type. represent the maximum number of Course that available for each student.
course num: an integer type. represent the number of Course registered currently.
and create the following methods:
Default constructor to the class, with course num =0, max_num =5.
a parametrize
constructor Student (string studentid, int maximumnumberofcourse); You have to assign a default arguments for all parameters and deal with it ;
a destructor for your class
a method that shows a Student's information. void displayStudentInfo();
a method bool findCourseCode( string codeofcourse) :that returns true when the course is already included to the registered courses.
a method to add a course code to list of course_codes. void addcourse( string newcoursecode);
Set and get methods for max_num data member. ( assign a max_num value that is between 2 and 8)
create a copyObject methode , void copyStudentObj(Student another)// that copy values of data members in an another object to the corresponding data members inside the current object.
Test your software in the main function:(open deriver file main.cpp)
Creates two Student objects std1,std2
add course code to list of course_codes of std1. using addcoursemethod; enter these 4codes [cs181.cs182,it214,coe121]
copy the values of std1 to std2, using copyStudentObj Method.
print the details of the std2 object.
 Define a class named Student which has 4 Data members std

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!