Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Create a class called Course with the following attributes: a. String cno, b. int credits c. Course() - default constructor d. Course(string, int) -

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

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

Database Systems Design Implementation And Management

Authors: Peter Robb,Carlos Coronel

5th Edition

061906269X, 9780619062699

More Books

Students also viewed these Databases questions