Question: Write a program in C++ that defines a class called Student and private fields are studentId type interget, studentName of type string and cgpa type
Write a program in C++ that defines a class called Student and private fields are “studentId” type interget, ”studentName” of type string and ”cgpa” type of double. The class also has setter and getter methods and display function to prints the student information. Use this keyword to set and get the values of member variables.
Step by Step Solution
3.45 Rating (165 Votes )
There are 3 Steps involved in it
include include using namespace std declare class Student class Student private data members int ... View full answer
Get step-by-step solutions from verified subject matter experts
