View difference between Paste ID: ibw0vb6A and FLBkSVhQ
SHOW: | | - or go back to the newest paste.
1
package online;
2
3
public class Online 
4
{
5
    public static void main(String[] args)
6
    {
7
        Account a= new Account ();
8
        
9
        FixedDeposit f =new FixedDeposit();
10
    }
11
    
12
}
13
14
15
public class Employee
16
{
17
    public String name;
18
    public int age;
19
    public double basic=100;
20
    public double year = 1;
21
    Employee()
22
    {
23
        
24
    }
25
    double salary(double a)
26
    {
27
        double c = (a * 2)* year ;
28
        return c;
29
    }
30
}
31
32
33
public class Employee2 extends Employee
34
{
35
    double increment = basic * 0.75;
36
 
37
    double salary(double a)
38
    {
39
        double c= (basic+increment)*2*year;
40
        return c;
41
    }
42
}