Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1) Write a Java program to create a class Employee and the following members are used in this class. Object Class: Employee Member variables: Employeeid.
1) Write a Java program to create a class "Employee" and the following members are used in this class. Object Class: Employee Member variables: Employeeid. Employee name. BasicSalary, TA HRA, Insurance, Gross salary Member Methods: Set 0 Calculate _Gross 0 Create a method called Set ( and set the Employeeid. Employeename, Basic Salary Create a method called Calculate_Gross and calculate & return the Gross Salary TA = 20 % of Basic Salary HRA 10% of Basic Salary Insurance 5% of Basic Salary Grosssalary Basicsalary + TA + HRA = . Driver Class: Employee test Get the input values Employeeid. Employeename. Basic Salary Pass the values Employeeid. Employeename. Basic Salary in the set() method Display the Employeeid. Employeename. BasicSalary Gross salary|
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started