-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStart.java
More file actions
226 lines (164 loc) · 4.67 KB
/
Start.java
File metadata and controls
226 lines (164 loc) · 4.67 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
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
import CLASSES.*;
import Interfaces.*;
import FrameIntro.*;
public class Start{
public static void main(String[] args){
Login l=new Login();
l.setVisible(true);
}
}
/*import CLASSES.*;
import Interfaces.*;
import java.util.*;
public class Start{
public static void main(String[] args){
/*Company com=new Company();
Bus bus=new Bus();
Account comacc=new Account();
comacc.setAccNum(11111);
comacc.setBalance(0.0);
com.setAccount(comacc);
boolean choice=true;
Scanner sc=new Scanner(System.in);
while(choice){
System.out.println("1.passenger option");
System.out.println("2.Manneging option");
int option=sc.nextInt();
switch(option){
case 1:
System.out.println("Are u new?");
System.out.println("1.yes");
System.out.println("2.no");
int firstchoice=sc.nextInt();
switch(firstchoice)
{
case 1:
System.out.print("Enter your name: ");
String name=sc.next();
System.out.print("Enter your NID: ");
String Nid=sc.next();
System.out.print("Enter your Age: ");
int age=sc.nextInt();
Customer c=new Customer();
c.setName(name);
c.setNid(Nid);
c.setAge(age);
com.insertCustomer(c);
c.showAllDetails();
break;
case 2:
System.out.println("1.Seat booking");
System.out.println("2.other information");
int secondchoice=sc.nextInt();
switch(secondchoice)
{
case 1:
System.out.print("Enter Your name: ");
String pname=sc.next();
System.out.print("Enter your Nid: ");
String pNid=sc.next();
System.out.print("Enter Your Age: ");
int page=sc.nextInt();
System.out.print("Enter Your Mobile Number: ");
String mobileNumber=sc.next();
System.out.print("Enter Your Account Number: ");
int accnum=sc.nextInt();
System.out.print("Enter Your Account Balance: ");
double balance=sc.nextInt();
Account a=new Account();
a.setAccNum(accnum);
a.setBalance(balance);
Passenger p=new Passenger();
p.setAccount(a);
p.setName(pname);
p.setNid(pNid);
p.setAge(page);
p.setMobileNum(mobileNumber);
System.out.println("Are you sure for booking this ticket?");
System.out.println("1.yes");
System.out.println("2.no");
int confirm=sc.nextInt();
if(confirm==1){
a.transferMoney(comacc,600);
}
else if(confirm==2)
{
bus.removePassenger(p);
}
p.showPassengerBalance();
System.out.println();
}
break;
//case 2:
}
break;
}
}
*/
//}
//}
/*import java.lang.*;
import java.util.*;
public class Start
{
public static void main(String arg[])
{
System.out.println("\n\nWelcome To Sample Bus Ticket and Managent Service \n ");
boolean choice=true;
Account a=new Account();
Scanner scan= new Scanner(System.in);
while(choice)
{
System.out.println(" Choice any service ");
System.out.println(" 1. Bus Managent ");
System.out.println(" 2. Bus Ticket ");
System.out.println(" 3. Exit from the application\n ");
System.out.println(" What do you want to do: ");
int first=scan.nextInt();
switch(first)
{
case 1:
System.out.println("Welcome to our Bus Managent Service");
break;
case 2:
System.out.println("Welcome to Our Bus Ticket Service \n");
System.out.println(" 1. Sign In(If you already have account)");
System.out.println(" 2. Sign Up (For New )");
System.out.println("\nWhat do you want to do: ");
int second=scan.nextInt();
switch(second)
{
case 1:
System.out.println(" Enter Your Username :");
String userName=scan.next();
System.out.println(" Enter Your Password :");
String password=scan.next();
a.getCustomer(userName,password);
break;
case 2:
System.out.println(" Welcome to your Bus Ticket Service \n For Create Account Please Follow The Step\n");
System.out.println(" Enter your full name : ");
String fullName=scan.next();
System.out.println(" Enter Your Phone Number: ");
String phnNumber=scan.next();
System.out.println(" Create a Password : ");
String pass=scan.next();
System.out.println(" Enter your NID Number : ");
String nidNumber=scan.next();
Customer c=new Customer();
c.setFullName(fullName);
c.setPhnNumber(phnNumber);
c.setPass(pass);
c.setNidNumber(nidNumber);
a.insertCustomer(c);
break;
}
case 3:
System.out.println("You have selected to exit the application");
System.out.println("Thank you for using Our Service");
choice = false;
break;
}
}
}
}*/