-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCleanCode2.java
More file actions
41 lines (39 loc) · 900 Bytes
/
CleanCode2.java
File metadata and controls
41 lines (39 loc) · 900 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
32
33
34
35
36
37
38
39
40
41
package Cleancode;
import java.util.Scanner;
public class Cleancode2 {
public static void check(String s) {
if(s.equals("standard materials")) {
System.out.println(standard());
}
else if(s.equals("above standard materials")) {
System.out.println(above_standard());
}
else if(s.equals("high standard material")) {
System.out.println(high_standard());
}
else if(s.equals("high standard material and fully automated house")) {
System.out.println(high_standard_fully_automated());
}
}
public static int standard() {
return 1200;
}
public static int above_standard() {
return 1500;
}
public static int high_standard() {
return 1800;
}
public static int high_standard_fully_automated() {
return 2500;
}
public static void main(String[] args) {
try{
Scanner obj=new Scanner(System.in);
String s=obj.nextLine();
check(s);
}
finally{
}
}
}