Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write The C++ Code To Implement Four Classes According To The Following Requirements: se private: string ID string title int credits public: void printCourseInfo() Il

Write The C++ Code To Implement Four Classes According To The Following Requirements:

se private: string ID string title int credits public: void printCourseInfo() Il displays the Course's three private attributes Class Constructor: a constructor that is used to fill the data of the Course's three private attributes. Class CourseSection as a derived class of the base class Course with the following description: CourseSection private: int sectionSize I/Number of students enrolled in the section Student *roster // will be used to store a list of Student objects representing the l/students enrolled in the section. No need for this list to be sorted Student* *sortedNames //to store a list of pointers to the Student objects in roster. Student* *sortedAges //to store a list of pointers to the Student objects in roster. Student* *sortedGPAs //to store a list of pointers to the Student objects in roster. void sortNames() Ilarrange the pointers in sortedNames to access the students' I/records in an alphabetical order of their name. void sortAges() Ilarrange the pointers in sortedAges to access the students' I/records in an ascending order of their age. void sortGPAs() Ilarrange the pointers in sorted GPAs to access the students' I/records in a descending order of their gpa. public: void fillrosterInfo(ifstream *rf) /reads the info of all students in the section from the text file through its I/file stream pointer rf by calling readStudentInfo(ifstream* sf). //Reads the info in the o

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

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions