-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAbc.java
More file actions
104 lines (89 loc) · 2.97 KB
/
Copy pathAbc.java
File metadata and controls
104 lines (89 loc) · 2.97 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import java.util.*;
class mall
{
Scanner sc=new Scanner(System.in);
int ch,ch1,ch2;
void inputdata()
{
System.out.println("PRESS 1 FOR SHOOSE");
System.out.println("PRESS 2 FOR CLOTHS");
System.out.println("PRESS 3 FOR BEAUTY PRODUCTS");
System.out.println("PRESS 4 HEALTH PRODUCTS");
System.out.println("PRESS 5 FOR MOVIE");
System.out.println("PRESS 6 FOR LOG OUT");
do{
ch=sc.nextInt();
switch(ch)
{
case 1:
System.out.println("THEIR ARE 200 OFF ON THE 2000 OR ITS ABOVE SHOOSE PURCHASING \n");
System.out.println("PRESS 1 TO PURCHASE PUMA");
System.out.println("PRESS 2 TO PURCHASE ADDIDAS");
System.out.println("PRESS 3 TO PURCHASE NIKE ");
System.out.println("PRESS 10 TO GO BACK");
System.out.println("PLEASE CHOOSE YOUR CHOICE");
do{
ch1=sc.nextInt();
switch(ch1)
{
case 1:
System.out.println("YOU ARE PURCHASING PUMA");
System.out.println("PLEASE ENTER YOUR AMMOUNT TO PAY");
ch2=sc.nextInt();
if (ch2>=2000)
{
double payamount=ch2-200;
System.out.println("YOUR PAYABLE AMMOUNT IS:"+" "+payamount);
}
else{
System.out.println("NO OFFER'S ARE AVAILABLE");
double payamount=ch2;
System.out.println("YOUR PAYABLE AMMOUNT IS:"+" "+payamount);
}
break;
case 2:
System.out.println("YOU ARE PURCHASING ADDIDAS");
System.out.println("PLEASE ENTER YOUR AMMOUNT TO PAY");
ch2=sc.nextInt();
if (ch2>=2000)
{
double payamount=ch2-200;
System.out.println("YOUR PAYABLE AMMOUNT IS:"+" "+payamount);
}
else{
System.out.println("NO OFFER'S ARE AVAILABLE");
double payamount=ch2;
System.out.println("YOUR PAYABLE AMMOUNT IS:"+" "+payamount);
}
break;
case 3:
System.out.println("YOU ARE PURCHASING NIKE");
System.out.println("PLEASE ENTER YOUR AMMOUNT TO PAY");
ch2=sc.nextInt();
if (ch2>=2000)
{
double payamount=ch2-200;
System.out.println("YOUR PAYABLE AMMOUNT IS:"+" "+payamount);
}
else{
System.out.println("NO OFFER'S ARE AVAILABLE");
double payamount=ch2;
System.out.println("YOUR PAYABLE AMMOUNT IS:"+" "+payamount);
}
break;
}
}while(ch1==10);
break;
//???????not understanding
}
}while(ch==6);
}
}
public class Abc
{
public static void main(String[] args)
{
mall w= new mall();
w.inputdata();
}
}