to create a class named as ‘Employee’ with attributes i.e. ID, Name, Designation, Qualification, Salary, Taken-Leaves, Allowed-Leaves and the functions applyLeave().  This function will take number of leaves as an input and check Allowed-Leaves to see whether the employee can take leaves or not. If he can take, deduc

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter11: Introduction To Classes
Section11.4: A Case Study: Constructing A Date Class
Problem 4E
icon
Related questions
Question
  1. Write a python code to create a class named as ‘Employee’ with attributes i.e. ID, Name, Designation, Qualification, Salary, Taken-Leaves, Allowed-Leaves and the functions applyLeave()
  2. This function will take number of leaves as an input and check Allowed-Leaves to see whether the employee can take leaves or not. If he can take, deduct these leaves from Allowed-Leaves and add in Taken-Leaves. Otherwise show message ‘you cannot take leave’. 
  3. Create another class ‘Intern’ and inherit ‘Employee’ as super class.
Expert Solution
steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr