-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTicket_Creation.java
41 lines (37 loc) · 1.32 KB
/
Ticket_Creation.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
package test;
import java.util.Scanner;
public class Ticket_Creation {
public static void main(String[] args) {
TicketDetails ticketDetail=new TicketDetails();
TicketApproval ticketApproval=new TicketApproval();
Scanner sc=new Scanner(System.in);
System.out.println("Please enter 1 for Create new Ticket or 2 for exit");
int userInput = sc.nextInt();
switch (userInput) {
case 1:
System.out.println("Please enter ticket description");
sc.nextLine();
String inputicketDetailescription = sc.nextLine();
ticketDetail.setTicketDescription(inputicketDetailescription);
System.out.println("Please enter ticket type");
String inputType = sc.nextLine();
ticketDetail.setTickeType(inputType);
ticketDetail.setTicketStatus("New");
System.out.println("");
System.out.println("Ticket details");
System.out.println("Number : "+ticketDetail.getTicketNumber());
System.out.println("Description : "+ticketDetail.getTicketDescription());
System.out.println("Type : "+ticketDetail.getTickeType());
System.out.println("Status : "+ticketDetail.getTicketStatus());
ticketApproval.approve();
break;
case 2:
System.out.println("Exitted");
System.exit(0);
default:
System.out.println("Please enter the correct value");
break;
}
sc.close();
}
}