Python Inheritance

I’m studying and need help with a Python question to help me learn.

you will modify the Department and Student Classes in A3 to use inheritance. Specifically, a generic ‘Person’ class will be created to hold basic things about a person. The Student class, and a new class named ‘Faculty’, will be created as subclasses to Person.

Student and Faculty will inherit the above and be defined as follows: Student: inherits all Person attributes, but adds status, major, enrolled, credits, and qpoints (same as A2) Faculty: inherits all Person attributes, but adds rank, active, teach_load, specialty, funding Student and Faculty both inherit the new samePerson method that does exactly what sameStudent does, except for a generic Person object Student uses the Person constructor, but adds its own attribute definitions as defined in A2, specifically major, enrolled, credits, and qpoints. Faculty uses the Person constructor, but adds its own attribute definitions as follows

Student and Faculty both override the __str__ method as follows: Student returns the string ‘Student: ‘ run the parent “__str__” + status + major’ (“super().__str__”) Faculty returns the string ‘Faculty: ‘ run the parent “__str__” + rank + specialty Department must be modified to track the roster of students and faculty and implement a separate addFaculty method. It will also use the samePerson() method instead of sameStudent(). It is permissible to define two rosters, one each for faculty and students, and an addFaculty method apart from the addStudent method. However, use your best judgment as to how to implement these. The ‘printRoster’ method can be made generic by adding a parameter, ‘s’ or ‘f’, to determine which roster to print. To create and test the Department, Person, Student, and Faculty classes do the following: 1. A lot of the previously created Department and Student code from A3 will be reused. Create Department and Student objects as you did for A3, except the Student class objects (Person subclass) have inherited characteristics of the Person class. Create the new Faculty objects as a Person subclass and create some Faculty objects . 2. Within the program, create and print enough objects of all types to test and demonstrate the class capabilities Probably 2 or 3 Department, 6 Faculty, and 10 students are adequate. 3. Add each of the created students into one of the three Department class objects using the ‘addStudent’ method 4. Likewise add each created faculty into one of the department’s using the ‘addFaculty’ method. 5. Use the printRoster method to display a list of students in that department and faculty. The program should include code to use the above classes and methods and produce an output log to show the creation and testing activities. Enough activities should be executed and displayed to show the capabilities of the various classes. The GTA will judge the adequacy of this test code, so err on the side of testing too much.

  • Best Nursing Writers
  • Best Nursing Writing Company
  • Buy a Nursing Essay
  • Capstone Project Writing Services
  • CHEAP NURSING ASSIGNMENTS
  • Cheap Thesis Writing Nurses
  • Community Health
  • Course Work
  • Document Formatting Services
  • Family Health Nursing
  • Fundamentals of Nursing
  • Geriatrics
  • GRADUATES CAPSTONE PROJECT
  • Health & Human Ecology
  • Human Bio-Sciences
  • Human Physiology
  • Industry Warning and Guidance!
  • Legit Nursing Writing Company
  • Medical Writing Services
  • Mental Health & Psychiatry
  • Nursing Assignment Help
  • Nursing Bibliography
  • Nursing Case Study
  • Nursing Coursework Help
  • Nursing Dissertation Writing Services
  • Nursing Essay/Personal Statement
  • Nursing Essays
  • Nursing Freelance Writers
  • Nursing Practitioners
  • Nursing Report Writing
  • Nursing Surgery
  • Nursing Term Paper Writing
  • Nursing Thesis Writing

©  2020 Nursingpaperspros.com