Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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"
maxnum: 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 maxnum
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 coursecodes. void addcourse string newcoursecode;
Set and get methods for maxnum data member. assign a maxnum value that is between and
create a copyObject methode void copyStudentObjStudent 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 stdstd
add course code to list of coursecodes of std using addcoursemethod; enter these codes cscsitcoe
copy the values of std to std using copyStudentObj Method.
print the details of the std object.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started