Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(1-a) Write a class definition that stores and manipulates anobject called stude

ID: 3612620 • Letter: #

Question

(1-a) Write a class definition that stores and manipulates anobject called student.
Provide public function that allow us to change the student's name(changeName),
that allow us to change the student's total number of points in theclass (writeScore),
that return the student's current score (readName) , and
that calculates and returns the percentage score (getPercent).
Include the data members of this class, and use the const keywordwherever possible.

(1-b) for the above class, do you need to write your owndestructor, copy constructor, and operator= function, or will thatdefault functions suffice? Why or Why not?




Explanation / Answer

//Hope this will help you. #include using namespace std; class student{ private: string name; double score ; double total; public: student(string n,double s){ name=n; score=s; total=10; } student(){ name=""; score=-1; } void changeName(string s){ name = s; } void writeScore(double s){ score=s; } string readName(){ return name; } double readScore(){ return score; } double getPercent(){ double per; per = score*100/total; return per; } }; int main() {        student s("name",8),s1;        s1=s;        cout