Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using c++ Exercise: Define a class called Student. This class has the following private data members: - A string variable called name which contains the

image text in transcribed

using c++

Exercise: Define a class called Student. This class has the following private data members: - A string variable called name which contains the student name. - An integer variable for student ID. - A dynamic array of doubles for student courses grades in the current semester. Provide the following public member functions: a) A constructor that takes an argument the size of the grades array, the student name and ID as arguments, and it prompts the user to enter the grades. b) Take care of all dynamic memory stuff. c) Function called "Print" which prints all private data members' values. Create a class called Course. The private data members of this class include the following: - A string variable called name which contains the name of the course. - A dynamic array of doubles that includes the grades taken in the course. - A dynamic array of objects from class Student which contains all Students in this course. - The size of these arrays can be determined by the constructor. - An integer variable that contains the number of added students in the course. Provide the following public member functions: a) Default constructor for the class. b) Destructor that frees all dynamically allocated memory when the object is destroyed. c) Overloading of the assignment operator. d) Insert: add a student and its grades in the course to the array of students and grades to a specified location in these arrays (i.e. takes the student object and the grade as parameters); it can be added to the list where the first value to store will be stored at location 0 and so on. e) Remove: takes the index as input and remove the student info stored at that index in the list. Make sure to resort the list since a value has been removed and all values must be stored at contiguous locations. f) isEmpty: returns true if the list is empty and false otherwise. g) isFull: returns true if the list is full and false otherwise. Write a driver program to test your class (make sure to test all the member functions inside your class). Test all functions in both classes

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

Oracle Autonomous Database In Enterprise Architecture

Authors: Bal Mukund Sharma, Krishnakumar KM, Rashmi Panda

1st Edition

1801072248, 978-1801072243

More Books

Students also viewed these Databases questions

Question

Ty e2y Evaluate the integral dy

Answered: 1 week ago

Question

Was there an effort to involve the appropriate people?

Answered: 1 week ago