Question: Using python: In-lab assignment # 3 Topics: class, object, instantiation, basic inheritance Due: in lab Problem Statement The purpose of this lab assignment is to

Using python:
 Using python: In-lab assignment # 3 Topics: class, object, instantiation, basic

In-lab assignment # 3 Topics: class, object, instantiation, basic inheritance Due: in lab Problem Statement The purpose of this lab assignment is to gain experience in python's inheritance feature Lab Scenario: 1. You are given a base dlass called Faculty. You are going to implement one child dlass called Principal. 2. The parent class has three methods: a. init (self, name): this method takes one parameter, name of the faculty b. average(self, rating1, rating2, rating3): This method takes three integer values ranging from 0-10 and calculates average rounded to two decimal points cstr (self): this method prints the information 3. Your Task: You need to define two methods in Principal class:it and 'ratings Please see below name of the principal. You can choose to use super) to cll the super class method people skills, speaking skills. They range from 0-10. Example a. init(self, name): which will initialize the super class init method with b. ratings(self: Asks user for input in three areas of rating: managements skills, Rating for the Principal: Management skills: S People skills:8 Speaking skills: 6 4. You need to define a main) function and considering the definition of the parent class main() function: A sample main steps can be as follows i. Take name of Principal and creating a principal object with that name li. Invoke ratings) to get user input i Invoke str 0 to print the details i. FYI, Subclass will have access to all the methods and attributes of the parent class Sample input/output Enter name of faculty: Obama Rating for the Principal: Management skills: S9 People skills: 10 Speaking skills: 9 Details of the faulty: Obama with a rating of 9.33

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!