Java Project 22
Java Project 22
On
SUBMITTED BY:
2200032512 U.SHASHANK
V.PremaLatha
Asst.Professor,C.S.E
               KL UNIVERSITY
         Green fields, Vaddeswaram – 522 502
                 Guntur Dt., AP, India.
    DEPARTMENT OF BASIC ENGINEERING SCIENCES-1
                                     CERTIFICATE
       This is to certify that the project based laboratory report entitled Job Matching and
Application Program with GUI submitted by Mr./Ms. U.SHASHANK, CH. CHAYA KIRAN,S.TEJA
SAI bearing Regd.no 2200032512, 220003511,2200032562 to the Department of Basic
Engineering Sciences-1, KL University in partial fulfillment of the requirements for the
completion of a project in “Computational Thinking for Object Oriented Design-
22SC1203”course in I B Tech II Semester, is a bonafide record of the work carried out by
Batch-7 under my supervision during the academic year 2022-23.
        I express the sincere gratitude to our director Dr. A Jagadeesh for his administration
towards our academic growth.
        I express sincere gratitude to our Coordinator Dr. M. Siva Ganga Prasad and HOD-
BES-1 Dr. D.Haritha for her leadership and constant motivation provided in successful
completion of our academic semester. I record it as my privilege to deeply thank for providing
us the efficient faculty and facilities to make our ideas into reality.
        I express my sincere thanks to our project supervisor V.PremaLatha for her novel
association of ideas, encouragement, appreciation, and intellectual zeal which motivated us to
venture this project successfully.
                                                                          Project Associates…
                                  ABSTRACT
       This project involves the development of a GUI-based program for a consultancy firm
that aims to provide job recommendations to job seekers. The program takes in a candidate’s
details such as name, age, educational     qualifications, work experience, skills,   languages
known, and hobbies. Based on these        inputs, the program displays   a list of suitable job
recommendations.     Additionally,       the program also allows for the automatic sending of
candidate CVs to companies that they have applied to,      and provides alerts to candidates if
they have been called for an interview by any of the companies. The end goal is to streamline
the job search process for candidates and provide a more efficient and effective service for the
consultancy firm's clients.
                       INDEX
1 Introduction 1
4 Class Diagram 5
6 Implementation 13
 8     Conclusion                         38
                             INTRODUCTION
       As a consultant in a software development firm, you have been tasked with creating a
Graphical User Interface (GUI) based program. The program will collect and store detailed
information about job candidates, including their name, age, educational qualifications, work
experience, skills, languages known, and hobbies. The program should then use this
information to generate a list of suitable job opportunities for the candidate based on job
requirements. Additionally, the program will enable the candidates to send their CVs to
companies they apply to and receive notifications when they are invited for an interview. This
program aims to streamline the job application process and increase the chances of candidates
being matched with the right job opportunities.
                                              1
                                            AIM
       The aim of this project is to develop a user-friendly GUI based program that can
effectively match the candidate's details (Name, Age, Educational Qualifications, Work
Experience, Skills, Languages known and hobbies) with various job requirements and display
suitable job listings to the user. Additionally, the program should have the ability to send the
candidate's CV to the relevant companies and notify the user if they have been called for an
interview by any of the companies. The ultimate goal is to simplify the job search process for
the candidate and improve their chances of finding suitable employment opportunities.
Advantages:-
   1. The GUI based program can provide an interactive and user-friendly experience for
       the users, making it easy for them to input their details and find suitable job
       opportunities.
   2. The program can efficiently filter and match the user's details with job requirements,
       increasing the likelihood of finding a suitable job for the user.
   3. Automating the CV sending process can save time and effort for the users and
       increase their chances of getting hired by the companies.
Disadvantages:-
   1. The program heavily relies on accurate data input by the user. Any inaccuracies or
       incomplete information provided by the user can lead to incorrect job
       recommendations.
   2. The program requires constant updates and maintenance to ensure that the job
       requirements and available positions are up-to-date and relevant.
   3. There may be privacy concerns regarding the collection and storage of the user's
       personal information, and measures must be taken to ensure the security of user data.
Future Enhancements:-
   1. Integration with social media platforms: The program could be integrated
       with popular social media platforms such as LinkedIn, Facebook, and
       Twitter. This would enable candidates to easily import their details and
       professional networks from these platforms into the program.
                                               2
                 SYSTEM REQUIREMENTS
➢ SOFTWARE REQUIREMENTS:
    The major software requirements of the project are as
    follows:Language : JDK 17.0.2 ECLIPSE
    Operating System : Windows Xp or later.
➢ HARDWARE REQUIREMENTS:
 The hardware requirements that map towards the software are as follows:
                                       3
      CLASS DIAGRAM
SignupAndLoginGUI
signupButton: JButton
- loginButton: JButton
+ SignupAndLoginGUI()
+ main(String[])
             LoginFrame
      -usernameField: JTextField
    -passwordField: JPasswordField
 -rememberMeCheckBox: JCheckBox
-forgotPasswordCheckBox: JCheckBox
         -loginButton: JButton
            +LoginFrame()
          +main(String[] args)
SignUpPage
             titleLabel: JLabel
           - nameLabel: JLabel
           - emailLabel: JLabel
        - passwordLabel: JLabel
     - nameTextField: JTextField
     - emailTextField: JTextField
  - passwordField: JPasswordField
        - signUpButton: JButton
                 + SignUpPage()
+ actionPerformed(ActionEvent):void
                 4
              SignUpPage
             - titleLabel: JLabel
            - nameLabel: JLabel
            - emailLabel: JLabel
         - passwordLabel: JLabel
      - nameTextField: JTextField
      - emailTextField: JTextField
   - passwordField: JPasswordField
         - signUpButton: JButton
  + actionPerformed(e: ActionEvent):
                     void
               + SignUpPage()
        ChangePasswordFrame
            - labelUsername: JLabel
         - labelNewPassword: JLabel
       - labelRetypePassword: JLabel
             - labelMessage: JLabel
          - textUsername: JTextField
   - textNewPassword: JPasswordField
 - textRetypePassword: JPasswordField
     - buttonChangePassword: JButton
           RegistrationButton
     - registrationButton: JButton
        + RegistrationButton()
      + main(args: String[]): void
                   5
               JobRecommendation
        - RECOMMENDED_JOBS[]
               - labelName: JLabel
                 - labelAge: JLabel
            - labelEducation: JLabel
           - labelExperience: JLabel
                - labelSkills: JLabel
           - labelLanguages: JLabel
             - labelHobbies: JLabel
             - labelMessage: JLabel
             - textName: JTextField
              - textAge: JTextField
          - textEducation: JTextField
         - textExperience: JTextField
             - textSkills: JTextField
         - textLanguages: JTextField
           - textHobbies: JTextField
     - buttonRecommendJobs: JButton
              - sendButton: JButton
       +JobRecommendationFrame()
      +actionPerformed(ActionEvent)
-isJobSuitable(String, String, String, String,
                       String)
                  -sendCV(String)
InterviewPage
+InterviewPage()
                      6
           + InterviewPage
           - JLabel question1
           - JLabel question2
           - JLabel question3
           - JLabel question4
           - JLabel question5
    - JComboBox<String> options1
    - JComboBox<String> options2
    - JComboBox<String> options3
    - JComboBox<String> options4
    - JComboBox<String> options5
         - JButton sendButton
+ actionPerformed(ActionEvent e): void
           + InterviewPage()
       + main(String[] args): void
               JobLocationGUI
             - nameLabel: JLabel
          - companyLabel: JLabel
           - countryLabel: JLabel
             - stateLabel: JLabel
            - timingLabel: JLabel
          - nameField: JTextField
  - companyBox: JComboBox<String>
   - countryBox: JComboBox<String>
     - stateBox: JComboBox<String>
    - timingBox: JComboBox<String>
            - saveButton: JButton
             + JobLocationGUI()
+ actionPerformed(e: ActionEvent): void
        + main(args: String[]): void
                  7
                                      ALGORITHM
First Frame :-
Step 1:Create a new JFrame and set its title and close operation.
Step 2:Set a background image to the JFrame using ImageIcon and JLabel.
Step 3:Create a new JPanel to hold the buttons and set its layout to BoxLayout.
Step 4:Add some space to the top of the panel.
Step 5:Create a "Signup" button with color and size options, and add it to the panel.
Step 6:Add some space between the buttons.
Step 7:Create a "Login" button with color and size options, and add it to the panel.
Step 8:Set an ActionListener for each button to open a new window for the corresponding
action.
Step 9:Add the panel to the JFrame's center.
Step 10:Pack the frame, center it, and make it visible.
Second Frame:-
Step 1:Import required packages: javax.swing., java.awt.
Step 2:Define class LoginFrame extends JFrame.
Step 3:Set the size of the JFrame to 600x400 and set the layout to BorderLayout.
Step 4:Create a JPanel loginPanel with a GridBagLayout.
Step 5:Add the required components to the loginPanel, including JLabels, JTextFields,
JPasswordFields, JCheckBoxes, and a JButton.
Step 6:Add the loginPanel to a JTabbedPane and add the JTabbedPane to the JFrame.
Step 7:Add an ActionListener to the loginButton to validate the entered username and
password. If correct, show a message and open a new RegistrationButton frame; if incorrect,
show an error message.
Step 8:Add an ActionListener to the forgotPasswordCheckBox to show a message and open a
new ChangePasswordFrame frame.
Step 9:Set the default close operation for the JFrame to exit on close and make it visible.
Step 10:Define the main method to create a new instance of LoginFrame.
                                               8
Third Frame:-
Step 1:Import the necessary packages.
Step 2:Define a class called SignUpPage that extends JFrame and implements
ActionListener.
Step 3:Define instance variables for the UI components, such as the title label, name label,
email label, password label, name text field, email text field, password field, and sign-up
button.
Step 4:In the constructor, set up the frame, create the UI components, and set up the layout.
Step 5:Add the UI components to the panel, and then add the panel to the frame.
Step 6:Show the frame.
Step 7:Define the actionPerformed method to handle the sign-up button click event.
Step 8:Inside the actionPerformed method, get the user input for name, email, and password.
Step 9:Validate the input data and show a message if any field is empty.
Step 10:Perform any necessary actions, such as saving the user data to the database, and
show a success message.
Fourth Frame:-
Step 1:Create a class named "ChangePasswordFrame" that extends the "JFrame" class and
implements the "ActionListener" interface.
Step 2:Create private instance variables to hold the GUI components.
Step 3:In the constructor, set up the frame, create the GUI components, and add them to the
frame.
Step 4:Implement the actionPerformed method to handle the change password button click
event.
Step 6:Get the username, new password, and retype password from the text fields.
Step 7:If the new password and retype password match, change the password and display a
success message.
Step 8:If the new password and retype password do not match, display an error message.
Step 9:Create a main method to create a new instance of the "ChangePasswordFrame" class
and display the frame.
                                               9
Fifth Frame :-
step 1:-Create a new class called RegistrationButton that extends JFrame.
step 2:-Declare a private instance variable called registrationButton of type JButton.
step 3:-In the constructor of the RegistrationButton class:
a. Set the title of the frame to "Registration Button".
b. Set the size of the frame to 300x200.
c. Set the default close operation to exit the frame when closed.
d. Set the location of the frame to the center of the screen.
e. Create a new JButton called registrationButton with the label "Click Here to Register".
f. Add an ActionListener to the registrationButton that performs the registration actions and
opens a new frame called JobRecommendationFrame.
g. Set the layout of the frame to FlowLayout.
h. Add the registrationButton to the frame.
i. Set the frame to be visible.
step 4:-In the main method of the RegistrationButton class, create a new instance of the
RegistrationButton class.
Sixth Frame :-
step 1:Collect all necessary information for the CV, such as personal details, education,
experience, skills, etc.
step 2:Write a cover letter that highlights relevant skills and experience for the job.
step 3:Create a CV document that includes all the relevant information, such as education,
work experience, and skills.
step 4:Save the CV document in a suitable format, such as PDF or Microsoft Word.
step 5:Open your email program or job application website and compose a new message to
the company.
step 6:Attach the CV document and cover letter to the message.
step 7:Write a brief message introducing yourself and expressing your interest in the job.
step 8:Address the message to the hiring manager or recruiter, if possible.
step 9:Proofread the message and attachments for any errors or mistakes.
step 10:Send the message and wait for a response from the company.
                                                10
Seventh Frame :-
Step 1:Define a new JLabel variable to hold the result.
Step 2:In the actionPerformed() method, get the selected options from the JComboBoxes
using the getSelectedItem() method.
Step 3:Combine the selected options into a string.
Step 4:Update the text of the result label with the combined string using the setText() method.
Step 5:Add the result label to the GUI.
Step 6:Compile and run the program to see the updated behavior.
Eight Frame:-
Step 1:Import necessary libraries (Javax.swing., java.awt., java.awt.event.*).
Step 2:Create a class named JobLocationGUI which extends JFrame and implements
ActionListener.
Step 3:Define instance variables: JLabels, JTextField, JButtons, and JComboBoxes for name,
company, country, state, timing, and save button respectively.
Step 4:Create constructor JobLocationGUI() to initialize the components, set layout, and
properties of the JFrame.
Step 5:Implement the actionPerformed() method to get the values of the selected items and
generate a job letter.
Step 6:Define the main method to create an instance of the JobLocationGUI class.
                                              11
                             IMPLEMENTATION
FIRST FRAME:-
package Demo;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class SignupAndLoginGUI extends JFrame {
  private JButton signupButton, loginButton;
  public SignupAndLoginGUI() {
    setTitle("Signup and Login");
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    // Set background image
    ImageIcon backgroundImage = new ImageIcon("C:\\Users\\HP\\Downloads\\JOB
CONSULTANCYt.jpg");
    JLabel backgroundLabel = new JLabel(backgroundImage);
    backgroundLabel.setBounds(0, 0, backgroundImage.getIconWidth(),
    backgroundImage.getIconHeight());
    getContentPane().add(backgroundLabel);
    // Create a JPanel to hold the buttons
    JPanel panel = new JPanel();
    panel.setOpaque(false);
    panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
    // Add some space to the top of the panel
    panel.add(Box.createRigidArea(new Dimension(0, 200)));
    // Add the signup button to the panel
    signupButton = new JButton("Signup");
    signupButton.setBackground(Color.YELLOW);
    signupButton.setAlignmentX(Component.CENTER_ALIGNMENT);
    signupButton.setMaximumSize(new Dimension(200, 50));
    signupButton.addActionListener(new ActionListener() {
       public void actionPerformed(ActionEvent e) {
         if(e.getSource()==signupButton) {
                  new SignUpPage();
         }
       }
    });
    panel.add(signupButton);
    // Add some space between the buttons
    panel.add(Box.createRigidArea(new Dimension(0, 50)));
    // Add the login button to the panel
    loginButton = new JButton("Login");
    loginButton.setBackground(Color.RED);
    loginButton.setAlignmentX(Component.CENTER_ALIGNMENT);
    loginButton.setMaximumSize(new Dimension(200, 50));
    loginButton.addActionListener(new ActionListener() {
       public void actionPerformed(ActionEvent e) {
         if(e.getSource()==loginButton) {
                  new LoginFrame();
         }
       }
    });
    panel.add(loginButton);
    getContentPane().add(panel, BorderLayout.CENTER);
    // Pack the frame and make it visible
    pack();
                                             12
      setLocationRelativeTo(null);
      setVisible(true);
    }
    public static void main(String[] args) {
      SwingUtilities.invokeLater(new Runnable() {
         public void run() {
           new SignupAndLoginGUI();
         }
      });
    }
}
SECOND FRAME;-
package Demo;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class LoginFrame extends JFrame {
  public LoginFrame() {
    this.setSize(600, 400);
    this.setLayout(new BorderLayout());
    JPanel loginPanel = new JPanel(new GridBagLayout());
    JLabel usernameLabel = new JLabel("Username:");
    JTextField usernameField = new JTextField(20);
    JLabel passwordLabel = new JLabel("Password:");
    JPasswordField passwordField = new JPasswordField(20);
    JCheckBox rememberMeCheckBox = new JCheckBox("Remember me");
    JCheckBox forgotPasswordCheckBox = new JCheckBox("Forgot password");
    JButton loginButton = new JButton("Login");
    //JButton signUpButton = new JButton("Sign Up");
    GridBagConstraints c = new GridBagConstraints();
    c.insets = new Insets(5, 5, 5, 5);
    c.gridx = 0;
    c.gridy = 0;
    loginPanel.add(usernameLabel, c);
    c.gridx = 1;
    loginPanel.add(usernameField, c);
    c.gridx = 0;
    c.gridy = 1;
    loginPanel.add(passwordLabel, c);
    c.gridx = 1;
    loginPanel.add(passwordField, c);
    c.gridx = 0;
    c.gridy = 2;
    c.gridwidth = 2;
    loginPanel.add(rememberMeCheckBox, c);
    c.gridx = 0;
    c.gridy = 3;
    loginPanel.add(forgotPasswordCheckBox, c);
    c.gridx = 0;
    c.gridy = 4;
    c.gridwidth = 1;
    loginPanel.add(loginButton, c);
    c.gridx = 0;
    c.gridy = 4;
    c.gridwidth = 2;
    c.anchor = GridBagConstraints.CENTER; // add this line to center the button
    loginPanel.add(loginButton, c);
                                                    13
      loginButton.setBackground(Color.orange);
      JTabbedPane tabbedPane = new JTabbedPane();
      tabbedPane.addTab("Login", loginPanel);
      this.add(tabbedPane, BorderLayout.CENTER);
      loginButton.addActionListener(new ActionListener() {
         @Override
         public void actionPerformed(ActionEvent e) {
            String username = usernameField.getText();
            String password = new String(passwordField.getPassword());
            // Check if the username and password are correct
            if (username.equals("32512") && password.equals("123")) {
               JOptionPane.showMessageDialog(null, "Login successful!");{
                     new RegistrationButton();
               }
            } else {
               JOptionPane.showMessageDialog(null, "Invalid username or password!");
            }
         }
      });
      forgotPasswordCheckBox.addActionListener(new ActionListener() {
         @Override
         public void actionPerformed(ActionEvent e) {
            JOptionPane.showMessageDialog(null, "Forgot password clicked!");
            new ChangePasswordFrame();
         }
      });
      this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      this.setVisible(true);
    }
    public static void main(String[] args) {
      new LoginFrame();
    }
}
THIRD FRAME:-
package Demo;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class SignUpPage extends JFrame implements ActionListener {
  private JLabel titleLabel, nameLabel, emailLabel, passwordLabel;
  private JTextField nameTextField, emailTextField;
  private JPasswordField passwordField;
  private JButton signUpButton;
  public SignUpPage() {
    // Set up the frame
    setTitle("Designed by Shashank");
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setSize(400, 250);
    setLocationRelativeTo(null); // Center the frame on the screen
    // Create the UI components
    titleLabel = new JLabel("Sign Up");
    titleLabel.setFont(new Font("Arial", Font.BOLD, 24));
    nameLabel = new JLabel("Name:");
    emailLabel = new JLabel("Email:");
    passwordLabel = new JLabel("Password:");
    nameTextField = new JTextField(20);
    emailTextField = new JTextField(20);
    passwordField = new JPasswordField(20);
                                                  14
  signUpButton = new JButton("Sign Up");
  signUpButton.addActionListener(this);
  // Set up the layout
  JPanel panel = new JPanel(new GridBagLayout());
  GridBagConstraints c = new GridBagConstraints();
  c.gridx = 0;
  c.gridy = 0;
  c.gridwidth = 2;
  c.anchor = GridBagConstraints.CENTER;
  c.insets = new Insets(10, 0, 20, 0);
  panel.add(titleLabel, c);
  c.gridwidth = 1;
  c.gridy = 1;
  c.insets = new Insets(5, 10, 5, 0);
  panel.add(nameLabel, c);
  c.gridx = 1;
  c.insets = new Insets(5, 0, 5, 10);
  panel.add(nameTextField, c);
  c.gridx = 0;
  c.gridy = 2;
  c.insets = new Insets(5, 10, 5, 0);
  panel.add(emailLabel, c);
  c.gridx = 1;
  c.insets = new Insets(5, 0, 5, 10);
  panel.add(emailTextField, c);
  c.gridx = 0;
  c.gridy = 3;
  c.insets = new Insets(5, 10, 5, 0);
  panel.add(passwordLabel, c);
  c.gridx = 1;
  c.insets = new Insets(5, 0, 5, 10);
  panel.add(passwordField, c);
  c.gridx = 0;
  c.gridy = 4;
  c.gridwidth = 2;
  c.insets = new Insets(20, 0, 0, 0);
  panel.add(signUpButton, c);
  // Add the panel to the frame
  add(panel);
  // Show the frame
  setVisible(true);
}
public void actionPerformed(ActionEvent e) {
  // Handle the sign up button click event
  if (e.getSource() == signUpButton) {
     String name = nameTextField.getText();
     String email = emailTextField.getText();
     String password = new String(passwordField.getPassword());{
       new RegistrationButton();
     }
     // Validate the input data
     if (name.isEmpty() || email.isEmpty() || password.isEmpty()) {
         JOptionPane.showMessageDialog(this, "Please fill in all the fields.");
         return;
     }
     // Save the user data to the database or perform other actions
     // ...
     JOptionPane.showMessageDialog(this, "Sign up successful!");
  }
}
                                                   15
    public static void main(String[] args) {
      new SignUpPage();
    }
}
FOURTH FRAME:-
package Demo;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class ChangePasswordFrame extends JFrame implements ActionListener {
  JLabel labelUsername, labelNewPassword, labelRetypePassword, labelMessage;
  JTextField textUsername;
  JPasswordField textNewPassword, textRetypePassword;
  JButton buttonChangePassword;
  public ChangePasswordFrame() {
    setTitle("Change Password");
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setSize(350, 200);
    setLayout(new GridLayout(5, 2));
    labelUsername = new JLabel("Username: ");
    add(labelUsername);
    textUsername = new JTextField();
    add(textUsername);
    labelNewPassword = new JLabel("New Password: ");
    add(labelNewPassword);
    textNewPassword = new JPasswordField();
    add(textNewPassword);
    labelRetypePassword = new JLabel("Retype Password: ");
    add(labelRetypePassword);
    textRetypePassword = new JPasswordField();
    add(textRetypePassword);
    labelMessage = new JLabel("");
    add(labelMessage);
    buttonChangePassword = new JButton("Change Password");
    buttonChangePassword.addActionListener(this);
    add(buttonChangePassword);
    setVisible(true);
  }
  public void actionPerformed(ActionEvent e) {
    if (e.getSource() == buttonChangePassword) {
       // Handle change password button
       String username = textUsername.getText();
       String newPassword = new String(textNewPassword.getPassword());
       String retypePassword = new String(textRetypePassword.getPassword());
       if (newPassword.equals(retypePassword)) {
          // Your change password logic here
          labelMessage.setText("Password changed successfully.");{
                  new RegistrationButton();
          }
       } else {
          labelMessage.setText("Passwords do not match. Please try again.");
       }
    }
  }
  public static void main(String[] args) {
    new ChangePasswordFrame();
  }
}
                                               16
FIVTH FRAME:-
package Demo;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class RegistrationButton extends JFrame {
  private JButton registrationButton;
  public RegistrationButton() {
    setTitle("Registration Button");
    setSize(300, 200);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setLocationRelativeTo(null);
    // Create a new button with "Register" label
    registrationButton = new JButton("Click Her to Register");
    // Add an action listener to the button
    registrationButton.addActionListener(new ActionListener() {
       public void actionPerformed(ActionEvent e) {
          // Perform registration actions here
         new JobRecommendationFrame();
          //JOptionPane.showMessageDialog(null, "Registration successful!");
       }
    });
    // Add the button to the frame
    setLayout(new FlowLayout());
    add(registrationButton);
    setVisible(true);
  }
  public static void main(String[] args) {
    new RegistrationButton();
  }
}
SIXTH FRAME:-
package Demo;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.ArrayList;
import java.util.Random;
public class JobRecommendationFrame extends JFrame implements ActionListener {
  private static final String[] RECOMMENDED_JOBS = {
        "Software Engineer",
        "Web Developer",
        "Data Analyst",
        "Business Analyst"
  };
  private JLabel labelName, labelAge, labelEducation, labelExperience, labelSkills, labelLanguages,
labelHobbies, labelMessage;
  private JTextField textName, textAge, textEducation, textExperience, textSkills, textLanguages,
textHobbies;
  private JButton buttonRecommendJobs,sendButton;
  public JobRecommendationFrame() {
     setTitle("Job Recommendation");
     setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
     setSize(500, 350);
     setLayout(new GridLayout(9, 2));
     JTextField jTextField = new JTextField();
                                                  17
               jTextField.setFont(new Font("Arial", Font.PLAIN, 24));;
  labelName = new JLabel("NAME:");
  add(labelName);
  textName = new JTextField();
  add(textName);
  labelAge = new JLabel("AGE:");
  add(labelAge);
  textAge = new JTextField();
  add(textAge);
  labelEducation = new JLabel("EDUCATION:");
  add(labelEducation);
  textEducation = new JTextField();
  add(textEducation);
  labelExperience = new JLabel("EXPERIENCE:");
  add(labelExperience);
  textExperience = new JTextField();
  add(textExperience);
  labelSkills = new JLabel("SKILLS:");
  add(labelSkills);
  textSkills = new JTextField();
  add(textSkills);
  labelLanguages = new JLabel("LANGUAGES:");
  add(labelLanguages);
  textLanguages = new JTextField();
  add(textLanguages);
  labelHobbies = new JLabel("HOBBIES:");
  add(labelHobbies);
  textHobbies = new JTextField();
  add(textHobbies);
  labelMessage = new JLabel("");
  add(labelMessage);
  buttonRecommendJobs = new JButton("Recommend Jobs");
  buttonRecommendJobs.setBackground(Color.orange);
  buttonRecommendJobs.addActionListener(this);
  add(buttonRecommendJobs);
  sendButton = new JButton("Send CV");
  sendButton.setBackground(Color.RED);
  sendButton.addActionListener(this);
  add(sendButton);
  setVisible(true);
}
public void actionPerformed(ActionEvent e) {
  if (e.getSource() == buttonRecommendJobs) {
     // Handle recommend jobs button
     String name = textName.getText();
     int age = Integer.parseInt(textAge.getText());
     String education = textEducation.getText();
     String experience = textExperience.getText();
     String skills = textSkills.getText();
     String languages = textLanguages.getText();
     String hobbies = textHobbies.getText();
     // Your job recommendation logic here
     ArrayList<String> recommendedJobs = new ArrayList<String>();
     for (String job : RECOMMENDED_JOBS) {
        if (isJobSuitable(job, education, experience, skills, languages, hobbies)) {
           recommendedJobs.add(job);
        }
     }
     if (recommendedJobs.isEmpty()) {
        labelMessage.setText("No recommended jobs for you.");
                                                    18
         return;
      }
      // Display recommended jobs
      String message = "Recommended Jobs:";
      for (String job : recommendedJobs) {
         message += " " + job + ",";
      }
      message = message.substring(0, message.length() - 1);
      labelMessage.setText(message);
      // Send CVs to companies
      for (String job : recommendedJobs) {
         sendCV(job);
      }
      // Display interview messages
      int numInterviews = new Random().nextInt(recommendedJobs.size()) + 1;
      message += " - You have been called for interview" + (numInterviews > 1 ? "s" : "") + " by:";
      for (int i = 0; i < numInterviews; i++) {
         message += " " + recommendedJobs.get(i) + ",";
      }
      message = message.substring(0,message.length() - 1);
      labelMessage.setText(message);
     }
     else if (e.getSource() == sendButton) {
         JOptionPane.showMessageDialog(null, "Congratulations CV send to company!\n You called for
an interview ");
         new InterviewPage();
     }
     }
  private boolean isJobSuitable(String job, String education, String experience, String skills, String
languages, String hobbies) {
     // Your job suitability logic here
     switch (job) {
        case "Software Engineer":
           return (education.contains("Computer Science") || education.contains("B.tech")) &&
                 (experience.contains("Software Development")||experience.contains("Fresher")) &&
                 (skills.contains("Java") || skills.contains("Python") || skills.contains("C++")) &&
                 (languages.contains("English"));
        case "Web Developer":
           return (education.contains("Computer Science") || education.contains("Web Development"))
&&
                 (experience.contains("Web Development")) &&
                 (skills.contains("HTML") || skills.contains("CSS") || skills.contains("JavaScript")) &&
                 (languages.contains("English"));
        case "Data Analyst":
           return (education.contains("Data Analytics") || education.contains("Data Science")) &&
                 (experience.contains("Data Analytics")) &&
                 (skills.contains("SQL") || skills.contains("Excel")) &&
                 (languages.contains("English"));
        case "Business Analyst":
           return (education.contains("Business Administration") || education.contains("Management
Information Systems")) &&
                 (experience.contains("Business Analysis")) &&
                 (skills.contains("Data Analysis") || skills.contains("Project Management")) &&
                 (languages.contains("English"));
        default:
           return false;
     }
  }
  private void sendCV(String job) {
     // Your CV sending logic here
                                                   19
      System.out.println("Sent CV for " + job);
    }
    public static void main(String[] args) {
      new JobRecommendationFrame();
    }
}
SEVENTH FRAME:-
package Demo;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class InterviewPage extends JFrame implements ActionListener {
  // GUI components
  private JLabel question1, question2, question3, question4, question5;
  private JComboBox<String> options1, options2, options3, options4, options5;
  private JButton sendButton;
  // Constructor
  public InterviewPage() {
     // Set up the GUI components
     question1 = new JLabel("Question 1: What is your experience with Java programming?");
     String[] options1Array = {"None", "Beginner", "Intermediate", "Advanced"};
     options1 = new JComboBox<>(options1Array);
     question2 = new JLabel("Question 2: What is your experience with databases?");
     String[] options2Array = {"None", "Beginner", "Intermediate", "Advanced"};
     options2 = new JComboBox<>(options2Array);
     question3 = new JLabel("Question 3: What is your experience with web development?");
     String[] options3Array = {"None", "Beginner", "Intermediate", "Advanced"};
     options3 = new JComboBox<>(options3Array);
     question4 = new JLabel("Question 4: What is your experience with team collaboration?");
     String[] options4Array = {"None", "Beginner", "Intermediate", "Advanced"};
     options4 = new JComboBox<>(options4Array);
     question5 = new JLabel("Question 5: What is your experience with problem-solving?");
     String[] options5Array = {"None", "Beginner", "Intermediate", "Advanced"};
     options5 = new JComboBox<>(options5Array);
     sendButton = new JButton("Send Answers and Choose the job location");
     sendButton.addActionListener(this);
     // Set up the layout
     setLayout(new GridLayout(6, 2));
     add(question1);             add(options1);        add(question2);        add(options2);
     add(question3);             add(options3);        add(question4);        add(options4);
     add(question5);             add(options5);        add(new JLabel(""));
     add(sendButton);        // Set up the JFrame
     setTitle("Interview Page");
     setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
     setSize(500, 300);
     setVisible(true);
  }
  // ActionListener for the send button
  public void actionPerformed(ActionEvent e) {
     if (e.getSource() == sendButton) {
        // Get the selected options
        new JobLocationGUI();
     }
  }
  // Main method to run the program
  public static void main(String[] args) {
     new InterviewPage();
  }
                                                  20
}
Final Frame:-
package Demo;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class JobLocationGUI extends JFrame implements ActionListener {
  private JLabel nameLabel, companyLabel, countryLabel, stateLabel, timingLabel;
  private JTextField nameField;
  private JComboBox<String> companyBox, countryBox, stateBox, timingBox;
  private JButton saveButton;
  public JobLocationGUI() {
    super("Create Job Location");
    // Create labels
    nameLabel = new JLabel("Name:");
    companyLabel = new JLabel("Company:");
    countryLabel = new JLabel("Country:");
    stateLabel = new JLabel("State:");
    timingLabel = new JLabel("Timing:");
    // Create text field
    nameField = new JTextField(20);
    // Create combo boxes
    String[] companies = {"Google", "Microsoft", "Apple", "Amazon"};
    companyBox = new JComboBox<String>(companies);
    String[] countries = {"USA", "Canada", "Mexico", "UK", "Germany", "Japan"};
    countryBox = new JComboBox<String>(countries);
    String[] states = {"California", "New York", "Texas", "Florida", "Ontario", "Quebec", "Tokyo",
"Berlin"};
    stateBox = new JComboBox<String>(states);
    String[] timings = {"Full-time", "Part-time", "Contract", "Internship"};
    timingBox = new JComboBox<String>(timings);
    // Create save button
    saveButton = new JButton("Save");
    saveButton.addActionListener(this);
    // Create panel
    JPanel panel = new JPanel();
    panel.setLayout(new GridLayout(5, 2));
    panel.add(nameLabel);
    panel.add(nameField);
    panel.add(companyLabel);
    panel.add(companyBox);
    panel.add(countryLabel);
    panel.add(countryBox);
    panel.add(stateLabel);
    panel.add(stateBox);
    panel.add(timingLabel);
    panel.add(timingBox);
          // Add components to frame
    add(panel, BorderLayout.CENTER);
    add(saveButton, BorderLayout.SOUTH);
    // Set frame properties
    setSize(400, 200);
    setLocationRelativeTo(null);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setVisible(true);
  }
  public void actionPerformed(ActionEvent e) {
                                                21
     if (e.getSource() == saveButton) {
        String name = nameField.getText();
        String company = (String)companyBox.getSelectedItem();
        String country = (String)countryBox.getSelectedItem();
        String state = (String)stateBox.getSelectedItem();
        String timing = (String)timingBox.getSelectedItem();
        // Generate job letter
        String jobLetter = "Dear " + name + ",\n\nCongratulations! We are pleased to offer you a " +
timing + " position at " + company + " located in " + state + ", " + country + ".\n\nPlease let us know if
you have any questions or concerns. We look forward to hearing from you soon.\n\nSincerely,\nThe " +
company + " Team";
        // Display job letter
        JOptionPane.showMessageDialog(this, jobLetter);
     }
  }
  Public static void main(String[] args) {
     new JobLocationGUI();
  }
}
                                                    22
           INTEGRATION AND SYSTEM TESTING
OUTPUTS
Screen Shots:
                         23
24
25
                                      CONCLUSION
       In conclusion, developing a GUI-based program that helps candidates find suitable jobs
and sends their CV's to companies is an excellent initiative for a consultancy firm. With the
program's help, job seekers can easily input their details, and the program can then suggest jobs
that align with their qualifications, skills, and hobbies. Additionally, the program can send their
CV's to companies they've applied for, streamlining the job application process.
       Furthermore, the program can notify job seekers if they've been called for an interview,
reducing the stress and anxiety associated with waiting for a job interview. The program's user-
friendly interface and automated features make it a valuable tool for job seekers, as it simplifies
the job application process and reduces the time and effort required to find suitable
employment.
       Overall, the development of this program is an innovative solution that can help job
seekers find suitable jobs and streamline the job application process, ultimately benefiting
both job seekers and employers.
26