Question No. 2: Write a python program that takes input values as integer, checks the number is not less than 10 (otherwise take input again) and prints the previous 10 numbers i.e. 10, 9, 8, … Concatenate the integer and string values and print as a string Write 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(). 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’. Create another class ‘Intern’ and inherit ‘Employee’ as super class.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter9: Records (struct)
Section: Chapter Questions
Problem 2PE
icon
Related questions
Question

Question No. 2:

  • Write a python program that takes input values as integer, checks the number is not less than 10 (otherwise take input again) and prints the previous 10 numbers i.e. 10, 9, 8, … 
  • Concatenate the integer and string values and print as a string 
  • Write 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()
  • 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’. 
  • Create another class ‘Intern’ and inherit ‘Employee’ as super class. 
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Concept of pointer parameter
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++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,