Question: can anyone solve this question please? *Edit: I have attached all the information given to me. The pictures of the codes are supposed to be
can anyone solve this question please?
*Edit: I have attached all the information given to me. The pictures of the codes are supposed to be helpful tips.




Programming Exercises 1. (Design a class for modelling courses) Suppose you need to process the information for a series of courses. Each course has a name and a number of students who take the course. You should be able to add/drop a student to/from the course. You can use a class to model the courses, as follows: Course -courseName: string -students: string* -numberOfStudents: int -capacity: int +Course (courseName: string&, capacity: int) +-Course) +getCourseName(): string const +addStudent (name: string&): void +dropStudent (name: string&): void +getStudents(): string* const +getNumberOfStudents(): int const The name of the course. An array of students who take the course. students is a pointer for the array. The number of students (default: 0). The maximum number of students allowed for the course. Creates a Course with the specified name and maximum number of students allowed. Destructor Returns the course name. Adds a new student to the course. Drops a student from the course. Returns the array of students for the course. Returns the number of students for the course. The program source code (Course.h, Course.cpp, TestCourse.cpp) nas been partly completed and is available on the VLE. There are some missing lines in the files (marked in the comments). Fill in the missing blocks of code to complete the program, then test it. An example of the output: Number of students in Data Structures: 0 Number of students in Database Systems: 0 Number of students in Data Structures: 3 Peter Jones, Brian Smith, Anne Kennedy Number of students in Database Systems: 2 Peter Jones, Steven Smith Number of students in Data Structures: 2 Brian Smith, Anne Kennedy Student Anne Kennedy is not on the Database Systems course - 1 DK pass-to-function.cpp - Code::Blocks 20.03 File Edit View Search Project Build Debug Fortran wxSmith Tools Tools+ Plugins DoxyBlocks Settings Help X = 49 C- 45: 4. Il li
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
