All Tech at one spot
Define a class Employee with the following description:
Instance variables/Data members:
int pan – to store the personal account number
String name – to store the name
double taxincome – to store annual taxable income
double tax – to store the tax that is calculated
Member methods:
Employee()-Default constructor to store null to member data
void input()-fill values in member data pan,name,tax income
void calc()-calculate tax for an employee and store in tax.
void display()- output member data, and also the income after tax deduction
The following chart is given for tax calculation:
Annual taxable income Tax rate
<=100000 No tax
>100000 and <=500000 8% of the income exceeding 100000
>500000 and <=1200000 12% of the income exceeding 500000
>1200000 16% of the income exceeding 1200000
Output :-
Learn the basics and a bit beyond to improve your backend dev skills.
Designer
Learn the basics and a bit beyond to improve your backend dev skills.
Designer