Computer Science, asked by Sherry1671, 1 year ago

Mention five states of and two methods for the following classes a)class employee

Answers

Answered by sailorking
52

In a class employee, there can be many states and methods. Some states of the class employee are as  follows:-

  • emp_name (String)- To store the name of the employee.
  • emp_id (Integer)- To store the unique Identification number, of employee.
  • emp_salary (Float)- To store the salary of an employee.
  • emp_leaves_allotted (Integer) -To store the number of leaves of an employee allotted.
  • emp_leaves_taken (Integer)- To store the number of leaves already taken.

Some methods of employee class are as follows:-

  • salary_calculate(int leaves_taken)- To calculate salary of an employee.
  • update_leave(int leaves_taken)- To calculate the number of leaves present.
Answered by stuyoshitha12674
5

Answer:

Class Employee

Explanation:

in a class Employee , there can be many states and method

Similar questions