Question: In main.py define the Student class that has three attributes: name, id , and gpa In main.py define the Student class that has three attributes:
In main.py define the Student class that has three attributes: name, id and gpa In
main.py define the Student class that has three attributes: name, id and gpa
Implement the following instance methods:
A constructor that sets name to "Louie", id to and gpa to
setname self name set student's name to parameter name
getname self return student's name
setidself id set student's id to parameter id
getidself return student's id
setgpaself gpa set student's gpa to parameter gpa
getgpa self return student's gpa
Ex If a new Student object is created, the default output is:
Louie
Ex If the student's name is set to "Felix", id is set to and the gpa is set to the output becomes:
Felix
Implement the following instance methods:
A constructor that sets name to "Louie", id to and gpa to
setnameself name set student's name to parameter name
getnameself return student's name
setidself id set student's id to parameter id
getidself return student's id
setgpaself gpa set student's gpa to parameter gpa
getgpaself return student's gpa
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
