Lecture 14 Encapsulation
Lecture 14 Encapsulation
+SetAge(int age)
+ intGetAge()
+Get/SetName
+Get/SetSalary
Example 3.
Write a program in C++ to display marksheet of the student. Definea class Student that
contains data members to store student information like name,Branch,semester, marks in 6
different subjects,etc. Declare some member functions to get this information from the
keyboard, to calculate result and to display all gathered information on to the computer
screen in proper format.