-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUserOps.java
More file actions
54 lines (40 loc) · 998 Bytes
/
UserOps.java
File metadata and controls
54 lines (40 loc) · 998 Bytes
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
package Hospital;
import java.util.Scanner;
public class UserOps {
static int choice = 0;
private UserOps()
{
}
public static void useroperations()
{
UserService userservice = new UserService();
Scanner sc = new Scanner(System.in);
do
{
System.out.println("Welcome <User>");
System.out.println("You can perform the following operations:- ");
System.out.println("Press 1 to See Profile");
System.out.println("Press 2 to Get Appointment");
System.out.println("Press 3 to Check Appointment Status");
System.out.println("Press 4 to exit user operations");
choice = sc.nextInt();
switch(choice)
{
case 1:
{
System.out.println("Id:");
userservice.viewProfile(sc.next());
break;
}
case 2:
userservice.getAppointment();
break;
case 3:
userservice.checkAppointmentStatus();
break;
default:
Exception1.inValidOption();
}
}while(choice!=6);
}
}