Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ Create a class called Student. Each student should have a name and ID number (an int). They should also have a ptr to a
C++
Create a class called Student. Each student should have a name and ID number (an int). They should also have a ptr to a dynamic array called Grades. The public methods for Student should be: getName, setName, getID, setID, setGrades, getGrades. In the constructor you should initialize Grades to be an array of size 4 with the values 0 for each position. Make sure that you use THIS properly. Show that when you create Student1 and Student2, when you assign grades to one it effects the other equally.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started