-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTA.java
More file actions
31 lines (30 loc) · 794 Bytes
/
TA.java
File metadata and controls
31 lines (30 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package unit2;
public class TA implements StudentInterface, StaffInterface{
String name, gender, sid, eid, coname;
int age, basicsal;
public void getNAG(String n, int a, String g)
{
name = n;
age = a;
gender = g;
}
public void getSC(String id, String cn)
{
sid = id;
coname = cn;
}
public void getEidSal(String e, int bs)
{
eid = e;
basicsal = bs;
}
double grossCalc()
{
return (basicsal + basicsal * hra + basicsal * da);
}
public void display() {
System.out.println("NAme, age anda gener of the candidate are : " + name + " " + age + " " + gender);
System.out.println("Sid and course name of the candidate are " + sid + " " + coname);
System.out.println("Empolyee ID, basic salary and gross salary are " + eid + " " + basicsal + " " + grossCalc());
}
}