Advertisement
Guest User

Untitled

a guest
Apr 2nd, 2018
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.68 KB | None | 0 0
  1. package abe.taft.ticketing.system;
  2. import java.util.Scanner;
  3.  
  4. public class ABETaftTicketingSystem {
  5.  
  6. public static void main(String[] args) {
  7. String user;
  8. String pw;
  9. String se;
  10. String name;
  11. int gy;
  12. String ct;
  13. long usn;
  14. String p;
  15. String prob;
  16. String com;
  17. String em;
  18. int a = 1;
  19.  
  20. Scanner r = new Scanner(System.in);
  21. Scanner j = new Scanner(System.in);
  22.  
  23.  
  24. System.out.println("Enter the type of user you are [user or Admin]: ");
  25. user = r.nextLine();
  26.  
  27. if (user.equals("User") || user.equals("user")) {
  28. while (a <1000000000) {
  29. System.out.println("Enter your designation, [Student or Employee]: ");
  30. se = r.nextLine();
  31.  
  32. if (se.equals("Student") || se.equals("student")) {
  33. System.out.println("Enter your name, follow this format [SN, GN MI.]: ");
  34. name = r.nextLine();
  35. System.out.println("Enter your grade or year level: ");
  36. gy = r.nextInt();
  37. System.out.println("Enter your course or track: ");
  38. ct = r.next();
  39. System.out.println("Enter your USN: ");
  40. usn = r.nextLong();
  41. System.out.println("Enter the email address where we will send the feedback or progress regarding your problem: ");
  42. em = r.next();
  43. System.out.println("Enter the category of your problem, [Choose whether it is under hardware, software or network]: ");
  44. prob = r.next();
  45. System.out.println("Now, tell the problem you are encountering: ");
  46. com = j.nextLine();
  47.  
  48. System.out.println("Ticket Number: "+a);
  49. a++;
  50. System.out.println("Name: "+name);
  51. System.out.println("Grade or Year Level: "+gy);
  52. System.out.println("Course or Track: "+ct);
  53. System.out.println("USN: "+usn);
  54. System.out.println("Email Address: "+em);
  55. System.out.println("Category of the Problem: "+prob);
  56. System.out.println("Problem Encountered: "+com);
  57.  
  58. }
  59.  
  60. else if (se.equals("Employee") || se.equals("employee")) {
  61. System.out.println("Enter your name, follow this format [SN, GN MI.]: ");
  62. name = r.nextLine();
  63. System.out.println("Enter your position: ");
  64. p = r.nextLine();
  65. System.out.println("Enter the email address where we will send the feedback or progress regarding your problem: ");
  66. em = r.nextLine();
  67. System.out.println("Enter the category of your problem, [Choose whether it is under hardware, software or network]: ");
  68. prob = r.nextLine();
  69. System.out.println("Now, tell the problem encounterred: ");
  70. com = r.nextLine();
  71.  
  72. System.out.println("Ticket Number: "+a);
  73. a++;
  74. System.out.println("Name: "+name);
  75. System.out.println("Position: "+p);
  76. System.out.println("Email Address: "+em);
  77. System.out.println("Category of the Problem: "+prob);
  78. System.out.println("Problem Encountered: "+com);
  79.  
  80. }
  81.  
  82. }
  83.  
  84. }
  85.  
  86. else if (user.equals("Admin") || user.equals("admin")) {
  87. System.out.println("Enter the password: ");
  88. pw = r.next();
  89.  
  90. if (pw.equals("<@AB3J#>")) {
  91. System.out.println("Dashboard: ");
  92. }
  93.  
  94. }
  95.  
  96. }
  97.  
  98. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement