4
Define a class Employee_Sal described below:
Data members/instance variables:
String name
: to store name of the employee
String empno : to store employee number
int basic
: to store basic salary of the employee
Member Methods:
i. A parameterised constructor to initialize the data members
ii. To accept the details of an employee
iii. To compute the gross and net salary as:
da =30%of basic
hra =15%of basic
pf =12%of basic
gross =basic + da + hra
net =
gross - pf
iv. To display the name, empno, gross salary, net salary.
Write a main method to create an object of a class and call the above
member methods.
[ICSE Model)
Iculate the
oroa please answer fast along with calling the member methods in main method plzzz
Answers
Answered by
8
Answer: The answer is given in the pdf , open it and see it is correct so mark it as the brainliest.
Thank You.
Attachments:
Similar questions