Download Category:

Student - (420.93 KB)
Student CPP/Debug/
Student CPP/Debug/cl.command.1.tlog
Student CPP/Debug/
Student CPP/Debug/CL.write.1.tlog
Student CPP/Debug/
Student CPP/Debug/link.4712.write.1.tlog
Student CPP/Debug/
Student CPP/Debug/link.4712-cvtres.write.1.tlog
Student CPP/Debug/link.command.1.tlog
Student CPP/Debug/
Student CPP/Debug/link.write.1.tlog
Student CPP/Debug/
Student CPP/Debug/link-cvtres.write.1.tlog
Student CPP/Debug/mt.command.1.tlog
Student CPP/Debug/
Student CPP/Debug/mt.write.1.tlog
Student CPP/Debug/rc.command.1.tlog
Student CPP/Debug/
Student CPP/Debug/rc.write.1.tlog
Student CPP/Debug/Student CPP.exe
Student CPP/Debug/Student CPP.exe.embed.manifest
Student CPP/Debug/Student CPP.exe.embed.manifest.res
Student CPP/Debug/Student CPP.exe.intermediate.manifest
Student CPP/Debug/Student CPP.ilk
Student CPP/Debug/Student CPP.lastbuildstate
Student CPP/Debug/Student CPP.log
Student CPP/Debug/Student CPP.pdb
Student CPP/Debug/Student CPP.write.1.tlog
Student CPP/Debug/Student CPP_manifest.rc
Student CPP/Debug/Student.obj
Student CPP/Debug/vc100.idb
Student CPP/Debug/vc100.pdb
Student CPP/Question.txt
Student CPP/Screenshot_1.png
Student CPP/Student CPP.sln
Student CPP/Student CPP.suo
Student CPP/Student CPP.vcxproj
Student CPP/Student CPP.vcxproj.filters
Student CPP/Student CPP.vcxproj.user
Student CPP/Student.cpp

Create a class named Student that has three member variables:
• name – A string for the name of the student.
• numClasses – An integer for how many courses the student is currently enrolled in.
• classList – An array of strings for the names of the classes the student is enrolled in.
Write appropriate constructor(s), mutator (set), and accessor (get) methods for the class
along with the following:
• A function that inputs all values from the user, including the list of class names.
• A function that outputs the name and list of all courses.
• A function that resets the number of classes to 0 and the classList to an empty array
(with null strings).
The main() should test all of these functions. It should perform the following steps in a loop:
• It should ask the user to input a students data.
• Display the entered data back (in a well-formatted way).
• Ask the user if they want to enter the data again (y/n).
1• If ’n’, then the program ends, otherwise it should clear the student class object and
repeat the loop (ask the user to enter new data…).
Note: The statement ‘cin >> variable;’ leaves a newline character in the buffer. This can be
a problem if you are mixing ‘cin >> variable;’ and the ‘getline’ function (that reads a line
of input). Use ‘cin.ignore’ function to discard the newline character after using ‘cin’.
Filename: student.cpp

Write a Review

Get a fresh solution of this question. Ask it now to our experts.

Ask Your Question

We have verified professionals who are ready to answer your question.


Save Time and Money

We choose experts who can quickly answer your question and that suit your budget.


Get Your Answer

Your satisfaction is 100% guaranteed. You can keep on asking questions until you get the answer you need.