Question

From the Examples in this module that I have posted, Write a class called ‘Student’ inheriting...

From the Examples in this module that I have posted, Write a class called ‘Student’ inheriting ‘Person’ class with the following properties and methods

  1. Degree
  2. GPA
  3. Getters and Setters

Write another class called ‘Faculty’ inheriting ‘Employee’ with the following properties and methods

  1. Department
  2. Specialization
  3. Getters and setters.

(customer.py has the classes you need)

*** IN PYTHON PLEASE***

Homework Answers

Answer #1

from customer import *#import the customer module
class Student(Person):
Degree=None
GPA=None
def __init__(self,d,g):
self.Degree=d
self.GPA=g
  
def getDegree(self):#getters and setter methods
return self.Degree
  
def getGPA(self):
return self.GPA
  
def setDegree(self,d):
self.Degree=d
  
def setGPA(self,g):
self.GPA=g
  
class Faculty(Employee):
Department=None
Specialization=None
def __init__(self,d,s):#constructor of class
self.Department=d
self.Specialization=s
  
def getDepartment(self):#getters and setter methods
return self.Department
  
def getSpecialization(self):
return self.Specialization
  
def setDepartment(self,d):
self.Department=d
  
def setSpecialization(self,s):
self.Specialization=s

Screenshots:

The screenshots are attached below for reference.

Please follow them for proper indentation.

Please place the customer.py module and this module in same folder.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Create a class called Student. Include the following instance variables: name, address, phone, gpa Create all...
Create a class called Student. Include the following instance variables: name, address, phone, gpa Create all of the methods required for a standard user defined class: constructors, accessors, mutators, toString, equals Create the client for testing the Student class (5 points extra credit) Create another class called CourseSection (20 points extra credit) Include instance variables for: course name, days and times course meets (String), description of course, student a, student b, student c (all of type Student) Create all of...
Project 2 statement Please write this in JAVA. Please read this entire statement carefully before you...
Project 2 statement Please write this in JAVA. Please read this entire statement carefully before you start doing anything… This project involves implementing a simple university personnel management program. The program contains two different kinds of objects: students and faculty. For each object, the program stores relevant information such as university ID, name, etc. Different information is stored depending on the type of the object. For example, a student has a GPA, while a faculty has a title and department...
1. Consider the following interface: interface Duty { public String getDuty(); } a. Write a class...
1. Consider the following interface: interface Duty { public String getDuty(); } a. Write a class called Student which implements Duty. Class Student adds 1 data field, id, and 2 methods, getId and setId, along with a 1-argument constructor. The duty of a Student is to study 40 hours a week. b. Write a class called Professor which implements Duty. Class Professor adds 1 data field, name, and 2 methods, getName and setName, along with a 1-argument constructor. The duty...
This program is in C++: Write a program to allow the user to: 1. Create two...
This program is in C++: Write a program to allow the user to: 1. Create two classes. Employee and Departments. The Department class will have: DepartmentID, Departmentname, DepartmentHeadName. The Employee class will have employeeID, emploeename, employeesalary, employeeage, employeeDepartmentID. Both of the above classes should have appropriate constructors, accessor methods. 2. Create two arrays . One for Employee with the size 5 and another one for Department with the size 3. Your program should display a menu for the user to...
I've posted this question like 3 times now and I can't seem to find someone that...
I've posted this question like 3 times now and I can't seem to find someone that is able to answer it. Please can someone help me code this? Thank you!! Programming Project #4 – Programmer Jones and the Temple of Gloom Part 1 The stack data structure plays a pivotal role in the design of computer games. Any algorithm that requires the user to retrace their steps is a perfect candidate for using a stack. In this simple game you...
Write a Python 3 program called “parse.py” using the template for a Python program that we...
Write a Python 3 program called “parse.py” using the template for a Python program that we covered in this module. Note: Use this mod7.txt input file. Name your output file “output.txt”. Build your program using a main function and at least one other function. Give your input and output file names as command line arguments. Your program will read the input file, and will output the following information to the output file as well as printing it to the screen:...
please choose and write true answer only and quickly?? The key elements of domestic violence are...
please choose and write true answer only and quickly?? The key elements of domestic violence are all of the following except:       Apology.    Intimidation. Physical injury.     Humiliation. ********* Nurse Angela is working in the emergency department of Medical Center. She is conducting an interview with a victim of spousal abuse. Which step should the nurse take first? Establish a rapport with the victim and the abuser. Request the presence of a security guard Ensure privacy for interviewing...
What are 4 key things you learned about the topic from reading their paper? How does...
What are 4 key things you learned about the topic from reading their paper? How does the topic relate to you and your current or past job? Critique the paper in terms of the organization and quality. Team 3 answer questions above. Part I In today’s world we see fear among people when dealing with sexual harassment. This leads to people not reporting sexual harassment. A misconception about sexual harassment is that it’s only about touching and forcing other people...
Please check all my grammar, sentence structure, punctuation, transional words, verbs, topic sentences, etc. Please correct...
Please check all my grammar, sentence structure, punctuation, transional words, verbs, topic sentences, etc. Please correct like a strict teacher. Thank you very much for your help. There are few traits she looking for in the new leader and manager. She’s looking for people that open to learning, flexible, go above and beyond and learn to step outside their comfort zone no matter how difficult it may be. She wants people to take the initiative, she wants them to ask...
As you saw from the lab PowerPoint slides last week, you will be doing a research...
As you saw from the lab PowerPoint slides last week, you will be doing a research study looking at ‘Aggression Priming” for your first paper. For this week’s discussion, I want you to discuss with your group what you think this study is about. What is the hypothesis? What theory does it come from? What do you predict will happen (do you expect something different than the hypothesis in the researcher instructions? If so, what and why?)? Do you think...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT