-
Notifications
You must be signed in to change notification settings - Fork 1
/
Display.java
93 lines (88 loc) · 3.71 KB
/
Display.java
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
import java.util.*;
public class Display extends TourInfo{
static String tourIti;
static int perPrice;
static String tourName;
static String fromDate;
static String toDate;
static Scanner sc=new Scanner(System.in);
static String enter;
static int c;
public static void GT(int x, int y){ //Displays Information of Group Tours
System.out.println("\n");
tourName=TourNameGT(x, y);
fromDate=FromDate(x, y);
toDate=ToDate(x, y);
System.out.println("From: "+fromDate+"\tTo: "+toDate);
tourIti=TourIti(x, y);
System.out.println("\n->Press Enter to know Per Person Price:");
enter=sc.nextLine();
perPrice=GTPerPersonPrice(x, y);
Offers();
System.out.println("\n->Press Enter to know Inclusions & Exclusions:");
enter=sc.nextLine();
InclExcl();
System.out.println("\n** Want to Proceed & know the Final Total Price? **\n->Press 'Y' to Proceed\n->Press 'N' to Choose Another Tour");
String ch=sc.nextLine();
if (confirm(ch)){
InputDetails.InputGTInfo(); //Takes Input of Total People & Travel Mode
FinalPrice(perPrice, InputDetails.totalPpl, InputDetails.travelMode, discount);
System.out.println("\n** Want to Confirm? **\n->Press 'Y' to Confirm the Tour Package\n->Press 'N' to Choose Another Tour");
ch=sc.nextLine();
if(confirm(ch)){
InputDetails.InputPersonalInfo(); //Directs to AWT Form
}
else{
InputDetails.totalPpl=0;
InputDetails.travelMode=0;
InputDetails.count1=0;
InputDetails.count2=0;
ChooseCategories.chooseGT(); //Re-Displays the Tour Options
}
}
else{
ChooseCategories.chooseGT(); //Re-Displays the Tour Options
}
}
public static void CT(){ //Displays Information of Customized Tours
System.out.println();
InputDetails.InputCTInfo(); //Takes input of details
tourName=TourNameCT();
fromDate=InputDetails.fromDate;
toDate=InputDetails.toDate;
System.out.println("\n->Press Enter to know Per Person Price:");
enter=sc.nextLine();
perPrice=CTPerPersonPrice();
Offers();
System.out.println("\n->Press Enter to know Inclusions & Exclusions:");
enter=sc.nextLine();
InclExcl();
System.out.println("\n** Want to Proceed & know the Final Total Price?( Inclusive of All Taxes ) **\nPress 'Y' to Proceed\nPress 'N' to Choose Another Tour");
String ch=sc.nextLine();
if(confirm(ch)){
FinalPrice(CTprice, InputDetails.totalPpl, InputDetails.travelMode, discount);
System.out.println("\n** Want to Confirm? **\n->Press 'Y' to Confirm the Tour Package\n->Press 'N' to Choose Another Tour");
ch=sc.nextLine();
if(confirm(ch)){
InputDetails.InputPersonalInfo();
//Bill.PrintBill();
}
else{
InputDetails.totalPpl=0;
InputDetails.travelMode=0;
InputDetails.count3=0;
InputDetails.count4=0;
InputDetails.count5=0;
InputDetails.count6=0;
ChooseCategories.choose(); //Re-Displays the Tour Options
}
}
else{
ChooseCategories.choose(); //Re-Displays the Tour Options
}
}
public static boolean confirm(String s){ //Confirmation to proceed or not
if(s.equals("Y") || s.equals("y")){return true;}
else{System.out.println("\n- You will be re-directed to the Main Menu");return false;}
}
}