-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStudent.h
More file actions
34 lines (31 loc) · 868 Bytes
/
Student.h
File metadata and controls
34 lines (31 loc) · 868 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//L1F24BSAI0078 M ILYAS header file
#pragma once
#include <string>
using namespace std;
class Student {
private:
string name;
int age;
int rollno;
float gpa;
public:
// constructors declaration
Student(); // default constructor
Student(string n, int a, int r, float g = 0.0); // Parameterized constructor
Student(string n, int a);// 2 Parameter constructor
// destructor
~Student();
// setters encapsulation
void setName(string n);
void setAge(int a);
void setRollno(int r);
void setGpa(float g);
// getters encapsu...
string getName();
int getAge();
int getRollno();
float getGpa();
// methods/functions
void displayInfo(); // display method
void calGrade(); // calculation method for gpa
};