Implement “SoftwareEngineer” and “CheifEngineer” class derived from “Employee” class with necessary properties so that the expected output is generated. Do not change any given code. # Write your codes here. # Do not change the following lines of code. sw1 = SoftwareEngineer("Bob","Software Engineer",40,1200) print('1.------------------------------------') sw1.calculateWeeklyIncome() print('2.------------------------------------') print(sw1) print('3.------------------------------------') sw2 = SoftwareEngineer("Carol","Software Engineer",45,1200,5) print('4.------------------------------------') sw2.calculateWeeklyIncome() print('5.------------------------------------') print(sw2) print('6.------------------------------------') print(Employee.employeeInfo) print('7.====================================') ce1 = ChiefEngineer("John","Chief Engineer",50,1500,7) print('8.------------------------------------') ce1.calculateWeeklyIncome() print('9.------------------------------------') print(ce1) print('10.------------------------------------') ce2 = ChiefEngineer("Brad","Chief Engineer",55,2000) print('11.------------------------------------') ce2.calculateWeeklyIncome() print('12.------------------------------------') print(ce2) print('13.------------------------------------') print(Employee.employeeInfo) Output: Software Engineer,Bob created. 1.------------------------------------ Weekly income of Bob has been calculated 2.------------------------------------ Name: Bob Designation: Software Engineer Work hour per week: 40 hours Per hour income: 1200 Taka Over time:0 hours Weekly income:48000Taka 3.------------------------------------ Software Engineer,Carol created. 4.------------------------------------ Weekly income of Carol has been calculated 5.------------------------------------ Name: Carol Designation: Software Engineer Work hour per week: 45 hours Per hour income: 1200 Taka Over time:5 hours Weekly income:60000Taka 6.------------------------------------ {'Software Engineer': ['Bob', 'Carol']} 7.==================================== Chief Engineer,John created. 8.------------------------------------ Weekly income of John has been calculated 9.------------------------------------ Name: John Designation: Chief Engineer Work hour per week: 50 hours Per hour income: 1500 Over time:7 hours Weekly income:85500 Taka 10.------------------------------------ Chief Engineer,Brad created. 11.------------------------------------ Weekly income of Brad has been calculated 12.------------------------------------ Name: Brad Designation: Chief Engineer Work hour per week: 55 hours Per hour income: 2000 Over time:0 hours Weekly income:110000 Taka 13.------------------------------------ {'Software Engineer': ['Bob', 'Carol'], 'Chief Engineer': ['John', 'Brad']}

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Implement “SoftwareEngineer” and “CheifEngineer” class derived from “Employee” class with necessary properties so that the expected output is generated. Do not change any given code.

# Write your codes here.
# Do not change the following lines of code.
sw1 = SoftwareEngineer("Bob","Software Engineer",40,1200)
print('1.------------------------------------')
sw1.calculateWeeklyIncome()
print('2.------------------------------------')
print(sw1)
print('3.------------------------------------')
sw2 = SoftwareEngineer("Carol","Software Engineer",45,1200,5)
print('4.------------------------------------')
sw2.calculateWeeklyIncome()
print('5.------------------------------------')
print(sw2)
print('6.------------------------------------')
print(Employee.employeeInfo)
print('7.====================================')
ce1 = ChiefEngineer("John","Chief Engineer",50,1500,7)
print('8.------------------------------------')
ce1.calculateWeeklyIncome()
print('9.------------------------------------')
print(ce1)
print('10.------------------------------------')
ce2 = ChiefEngineer("Brad","Chief Engineer",55,2000)
print('11.------------------------------------')
ce2.calculateWeeklyIncome()
print('12.------------------------------------')
print(ce2)
print('13.------------------------------------')
print(Employee.employeeInfo)

Output:
Software Engineer,Bob created.
1.------------------------------------
Weekly income of Bob has been calculated
2.------------------------------------
Name: Bob
Designation: Software Engineer
Work hour per week: 40 hours
Per hour income: 1200 Taka
Over time:0 hours
Weekly income:48000Taka
3.------------------------------------
Software Engineer,Carol created.
4.------------------------------------
Weekly income of Carol has been calculated
5.------------------------------------
Name: Carol
Designation: Software Engineer
Work hour per week: 45 hours
Per hour income: 1200 Taka
Over time:5 hours
Weekly income:60000Taka
6.------------------------------------
{'Software Engineer': ['Bob', 'Carol']}
7.====================================
Chief Engineer,John created.
8.------------------------------------
Weekly income of John has been calculated
9.------------------------------------
Name: John
Designation: Chief Engineer
Work hour per week: 50 hours
Per hour income: 1500
Over time:7 hours
Weekly income:85500 Taka
10.------------------------------------
Chief Engineer,Brad created.
11.------------------------------------
Weekly income of Brad has been calculated
12.------------------------------------
Name: Brad
Designation: Chief Engineer
Work hour per week: 55 hours
Per hour income: 2000
Over time:0 hours
Weekly income:110000 Taka
13.------------------------------------
{'Software Engineer': ['Bob', 'Carol'], 'Chief Engineer': ['John', 'Brad']}

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education