/* Simple Java Program For Displaying Emplayee Details : NAme, Id No. Designation, and depending on designation deciding the salary Of the Employee*/
class emp
{
public static int emp_no;
public static String name;
public static String designation;
public void showdata()
{
System.out.println("Employee number:--->"+emp_no);
System.out.println("Employee name:------>"+name);
System.out.println("Employee designation:--->"+designation);
}
}
class salary extends emp
{
public static float bsal,hr,da,tsal;
public void cal()
{
tsal=bsal+hr+da;
System.out.println("Total salary:---->"+tsal);
}
}
class empsal extends salary
{
public void calc()
{
if (bsal >=15000)
{
hr=0.3f*bsal;
da=0.2f*bsal;
}
else if (bsal >=10000)
{
hr=0.4f*bsal;
da=0.3f*bsal;
}
else
hr=0.3f*bsal+500;
da=0.2f*bsal+500;
}
public static void main(String args[])
{
empsal E=new empsal();
emp_no=Integer.parseInt(args[0]);
name=args[1];
designation=args[2];
bsal=Integer.parseInt(args[3]);
E.showdata();
System.out.println("Employee Salary");
E.calc();
E.cal();
}
}
Labels: Core Java
Subscribe to:
Post Comments (Atom)
Thanx a lot for this program.....
it got me 100 marks!!!!!!!!
hi
good program.....thanks a lot for who has to create this program....
thanks
thank you............
it's help me to escape from my sir BEAT........
thank you............
it's help me to escape from my sir BEAT........
thank you............
it's help me to escape from my sir BEAT........
thank you............
it's help me to escape from my sir BEAT........
putang ina hindi yan ang gusto ko...
a School has decided to introduce a new salary scheme for its faculty. in the new Policy, bonus is based on the fact that one is a Senior staff or Junior staff. we are to develop a software to meet the policy's requirement as broken down below:
a) Create a class called Salary
b)Create method that will calculate; the Tax which is 5% of the Gross salary
c) Bonus depending on the Status of employee, being it Senior/Junior staff
i) Senior staff 1hour is 50Gh cedis
ii) Junior staff 1hour is 20Gh cedis
iii) Net Salary = Bonus + Gross salary - Tax
d) Create another class called SalDemo with the main function
e) Declare an instance of the salary class called cal.
f) Use the cal object to check the net salary
g) Use scanner class to allow a user to enter the Status, Time and the Gross salary.
Create a program (using AWT) to implement the following requirement,
a. Export the data from the database table EMPLOYEE
b. Query the employee records from the database table
c. Create a file ‘data_export_MMDDYYYY.txt’
d. Export the data to this file in the format mentioned below.
Create a program (using AWT) to implement the following requirement,
a. Export the data from the database table EMPLOYEE
b. Query the employee records from the database table
c. Create a file ‘data_export_MMDDYYYY.txt’
d. Export the data to this file in the format mentioned below.
it throws me a arrayoutofbound exception , i couldn't find how to come out of it, any suggestion?
gime a code where the employee name should be displayed in ascending order , get the employee age instead of salary and find the second smallest age without using nested loops and sorting technique