Last active
November 23, 2016 20:36
-
-
Save s2t2/7a4a55bbe81d2eb35f32eba2a53b99ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Employee: | |
def __init__(self, name, number): | |
self._name = name | |
self._number = number | |
#employee = Employee("Mike", "123") | |
#print(employee._name, employee._number) | |
class Supervisor(Employee): | |
def __init__(self, name, number, annual_salary, bonus): | |
Employee.__init__(self, name, number) | |
self._annual_salary = annual_salary | |
self._bonus = bonus | |
#supervisor = Supervisor("Bruno", "456", 2, 8.50) | |
#print(supervisor._name, supervisor._number, supervisor._annual_salary, supervisor._bonus) | |
print("----------------") | |
print("SUPERVISORS APPLICATION") | |
print("-----------------") | |
name = input("Please input the supervisor's name (e.g. 'Bruno'): ") | |
number = input("Please input the supervisor's ID number (e.g. '789'): ") | |
salary = int(input("Please input the supervisor's annual salary (e.g. '50000'): ")) # convert sting input to integer! | |
bonus = int(input("Please input the supervisor's annual salary (e.g. '15000'): ")) # convert string to integer! | |
supervisor = Supervisor(name, number, salary, bonus) | |
print(supervisor._name, supervisor._number, supervisor._annual_salary, supervisor._bonus) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment