-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInputDetails.java
194 lines (159 loc) · 4.57 KB
/
InputDetails.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
import java.util.Scanner;
public class InputDetails
{
String name ;
String date;
public String currentLocation ;
public String destination;
public long phoneNumber;
boolean hotel ;
void displayWelcome()
{
System.out.print("\f");
System.out.println();
String line1 = " * * * * * * * * * * * * * * * * * * * * ";
String line2 = " * * * * * * * * * * * * ";
String line3 = " * * * * * * * * * * * * * * * * * * ";
String line4 = " * * * * * * * * * * * * ";
String line5 = " * * * * * * * * * * * * * * * * * * * * * * * ";
for(int i = 0 ;i < line1.length() ; i++)
{
char ch = line1.charAt(i);
System.out.print(ch);
try
{
Thread.sleep(25);
}
catch(Exception e)
{
}
}
System.out.println();
for(int i = 0 ;i < line2.length() ; i++)
{
char ch = line2.charAt(i);
System.out.print(ch);
try
{
Thread.sleep(25);
}
catch(Exception e)
{
}
}
System.out.println();
for(int i = 0 ;i < line3.length() ; i++)
{
char ch = line3.charAt(i);
System.out.print(ch);
try
{
Thread.sleep(25);
}
catch(Exception e)
{
}
}
System.out.println();
for(int i = 0 ;i < line4.length() ; i++)
{
char ch = line4.charAt(i);
System.out.print(ch);
try
{
Thread.sleep(25);
}
catch(Exception e)
{
}
}
System.out.println();
for(int i = 0 ;i < line5.length() ; i++)
{
char ch = line5.charAt(i);
System.out.print(ch);
try
{
Thread.sleep(25);
}
catch(Exception e)
{
}
}
System.out.println();
}
void name()
{
Scanner sc = new Scanner(System.in);
String s1 = "Your name please!";
for(int i = 0 ;i < s1.length() ; i++)
{
char ch = s1.charAt(i);
System.out.print(ch);
try
{
Thread.sleep(55);
}
catch(Exception e)
{
}
}
System.out.println();
name = sc.nextLine().trim() ;
}
void nameCapital()
{
String name = this.name ;
name = name + " " ;
String word = "" ;
String newWord = "";
String s2 = "";
for(int i = 0 ; i < name.length() ; i++)
{
char ch = name.charAt(i);
word = word + ch ;
if(ch == ' ')
{
char firstWord = word.charAt(0);
newWord = word.substring(1);
firstWord = Character.toUpperCase(firstWord);
newWord = firstWord + newWord ;
s2 = s2 + newWord ;
word = "" ;
}
}
name = s2 ;
this.name = name;
}
void OtherDetails()
{
Scanner sc = new Scanner(System.in);
//prompt and accept
String s2 = "We would like to take up more detals... Please do cooperate ";
for(int i = 0 ;i < s2.length() ; i++)
{
char ch = s2.charAt(i);
System.out.print(ch);
try
{
Thread.sleep(55);
}
catch(Exception e)
{
}
}
System.out.println();
System.out.println("Phone Number: ");
System.out.println();
phoneNumber = sc.nextLong();
System.out.println("\nPlease enter your current location and your travel location");
sc.nextLine().trim();
currentLocation = sc.nextLine().trim();
destination = sc.nextLine().trim();
currentLocation = currentLocation.toUpperCase();
destination = destination.toUpperCase();
System.out.println("\nYour Date of Travel: \nformat ( date name_of_the_month year)");
date = sc.nextLine().trim();
System.out.println();
}
}