Answered step by step
Verified Expert Solution
Link Copied!

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 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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases DeMYSTiFieD

Authors: Andy Oppel

2nd Edition

0071747990, 978-0071747998

More Books

Students also viewed these Databases questions