Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package online;
- public class Online
- {
- public static void main(String[] args)
- {
- Account a= new Account ();
- FixedDeposit f =new FixedDeposit();
- }
- }
- public class Employee
- {
- public String name;
- public int age;
- public double basic=100;
- public double year = 1;
- Employee()
- {
- }
- double salary(double a)
- {
- double c = (a * 2)* year ;
- return c;
- }
- }
- public class Employee2 extends Employee
- {
- double increment = basic * 0.75;
- double salary(double a)
- {
- double c= (basic+increment)*2*year;
- return c;
- }
- }
Add Comment
Please, Sign In to add comment