Question: Create a class called IS310Student. It has two methods: __init__ and speak. It also has two class attributes: classNum and finalAvg. The method or constructor

 Create a class called IS310Student. It has two methods: __init__ andspeak. It also has two class attributes: classNum and finalAvg. The method

Create a class called IS310Student. It has two methods: __init__ and speak. It also has two class attributes: classNum and finalAvg. The method or constructor _init__ constructs an object of IS310Student. It accepts three input parameters: aNum, name, finalScore. finalScore specifies the score on the final exam of the instance being created. The class attribute IS310Student.classNum keeps track of the number of IS310Student objects/instances created so far. IS310Student.finalAvg keeps track of the final average for all of the existing IS310Student objects. When the instance method speak() is invoked through an object, it will print out the data about that object. (100 points) Eile Edit View Navigate Code Help Project 3 | P1.py * classEx C:\Users\mokw\D. 1.py External Libraries 2 class IS310Student: classNum = 0; finalAvg = 0.0 3 4 5 def init__(self, aNum, name, finalscore): 6 7 9 10 11 12 13 def speak (self): 14 15 16 17 18 19 20 21 s1 = IS310 student ("A111", "April", 85) s1.speak() print("classNum = {0}, finalAvg = {1}". format (IS310Student.classNum, 15310Student. finalAvg) ) 32 = IS310Student ("A222", "Bill", 88) 32.speak() print("classNum = {0}, finalAvg = {1}".Format(IS310Student.classNum, IS310Student.finalAvg)) 33 = 1S310Student ("A333", "Cindy", 92) 33. speak() print("classNum = {0}, finalAvg = {1}".Format(IS310Student.classNum, IS310Student. finalAvg)) 34 = 15310Student ("A444", "Dave", 77) 34.speak() print("classNum = {0}, finalAvg = {1}".Format (15310Student.classNum, IS310Student. finalAvg)) 22 23 24 25 26 27 Run 1 My name is April and I scored 85 on the final classNum = 1, finalAvg = 85.0 My name is Bill and I scored 88 on the final classNum = 2, finalAvg = 86.5 My name is Cindy and I scored 92 on the final classNum = 3, finalAvg = 88.33333333333333 My name is Dave and I scored 77 on the final classNum = 4, finalAvg - 85.5 Process finished with exit code 0 4: Run Python Console HE

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!