Question 9: Consider the following: Class Course { protected: long CRN public: Course( long c ); }; // end of class #include #include "Courses.h" using namespace std; Class Student { private: const string university; string name; long studID ; vector stdCourses ; static int totalStudents; Public: Student (); Student string uni,string n, long id, vector c ); }; // end of class //Write the Default constructor here: (everytime a Student is created, total llstudents increases by one) IWrite the Overloaded constructor here: (everytime a Student is created, total llstudents increases by one) // Instantiate the static variable totalStudents to 100 like you would in your /Student.cpp file here // Create an object of type Student using default constructor here // Create an object of type Student using overloaded constructor here /Write a void add To Courses ( Course c ) function that will add to student's vector lof Courses

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter12: Adding Functionality To Your Classes
Section12.4: Class Inheritance And Polymorphism
Problem 5E
icon
Related questions
Question
Question 9: Consider the following:
Class Course
{
protected:
long CRN
public:
Course( long c );
}; // end of class
#include <string>
#include "Courses.h"
using namespace std;
Class Student
{
private:
const string university;
string name;
long studID ;
vector<Course> stdCourses ;
static int totalStudents;
Public:
Student ();
Student string uni,string n, long id, vector<Courses> c );
}; // end of class
//Write the Default constructor here: (everytime a Student is created, total
llstudents increases by one)
Transcribed Image Text:Question 9: Consider the following: Class Course { protected: long CRN public: Course( long c ); }; // end of class #include <string> #include "Courses.h" using namespace std; Class Student { private: const string university; string name; long studID ; vector<Course> stdCourses ; static int totalStudents; Public: Student (); Student string uni,string n, long id, vector<Courses> c ); }; // end of class //Write the Default constructor here: (everytime a Student is created, total llstudents increases by one)
IWrite the Overloaded constructor here: (everytime a Student is created, total
llstudents increases by one)
// Instantiate the static variable totalStudents to 100 like you would in your
/Student.cpp file here
// Create an object of type Student using default constructor here
// Create an object of type Student using overloaded constructor here
/Write a void add To Courses ( Course c ) function that will add to student's vector
lof Courses
Transcribed Image Text:IWrite the Overloaded constructor here: (everytime a Student is created, total llstudents increases by one) // Instantiate the static variable totalStudents to 100 like you would in your /Student.cpp file here // Create an object of type Student using default constructor here // Create an object of type Student using overloaded constructor here /Write a void add To Courses ( Course c ) function that will add to student's vector lof Courses
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning