-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstructionCost.java
More file actions
57 lines (49 loc) · 1.63 KB
/
Copy pathconstructionCost.java
File metadata and controls
57 lines (49 loc) · 1.63 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/* • Write Program to estimate house construction cost, based on various
materials
Construction cost per square feet is
• 1200INR if we use standard materials
• 1500INR if we use above standard materials
• 1800INR if customers needs high standard material
• 2500INR if customer needs high standard material and fully
automated home
• Input will be material standard, total area of house and if they want
fully automated home */
import java.util.*;
class constructionCost
{
static
{
int choice;
double areaOfHouse;
Scanner inPut = new Scanner(System.in);
System.out.println("Enter area of the house in square feet: ");
areaOfHouse=inPut.nextDouble();
System.out.print("\n Enter material standard: by choosing a number from below: ");
System.out.print("\n 1. Standard materials");
System.out.print("\n 2. Above standard materials");
System.out.print("\n 3. High standard material");
System.out.print("\n 4. High standard material and fully automated home");
choice = inPut.nextInt();
switch(choice)
{
case 1:
System.out.print("\n Estimated construction cost in INR: " + areaOfHouse*1200);
break;
case 2:
System.out.print("\n Estimated construction cost in INR: " + areaOfHouse*1500);
break;
case 3:
System.out.print("\n Estimated construction cost in INR: " + areaOfHouse*1800);
break;
case 4:
System.out.print("\n Estimated construction cost in INR: " + areaOfHouse*2500);
break;
default:
System.out.print("\n Sorry try again!");
break;
}
System.exit(0);
}
public static void main(String[] args)
{ }
}