Question: 1. Create a class called Course with the following attributes: a. String cno, b. int credits c. Course() - default constructor d. Course(string, int) -
1. Create a class called Course with the following attributes: a. String cno, b. int credits c. Course() - default constructor d. Course(string, int) - overloaded constructor e. disp() - outputs cno and credits f. Accessors g. Mutators 2. Create a class called Section that inherits Course class with following attributes: a. String sno, b. String room, c. Section() - default constructor d. Section(string, string) - overloaded constructor e. Section(string, int, string, string) - calls the base class constructor with the first two parameters. f. disp() - outputs sno and room g. Accessors h. Mutators 3. Create a main function a. Instantiate a Class object called c1; call disp() member b. Instantiate a Class object called c2 with "CSC211",3 as overload parameters; call disp() member c. Instantiate a Section object called s1; call disp() member d. Instantiate a Section object called s2 with "0900", "F908" as overload parameters; call disp() member e. Instantiate a Section object called s3 with "CSC111",4,"1200","F907" as overload parameters with the first two items for overloaded base object. f. Modify the Section class to include disp2() to display all of the attributes of base and derived class objects
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
