Question: hMake a file called modHuman.py call the class student. Then create another folder called testStudent the class must work with code. Your Turn: Student Class

hMake a file called modHuman.py

call the class student.

hMake a file called modHuman.py call the class student. Then create another

Then create another folder called testStudent the class must work with code.

folder called testStudent the class must work with code. Your Turn: Student

Your Turn: Student Class Class Student ATTRIBUTES: -lastName: str -firstName: str -gpa: float METHODS: >Student(last:str; first:str; gpa: float) +setLastName(int): void #doesn't return anything +setFirstName(str):void #doesn't return anything +setGPA(float):void #doesn't return anything +getLastName(): str #returns a string +getFirstName(): str #returns a string +getGPA():float #returns a float +str(): str #returns a string from modPerson import s1 = Student("Jones", "Joe", 3.5); print("Student 1:", s1) s1.setLastName "Johnson") print("Student 1 after changing last name: ", s1) I s2 = Student("Smith", "Sue", 4.0); print("Student 2:, s2) print("Student 2 First Name: ", s2.getFirstName()) s2.setGPA(3.1) print("Student 2 after changing GPA:, s2.getGPA)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!