forked from itsaaditya96/Python-OO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStudent.py
35 lines (26 loc) · 1017 Bytes
/
Student.py
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
35
class Student :
def setstudentid(self, id1):
self.__studentid = id1
def setqualifyingexammarks(self, marks):
self.__qualifyingexammarks = marks
def setresidentialstatus(self, status):
self.__residentialstatus = status
def setyearofengg(self, year):
self.__yearofengg = year
def getstudentid(self):
return self.__studentid
def getqualifyingexammarks(self):
return self.__qualifyingexammarks
def getresidentialstatus(self):
return self.__residentialstatus
def getyearofengg(self):
return self.__yearofengg
objstu = Student()
objstu.setstudentid(1001)
objstu.setqualifyingexammarks(40.00)
objstu.setresidentialstatus("Hostel")
objstu.setyearofengg(2019)
print("Student Id : ", objstu.getstudentid())
print("Qualifying Exam Marks : ",objstu.getqualifyingexammarks())
print("Residential Status : ",objstu.getresidentialstatus())
print("Year of Engg. : ",objstu.getyearofengg())