Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.21 KB | None | 0 0
  1. //**********************************************************
  2. //* Homework 5: Job Application Tracker with Job Seekers.
  3. //* Author: Ammar Al-Nasseri
  4. //* Course: CS 3033 Object Oriented Programming
  5. //**********************************************************
  6.  
  7. package com.derka.json;
  8.  
  9. import java.util.*;
  10.  
  11. public class Applicant extends Employee {
  12.  
  13.  
  14. void JobOpenings(ArrayList<Employee> emp, Scanner console) {
  15.  
  16. int choice;
  17. String jobTitle;
  18.  
  19. System.out.println("\n\n-------------------------------------");
  20. System.out.println("| Choose a Career to Apply for! |");
  21. System.out.println("|-----------------------------------|");
  22. System.out.println("| |");
  23. System.out.println("| Select number and press enter |");
  24. System.out.println("| to perform operation |");
  25. System.out.println("|-----------------------------------|");
  26. System.out.println("| |");
  27. System.out.println("| 1.) Marketing |");
  28. System.out.println("| 2.) Engineering |");
  29. System.out.println("| 3.) Management |");
  30. System.out.println("| 4.) Accounting |");
  31. System.out.println("| 5.) Networking |");
  32. System.out.println("| 6.) Computer Science |");
  33. System.out.println("| 7.) Exit Menu |");
  34. System.out.println("| |");
  35. System.out.println("-------------------------------------");
  36.  
  37. System.out.print("Enter your choice : ");
  38. choice = Integer.parseInt(console.nextLine());
  39.  
  40. switch (choice) {
  41. case 1:
  42. jobTitle = "Marketing";
  43. create_new(emp, jobTitle, console);
  44. break;
  45. case 2:
  46. jobTitle = "Engineering";
  47. create_new(emp, jobTitle, console);
  48. break;
  49. case 3:
  50. jobTitle = "Management";
  51. create_new(emp, jobTitle, console);
  52. break;
  53. case 4:
  54. jobTitle = "Accounting";
  55. create_new(emp, jobTitle, console);
  56. break;
  57. case 5:
  58. jobTitle = "Networking";
  59. create_new(emp, jobTitle, console);
  60. break;
  61. case 6:
  62. jobTitle = "Computer Science";
  63. create_new(emp, jobTitle, console);
  64. break;
  65. case 7:
  66. break;
  67. }
  68. }
  69.  
  70.  
  71. void viewMyApplication(String email, ArrayList<Employee> emp) {
  72. System.out.println("\n-------------------------------------- Applicant's Information ------------------------------------------------");
  73. for (int i = 0; i < emp.size(); i++) {
  74. if ((emp.get(i).getEmail()).equals(email)) {
  75. if (emp.get(i).getAppID() < 5000) {
  76. System.out.println("\nJob Title: " + emp.get(i).getJobTitle() + " " + emp.get(i).getFull_part());
  77. System.out.println("Name: " + emp.get(i).getFirstName() + " " + emp.get(i).getLastName());
  78. System.out.println("Email: " + emp.get(i).getEmail());
  79. System.out.println("Phone Number: " + emp.get(i).getPhoneNumber());
  80. System.out.println("Previous Employer: " + emp.get(i).getCompany() + " Previous job title: " + emp.get(i).getLastJobTitle() + " Years of experience: " + emp.get(i).getExperience());
  81. System.out.println("U.S. Citizen: " + emp.get(i).getCitizen() + " Native Language: " + emp.get(i).getLangauge());
  82. System.out.println("Application ID: " + emp.get(i).getAppID());
  83. }
  84. }
  85. }
  86. System.out.println("\n------------------------------------ Job Seeker Applicant's Information -----------------------------------------");
  87. for (int i = 0; i < emp.size(); i++) {
  88. if ((emp.get(i).getEmail()).equals(email)) {
  89. if (emp.get(i).getAppID() > 5000) {
  90. System.out.println("\nJob Title: " + emp.get(i).getJobTitle() + " " + emp.get(i).getFull_part());
  91. System.out.println("Name: " + emp.get(i).getFirstName() + " " + emp.get(i).getLastName());
  92. System.out.println("Email: " + emp.get(i).getEmail());
  93. System.out.println("Phone Number: " + emp.get(i).getPhoneNumber());
  94. System.out.println("Previous Employer: " + emp.get(i).getCompany() + " Previous job title: " + emp.get(i).getLastJobTitle() + " Years of experience: " + emp.get(i).getExperience());
  95. System.out.println("U.S. Citizen: " + emp.get(i).getCitizen() + " Native Language: " + emp.get(i).getLangauge());
  96. System.out.println("Application ID: " + emp.get(i).getAppID());
  97. }
  98. }
  99. }
  100.  
  101. } // End viewFullApplication Function
  102.  
  103.  
  104. } // End Applicant Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement