-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPart33Impl.java
More file actions
30 lines (27 loc) · 916 Bytes
/
Part33Impl.java
File metadata and controls
30 lines (27 loc) · 916 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
# java_pra3
public class Part33Impl implements Part33P12 {
@Override
public void add() {
// TODO Auto-generated method stub
int ans = a+b+c+d;
System.out.println("The addition of " + a + ", " + b + ", " + c + " and " + d + " is " + ans);
}
@Override
public void sub() {
// TODO Auto-generated method stub
int ans = a-b-c-d;
System.out.println("The subtraction of " + a + ", " + b + ", " + c + " and " + d + " is " + ans);
}
@Override
public void mul() {
// TODO Auto-generated method stub
int ans = a*b*c*d;
System.out.println("The multiplication of " + a + ", " + b + ", " + c + " and " + d + " is " + ans);
}
@Override
public void div() {
// TODO Auto-generated method stub
float ans = a/d;
System.out.println("The division of " + a + " and "+ b + " is " + ans);
}
}