Answer to Question #242856 in Python for Gopi

Question #242856
Suppose there is XYZ Company and there are different departments like: production, marketing, finance, sales etc. Manager of the company want to know about the detail of the employees who are highly paid from each department. Write a program using the concept of classes to implement the same.
1
Expert's answer
2021-09-30T00:58:28-0400
class Depart:  
    def show(self):  
        print("Departments")   
class production(Depart):  
    def show(self):  
        print("Production department")
        print("Highly paid employee's name is Gray and the salary is 80,000")
class marketing(Depart):  
    def show(self):  
        print("Marketing department")
        print("Highly paid employee's name is Bob and the salary is 180,000")
class finance(Depart):  
    def show(self):  
        print("Finance department")
        print("Highly paid employee's name is Gee and the salary is 70,000")
class sales(Depart):  
    def show(self):  
        print("Sales department")
        print("Highly paid employee's name is John and the salary is 100,000")
s=sales()
p=production()
m=marketing()
f=finance()
s.show()
p.show()
m.show()
f.show()

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS