Question: class course { int courseNumber; int creditHours; public: void setCourse (int x,int y); }; class section { int secNumber; course c;//composition public: void setSection (int,int,int);

class course

{

int courseNumber;

int creditHours;

public:

void setCourse (int x,int y);

};

class section

{

int secNumber;

course c;//composition

public:

void setSection (int,int,int);

};

we have to Provide a meaningful implementation for class course and section.

and Write main program that declares an array of 7 objects of type section and set their values:

oCourse number: 117 for all sections.

oCredit hours: 3 for all sections.

oSection number: give each section a unique number from 1-7.

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 Programming Questions!