Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class ABETaftTicketingSystem {
- public static void main(String[] args) {
- String user;
- String pw;
- String se;
- String name;
- int gy;
- String ct;
- long usn;
- String p;
- String prob;
- String com;
- String em;
- int a = 1;
- Scanner r = new Scanner(System.in);
- Scanner j = new Scanner(System.in);
- while (a <1000000000) {
- System.out.println("Enter the type of user you are [User or Admin]: ");
- user = r.nextLine();
- if (user.equals("User") || user.equals("user")) {
- System.out.println("Enter your designation, [Student or Employee]: ");
- se = r.nextLine();
- if (se.equals("Student") || se.equals("student")) {
- System.out.println("Enter your name, follow this format [SN, GN MI.]: ");
- name = r.nextLine();
- System.out.println("Enter your grade or year level: ");
- gy = r.nextInt();
- System.out.println("Enter your course or track: ");
- ct = r.next();
- System.out.println("Enter your USN: ");
- usn = r.nextLong();
- System.out.println("Enter the email address where we will send the feedback or progress regarding your problem: ");
- em = r.next();
- System.out.println("Enter the category of your problem, [Choose whether it is under hardware, software or network]: ");
- prob = r.next();
- System.out.println("Now, tell the problem you are encountering: ");
- com = j.nextLine();
- System.out.println("Ticket Number: "+a);
- a++;
- System.out.println("Name: "+name);
- System.out.println("Grade or Year Level: "+gy);
- System.out.println("Course or Track: "+ct);
- System.out.println("USN: "+usn);
- System.out.println("Email Address: "+em);
- System.out.println("Category of the Problem: "+prob);
- System.out.println("Problem Encountered: "+com);
- }
- else if (se.equals("Employee") || se.equals("employee")) {
- System.out.println("Enter your name, follow this format [SN, GN MI.]: ");
- name = r.nextLine();
- System.out.println("Enter your position: ");
- p = r.nextLine();
- System.out.println("Enter the email address where we will send the feedback or progress regarding your problem: ");
- em = r.nextLine();
- System.out.println("Enter the category of your problem, [Choose whether it is under hardware, software or network]: ");
- prob = r.nextLine();
- System.out.println("Now, tell the problem encounterred: ");
- com = r.nextLine();
- System.out.println("Ticket Number: "+a);
- a++;
- System.out.println("Name: "+name);
- System.out.println("Position: "+p);
- System.out.println("Email Address: "+em);
- System.out.println("Category of the Problem: "+prob);
- System.out.println("Problem Encountered: "+com);
- }
- }
- else if (user.equals("Admin") || user.equals("admin")) {
- System.out.println("Enter the password: ");
- pw = r.next();
- if (pw.equals("<Kiss*Muna#Ako>S-E-C-R-E-T")) {
- System.out.println("Dashboard ...");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement