<repo_name>YoumingZheng/Animal-Shelter_JAVA-Project_NetBeans<file_sep>/FinalProject/FinalProject/src/userinterface/VolunteerWorkArea/AssignJPanel.java
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package userinterface.VolunteerWorkArea;

import Business.EcoSystem;
import Business.Enterprise.AnimalShelterEnterprise;
import Business.Enterprise.Enterprise;
import Business.Network.Network;
import Business.Organization.InspectionOrganization;
import Business.Organization.Organization;
import Business.Person.Volunteer;
import Business.UserAccount.UserAccount;
import Business.WorkQueue.AdoptionWorkRequest;
import Business.WorkQueue.InspectionWorkRequest;
import Business.WorkQueue.WorkRequest;
import java.awt.CardLayout;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author brandonz
 */
public class AssignJPanel extends javax.swing.JPanel {

    /**
     * Creates new form AssignJPanel
     */
    private JPanel userProcessContainer;
    private EcoSystem business;
    private UserAccount userAccount;
    private Organization organization;
    private Enterprise enterprise;
    private Network netWork;
    private EcoSystem system;
    private InspectionOrganization inspectionOrganization;
    public AssignJPanel(JPanel userProcessContainer,UserAccount userAccount, Organization organization, Enterprise enterprise, Network network,EcoSystem system) {
        initComponents();
        this.userProcessContainer = userProcessContainer;
        this.system = system;
        this.userAccount = userAccount;
        this.organization = organization;
        this.enterprise = enterprise;
        this.netWork = network;
        
        populateTable1();
        
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        refreshJButton = new javax.swing.JButton();
        assignJButton = new javax.swing.JButton();
        processJButton = new javax.swing.JButton();
        jScrollPane3 = new javax.swing.JScrollPane();
        jTable3 = new javax.swing.JTable();
        zipTxt = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jScrollPane4 = new javax.swing.JScrollPane();
        jTable4 = new javax.swing.JTable();
        jButton1 = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();

        setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        refreshJButton.setText("Search");
        refreshJButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                refreshJButtonActionPerformed(evt);
            }
        });
        add(refreshJButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(211, 51, -1, -1));

        assignJButton.setText("Assign to me");
        assignJButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                assignJButtonActionPerformed(evt);
            }
        });
        add(assignJButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(49, 277, -1, -1));

        processJButton.setText("Process");
        processJButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                processJButtonActionPerformed(evt);
            }
        });
        add(processJButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(49, 573, 137, -1));

        jTable3.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "<NAME>", "Address", "Species", "Breed", "Gender", "Color"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, true, false, true, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane3.setViewportView(jTable3);

        add(jScrollPane3, new org.netbeans.lib.awtextra.AbsoluteConstraints(49, 83, 816, 176));
        add(zipTxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(78, 52, 115, -1));

        jLabel3.setText("Zip");
        add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(49, 55, -1, -1));

        jTable4.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Customer Name", "Address", "Species", "Breed", "Gender", "Color"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, true, false, true, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane4.setViewportView(jTable4);

        add(jScrollPane4, new org.netbeans.lib.awtextra.AbsoluteConstraints(49, 354, 816, 201));

        jButton1.setText("Back");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(49, 629, -1, -1));

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 36)); // NOI18N
        jLabel1.setText("Assign Inspection");
        add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 0, -1, -1));
    }// </editor-fold>//GEN-END:initComponents

    private void refreshJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_refreshJButtonActionPerformed
        
        populateTable();
    }//GEN-LAST:event_refreshJButtonActionPerformed

    public void populateTable() {
       
        
        DefaultTableModel model = (DefaultTableModel) jTable3.getModel();
        model.setRowCount(0);
        /*if(zipTxt.getText().equals("") || zipTxt.getText().isEmpty()){
            JOptionPane.showMessageDialog(null, "please type zip");
        }*/
        
        if(zipTxt.getText().equals("") || zipTxt.getText().isEmpty()){
            for(InspectionWorkRequest isp : enterprise.getInspectionWorkQueue().getWorkRequestList()){
            if(isp.getStatus().equalsIgnoreCase("Sent")){
                Object[] row = new Object[6];
                row[0] = isp;
                row[1] = isp.getCustomer().getAddress();
                row[2] = isp.getAnimal().getSpecies();
                row[3] = isp.getAnimal().getBreed();
                row[4] = isp.getAnimal().getGender();
                row[5] = isp.getAnimal().getColor();
                model.addRow(row);
            }
               
            
        }
        }else{
            for(InspectionWorkRequest isp : enterprise.getInspectionWorkQueue().getWorkRequestList()){
            if(isp.getCustomer().getZipCode().equals(zipTxt.getText()) && isp.getStatus().equalsIgnoreCase("Sent")){
                Object[] row = new Object[6];
                row[0] = isp;
                row[1] = isp.getCustomer().getAddress();
                row[2] = isp.getAnimal().getSpecies();
                row[3] = isp.getAnimal().getBreed();
                row[4] = isp.getAnimal().getGender();
                row[5] = isp.getAnimal().getColor();
                model.addRow(row);
            }
        }
        }
        
        
        /*for (Network network : business.getNetworkList()) {
            for (Enterprise enterprise : network.getEnterpriseDirectory().getEnterpriseList()) {
                if(enterprise instanceof AnimalShelterEnterprise){
                    //if(ase.getZipCode().equals(enterprise))
                    for(Organization o: enterprise.getOrganizationDirectory().getOrganizationList())
                        if(o instanceof InspectionOrganization)
                            for (WorkRequest request : inspectionOrganization.getWorkQueueReceived().getWorkRequestList()) {
                                 Object[] row = new Object[6];
                                row[0] = request.getAnimal().getID();
                                row[1] = request.getAnimal().getSpecies();
                                row[2] = request.getAnimal().getBreed();
                                row[3] = request.getAnimal().getGender();
                                row[4] = request.getAnimal().getColor();
                                row[5] = request.getAnimal().getAge();
                            }
                }
            }
        }*/
    }
    
     public void populateTable1() {
         DefaultTableModel model = (DefaultTableModel) jTable4.getModel();
         model.setRowCount(0);
         
         for(InspectionWorkRequest iwr:userAccount.getInspectionWorkQueue().getWorkRequestList()){
            Object[] row = new Object[6];
            row[0] = iwr;
            row[1] = iwr.getCustomer().getAddress();
            row[2] = iwr.getAnimal().getSpecies();
            row[3] = iwr.getAnimal().getBreed();
            row[4] = iwr.getAnimal().getGender();
            row[5] = iwr.getAnimal().getColor();
            model.addRow(row);
         }
         
         
         /*
         for (InspectionWorkRequest iwr : list){
            Object[] row = new Object[6];
            row[0] =iwr;
            row[1] = iwr.getCustomer().getAddress();
            row[3] = iwr.getAnimal().getSpecies();
            row[4] = iwr.getAnimal().getBreed();
            row[5] = iwr.getAnimal().getColor();
            if(!iwr.getStatus().equals("Generated")){
                row[6] =df.format(iwr.getLastTimeCheckDate()) ;
            }else
                row[6] = "Just Generated";
            model.addRow(row);
        }
         */
         
    }
    private void assignJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_assignJButtonActionPerformed

        int selectedRow = jTable3.getSelectedRow();

        if (selectedRow >= 0) {
            InspectionWorkRequest request = (InspectionWorkRequest) jTable3.getValueAt(selectedRow, 0);
            request.setStatus("Assigned");
            request.setVolunteer((Volunteer) userAccount.getPerson());
            enterprise.getInspectionWorkQueue().getWorkRequestList().remove(request);
            userAccount.getInspectionWorkQueue().getWorkRequestList().add(request);
            //populateTable1(request);
            populateTable1();
            populateTable();
        } else {
            JOptionPane.showMessageDialog(null, "Choose a row to assign.");
        }

    }//GEN-LAST:event_assignJButtonActionPerformed

    private void processJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_processJButtonActionPerformed
        int selectedRow = jTable4.getSelectedRow();
        if (selectedRow >= 0) {
            InspectionWorkRequest request = (InspectionWorkRequest) jTable4.getValueAt(selectedRow, 0);
            GradeJPanel g = new GradeJPanel(userProcessContainer,userAccount,request);
            userProcessContainer.add("g",g);    
            CardLayout cardLayout = (CardLayout)userProcessContainer.getLayout();
            cardLayout.show(userProcessContainer,"g");  
  
        } else {
            JOptionPane.showMessageDialog(null, "Choose a row to process.");
        }


//        int selectedRow = workRequestJTable.getSelectedRow();
//
//        if (selectedRow >= 0) {
//            InspectionWorkRequest request = (InspectionWorkRequest) workRequestJTable.getValueAt(selectedRow, 0);
//
//            request.setStatus("Processing");
//
//            ProcessWorkRequestJPanel processWorkRequestJPanel = new ProcessWorkRequestJPanel(userProcessContainer, request);
//            userProcessContainer.add("processWorkRequestJPanel", processWorkRequestJPanel);
//            CardLayout layout = (CardLayout) userProcessContainer.getLayout();
//            layout.next(userProcessContainer);
//
//        } else {
//            JOptionPane.showMessageDialog(null, "Please select a request message to process.");
//            return;
//        }
    }//GEN-LAST:event_processJButtonActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        userProcessContainer.remove(this);
        CardLayout layout = (CardLayout) userProcessContainer.getLayout();
        layout.previous(userProcessContainer);
        // TODO add your handling code here:
    }//GEN-LAST:event_jButton1ActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton assignJButton;
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JTable jTable3;
    private javax.swing.JTable jTable4;
    private javax.swing.JButton processJButton;
    private javax.swing.JButton refreshJButton;
    private javax.swing.JTextField zipTxt;
    // End of variables declaration//GEN-END:variables

   

   

 
}
<file_sep>/FinalProject/FinalProject/src/Interface/InspectionManager/InspectionManagerWorkArea.java
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Interface.InspectionManager;

import Business.EcoSystem;
import Business.Enterprise.Enterprise;
import Business.Network.Network;
import Business.Organization.Organization;
import Business.UserAccount.UserAccount;
import java.awt.CardLayout;
import javax.swing.JPanel;

/**
 *
 * @author <NAME>
 */
public class InspectionManagerWorkArea extends javax.swing.JPanel {

    /**
     * Creates new form InspectionManagerWorkArea
     */
    JPanel userProcessContainer;
    UserAccount userAccount;
    Organization organization;
    Enterprise enterprise;
    Network network;
    EcoSystem system;

    public InspectionManagerWorkArea(JPanel userProcessContainer, UserAccount account, Organization organization, Enterprise enterprise, Network network, EcoSystem system) {
        initComponents();
        this.userProcessContainer=userProcessContainer;
        this.userAccount=account;
        this.organization=organization;
        this.enterprise=enterprise;
        this.network=network;
        this.system=system;

    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jButton1 = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();

        setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jButton1.setText("Select and Send Inspection Work Request");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(251, 101, -1, -1));

        jButton3.setText("Analysis");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });
        add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(251, 284, 271, -1));

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 36)); // NOI18N
        jLabel1.setText("Inspection Manager");
        add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 13, -1, -1));
    }// </editor-fold>//GEN-END:initComponents

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
        SelectInspectionWorkRequest siwr = new SelectInspectionWorkRequest(userProcessContainer, userAccount, organization,  enterprise, network, system);
        userProcessContainer.add("SelectInspectionWorkRequest", siwr);
        CardLayout layout = (CardLayout) userProcessContainer.getLayout();
        layout.next(userProcessContainer);
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        // TODO add your handling code here:
        Analysis analysis = new Analysis(userProcessContainer, userAccount, organization,  enterprise, network, system);
        userProcessContainer.add("Analysis", analysis);
        CardLayout layout = (CardLayout) userProcessContainer.getLayout();
        layout.next(userProcessContainer);
    }//GEN-LAST:event_jButton3ActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton3;
    private javax.swing.JLabel jLabel1;
    // End of variables declaration//GEN-END:variables
}
<file_sep>/FinalProject/FinalProject/src/Business/WorkQueue/LostAnimalWorkRequest.java
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Business.WorkQueue;

import Business.Person.Customer;
import javax.swing.ImageIcon;

/**
 *
 * @author <NAME>
 */
public class LostAnimalWorkRequest extends WorkRequest{
     private String Result;
     private Customer lostCustomer;
     private boolean validId;
     private boolean vaccineHistory;
     private boolean receipt;
     private ImageIcon icon;
     private String picturepath;

    public String getPicturepath() {
        return picturepath;
    }

    public void setPicturepath(String picturepath) {
        this.picturepath = picturepath;
    }

    public ImageIcon getIcon() {
        return icon;
    }

    public void setIcon(ImageIcon icon) {
        this.icon = icon;
    }
     

    public String getResult() {
        return Result;
    }

    public void setResult(String Result) {
        this.Result = Result;
    }

    public Customer getLostCustomer() {
        return lostCustomer;
    }

    public void setLostCustomer(Customer lostCustomer) {
        this.lostCustomer = lostCustomer;
    }

    public boolean isValidId() {
        return validId;
    }

    public void setValidId(boolean validId) {
        this.validId = validId;
    }

    public boolean isVaccineHistory() {
        return vaccineHistory;
    }

    public void setVaccineHistory(boolean vaccineHistory) {
        this.vaccineHistory = vaccineHistory;
    }

    public boolean isReceipt() {
        return receipt;
    }

    public void setReceipt(boolean receipt) {
        this.receipt = receipt;
    }
    
    @Override
    public String toString() {
        return lostCustomer.getName();
    }
}
<file_sep>/FinalProject/FinalProject/src/Business/WorkQueue/InspectionWorkRequest.java
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Business.WorkQueue;

import Business.Person.Customer;
import Business.Person.Volunteer;
import java.util.Date;

/**
 *
 * @author brandonz
 */
public class InspectionWorkRequest extends WorkRequest{
    private String Result;
    private Date lastTimeCheckDate;
    private Customer customer;
    private String firstInspection;
    private String secondInspection;
    private String thirdInspection;
    private Volunteer volunteer;
    
    public InspectionWorkRequest(){
        super();
        lastTimeCheckDate=this.getRequestDate();
    }

    public Volunteer getVolunteer() {
        return volunteer;
    }

    public void setVolunteer(Volunteer volunteer) {
        this.volunteer = volunteer;
    }

    public String getResult() {
        return Result;
    }

    public void setResult(String Result) {
        this.Result = Result;
    }

    public Date getLastTimeCheckDate() {
        return lastTimeCheckDate;
    }

    public void setLastTimeCheckDate(Date lastTimeCheckDate) {
        this.lastTimeCheckDate = lastTimeCheckDate;
    }

    public Customer getCustomer() {
        return customer;
    }

    public void setCustomer(Customer customer) {
        this.customer = customer;
    }

    public String getFirstInspection() {
        return firstInspection;
    }

    public void setFirstInspection(String firstInspection) {
        this.firstInspection = firstInspection;
    }

    public String getSecondInspection() {
        return secondInspection;
    }

    public void setSecondInspection(String secondInspection) {
        this.secondInspection = secondInspection;
    }

    public String getThirdInspection() {
        return thirdInspection;
    }

    public void setThirdInspection(String thirdInspection) {
        this.thirdInspection = thirdInspection;
    }
    
    public boolean nextTimeCheck(double i){
        long day=(((new Date(lastTimeCheckDate.getTime()+(long)30*24*60*60*1000)).getTime())-(lastTimeCheckDate.getTime()))/(24*60*60*1000);
        if(true) //     day<=i
            return true;
        else
            return false;
    }

    @Override
    public String toString() {
        return customer.getName();
    }
    
     
}
<file_sep>/FinalProject/FinalProject/src/userinterface/VolunteerWorkArea/VolunteerWorkArea.java
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package userinterface.VolunteerWorkArea;

import Business.EcoSystem;
import Business.Enterprise.Enterprise;
import Business.Network.Network;
import Business.Organization.InspectionOrganization;
import Business.Organization.Organization;
import Business.UserAccount.UserAccount;
import java.awt.CardLayout;
import javax.swing.JPanel;

/**
 *
 * @author brandonz
 */
public class VolunteerWorkArea extends javax.swing.JPanel {

    /**
     * Creates new form VolunteerWorkArea
     */
    JPanel userProcessContainer;
    UserAccount userAccount;
    Organization organization;
    Enterprise enterprise;
    Network network;
    EcoSystem system;
    public VolunteerWorkArea(JPanel userProcessContainer, UserAccount account, Organization organization, Enterprise enterprise, Network network, EcoSystem system) {
        initComponents();
        this.userProcessContainer=userProcessContainer;
        this.userAccount=account;
        this.organization=organization;
        this.enterprise=enterprise;
        this.network=network;
        this.system=system;
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        btnAssign = new javax.swing.JButton();
        btnFeedback = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();

        setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        btnAssign.setText("Assign");
        btnAssign.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAssignActionPerformed(evt);
            }
        });
        add(btnAssign, new org.netbeans.lib.awtextra.AbsoluteConstraints(169, 124, 129, -1));

        btnFeedback.setText("Feedback");
        btnFeedback.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnFeedbackActionPerformed(evt);
            }
        });
        add(btnFeedback, new org.netbeans.lib.awtextra.AbsoluteConstraints(169, 203, 129, -1));

        jLabel2.setFont(new java.awt.Font("Tahoma", 0, 36)); // NOI18N
        jLabel2.setText("Volunteer Work Area");
        add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 13, -1, -1));
    }// </editor-fold>//GEN-END:initComponents

    private void btnAssignActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAssignActionPerformed
        AssignJPanel muajp = new AssignJPanel(userProcessContainer, userAccount, organization,  enterprise, network, system);
        userProcessContainer.add("AssignJPanel", muajp);

        CardLayout layout = (CardLayout) userProcessContainer.getLayout();
        layout.next(userProcessContainer);// TODO add your handling code here:
    }//GEN-LAST:event_btnAssignActionPerformed

    private void btnFeedbackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFeedbackActionPerformed
        //        FeedbackJPanel muajp = new FeedbackJPanel(userProcessContainer, system, userAccount, (InspectionOrganization)organization);
        //         userProcessContainer.add("FeedbackJPanel", muajp);
        //
        //         CardLayout layout = (CardLayout) userProcessContainer.getLayout();
        //         layout.next(userProcessContainer); // TODO add your handling code here:
    }//GEN-LAST:event_btnFeedbackActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAssign;
    private javax.swing.JButton btnFeedback;
    private javax.swing.JLabel jLabel2;
    // End of variables declaration//GEN-END:variables
}
<file_sep>/FinalProject/FinalProject/src/Interface/InspectionManager/SelectInspectionWorkRequest.java
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Interface.InspectionManager;

import Business.EcoSystem;
import Business.Enterprise.CustomerAndVolunteerEnterprise;
import Business.Enterprise.Enterprise;
import Business.Network.Network;
import Business.Organization.Organization;
import Business.UserAccount.UserAccount;
import Business.WorkQueue.InspectionWorkRequest;
import java.awt.CardLayout;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author <NAME>
 */
public class SelectInspectionWorkRequest extends javax.swing.JPanel {

    /**
     * Creates new form SendInspectionWorkRequest
     */
    JPanel userProcessContainer;
    UserAccount userAccount;
    Organization organization;
    Enterprise enterprise;
    Network network;
    EcoSystem system;
    ArrayList<InspectionWorkRequest> upperList=new ArrayList<InspectionWorkRequest>();
    ArrayList<InspectionWorkRequest> lowerList=new ArrayList<InspectionWorkRequest>();
    SimpleDateFormat df=new SimpleDateFormat("yyyy-MM-dd");

    SelectInspectionWorkRequest(JPanel userProcessContainer, UserAccount userAccount, Organization organization, Enterprise enterprise, Network network, EcoSystem system) {
        initComponents();
        this.userProcessContainer=userProcessContainer;
        this.userAccount=userAccount;
        this.organization=organization;
        this.enterprise=enterprise;
        this.network=network;
        this.system=system;
        
        populateComboBox();
    }
    
    public void populateComboBox(){
        jComboBox1.removeAllItems();
        
        double a=5;
        double b=10;
        double c=15;
        double d=25;
        jComboBox1.addItem(a);
        jComboBox1.addItem(b);
        jComboBox1.addItem(c);
        jComboBox1.addItem(d);

    }
    
    public void populateUpperTable(ArrayList<InspectionWorkRequest> list){
        DefaultTableModel model = (DefaultTableModel) jTable1.getModel();
        
        model.setRowCount(0);
        
        for (InspectionWorkRequest iwr : list){
            Object[] row = new Object[6];
            row[0] =iwr;
            row[1] = iwr.getCustomer().getAddress();
            row[2] = iwr.getAnimal().getSpecies();
            row[3] = iwr.getAnimal().getBreed();
            row[4] = iwr.getAnimal().getColor();
            if(!iwr.getStatus().equals("Generated")){
                row[5] =df.format(iwr.getLastTimeCheckDate()) ;
            }else
                row[5] = "Just Generated";
            model.addRow(row);
        }
    }
    
    
    public void populateLowerTable(ArrayList<InspectionWorkRequest> list){
        DefaultTableModel model = (DefaultTableModel) jTable2.getModel();
        
        model.setRowCount(0);
        
        for (InspectionWorkRequest iwr : list){
            Object[] row = new Object[6];
            row[0] =iwr;
            row[1] = iwr.getCustomer().getAddress();
            row[2] = iwr.getAnimal().getID();
            row[3] = iwr.getVolunteer()==null ? "Unassigned" : iwr.getVolunteer().getName();
            row[4] = df.format(new Date(iwr.getLastTimeCheckDate().getTime()+(long)30*24*60*60*1000));
            row[5] = iwr.getStatus();
            model.addRow(row);
        }
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        buttonGroup3 = new javax.swing.ButtonGroup();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        jComboBox1 = new javax.swing.JComboBox();
        jLabel1 = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTable2 = new javax.swing.JTable();
        jButton3 = new javax.swing.JButton();
        jButton4 = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        txtAddress = new javax.swing.JTextField();
        txtEmail = new javax.swing.JTextField();
        txtName = new javax.swing.JTextField();
        txtID = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        txtVAddress = new javax.swing.JTextField();
        txtVEmail = new javax.swing.JTextField();
        txtVName = new javax.swing.JTextField();
        txtVID = new javax.swing.JTextField();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        txtBreed = new javax.swing.JTextField();
        txtColor = new javax.swing.JTextField();
        txtSpecies = new javax.swing.JTextField();
        txtAID = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jRadioButton1 = new javax.swing.JRadioButton();
        jRadioButton2 = new javax.swing.JRadioButton();
        jRadioButton3 = new javax.swing.JRadioButton();
        jButton6 = new javax.swing.JButton();
        jButton7 = new javax.swing.JButton();
        jLabel17 = new javax.swing.JLabel();

        setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Adopter Name", "Address", "Animal Species", "Breed", "Color", "Last Check Time"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(jTable1);
        if (jTable1.getColumnModel().getColumnCount() > 0) {
            jTable1.getColumnModel().getColumn(0).setResizable(false);
            jTable1.getColumnModel().getColumn(1).setResizable(false);
            jTable1.getColumnModel().getColumn(2).setResizable(false);
            jTable1.getColumnModel().getColumn(3).setResizable(false);
            jTable1.getColumnModel().getColumn(4).setResizable(false);
            jTable1.getColumnModel().getColumn(5).setResizable(false);
        }

        add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 83, 906, 199));

        jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        jComboBox1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBox1ActionPerformed(evt);
            }
        });
        add(jComboBox1, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 52, -1, -1));

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
        jLabel1.setText("days from next Inspection");
        add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(81, 52, -1, -1));

        jButton1.setText("Send single Request to Volunteers");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(689, 289, -1, -1));

        jButton2.setText("Send all on the list to Volunteers");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });
        add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 289, -1, -1));

        jTable2.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Adopter Name", "Address", "Animal ID", "Volunteer Name", "Supposed Check Time", "Status"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane2.setViewportView(jTable2);

        add(jScrollPane2, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 397, 906, 215));

        jButton3.setText("Check out");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });
        add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(500, 365, -1, -1));

        jButton4.setText("See Details");
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });
        add(jButton4, new org.netbeans.lib.awtextra.AbsoluteConstraints(821, 619, -1, -1));

        jLabel2.setFont(new java.awt.Font("Tahoma", 3, 18)); // NOI18N
        jLabel2.setText("Customer:");
        add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 657, -1, -1));

        jLabel3.setFont(new java.awt.Font("Tahoma", 3, 18)); // NOI18N
        jLabel3.setText("Volunteer:");
        add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(331, 657, -1, -1));

        jLabel4.setFont(new java.awt.Font("Tahoma", 3, 18)); // NOI18N
        jLabel4.setText("Animal:");
        add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(632, 657, -1, -1));

        jLabel5.setText("Name:");
        add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 707, -1, -1));

        jLabel6.setText("ID:");
        add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 747, -1, -1));

        jLabel7.setText("Email:");
        add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 827, -1, -1));

        jLabel8.setText("Address:");
        add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 787, -1, -1));

        txtAddress.setEditable(false);
        txtAddress.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtAddressActionPerformed(evt);
            }
        });
        add(txtAddress, new org.netbeans.lib.awtextra.AbsoluteConstraints(68, 784, 188, -1));

        txtEmail.setEditable(false);
        txtEmail.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtEmailActionPerformed(evt);
            }
        });
        add(txtEmail, new org.netbeans.lib.awtextra.AbsoluteConstraints(68, 824, 188, -1));

        txtName.setEditable(false);
        txtName.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtNameActionPerformed(evt);
            }
        });
        add(txtName, new org.netbeans.lib.awtextra.AbsoluteConstraints(68, 704, 188, -1));

        txtID.setEditable(false);
        txtID.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtIDActionPerformed(evt);
            }
        });
        add(txtID, new org.netbeans.lib.awtextra.AbsoluteConstraints(68, 744, 188, -1));

        jLabel9.setText("Email:");
        add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(331, 827, -1, -1));

        jLabel10.setText("Address:");
        add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(331, 787, -1, -1));

        txtVAddress.setEditable(false);
        txtVAddress.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtVAddressActionPerformed(evt);
            }
        });
        add(txtVAddress, new org.netbeans.lib.awtextra.AbsoluteConstraints(387, 784, 188, -1));

        txtVEmail.setEditable(false);
        txtVEmail.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtVEmailActionPerformed(evt);
            }
        });
        add(txtVEmail, new org.netbeans.lib.awtextra.AbsoluteConstraints(387, 824, 188, -1));

        txtVName.setEditable(false);
        txtVName.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtVNameActionPerformed(evt);
            }
        });
        add(txtVName, new org.netbeans.lib.awtextra.AbsoluteConstraints(387, 704, 188, -1));

        txtVID.setEditable(false);
        txtVID.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtVIDActionPerformed(evt);
            }
        });
        add(txtVID, new org.netbeans.lib.awtextra.AbsoluteConstraints(387, 744, 188, -1));

        jLabel11.setText("Name:");
        add(jLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(331, 707, -1, -1));

        jLabel12.setText("ID:");
        add(jLabel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(331, 747, -1, -1));

        jLabel13.setText("Color:");
        add(jLabel13, new org.netbeans.lib.awtextra.AbsoluteConstraints(632, 827, -1, -1));

        jLabel14.setText("Breed:");
        add(jLabel14, new org.netbeans.lib.awtextra.AbsoluteConstraints(632, 787, -1, -1));

        txtBreed.setEditable(false);
        txtBreed.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtBreedActionPerformed(evt);
            }
        });
        add(txtBreed, new org.netbeans.lib.awtextra.AbsoluteConstraints(686, 784, 188, -1));

        txtColor.setEditable(false);
        txtColor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtColorActionPerformed(evt);
            }
        });
        add(txtColor, new org.netbeans.lib.awtextra.AbsoluteConstraints(686, 824, 188, -1));

        txtSpecies.setEditable(false);
        txtSpecies.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtSpeciesActionPerformed(evt);
            }
        });
        add(txtSpecies, new org.netbeans.lib.awtextra.AbsoluteConstraints(686, 704, 188, -1));

        txtAID.setEditable(false);
        txtAID.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtAIDActionPerformed(evt);
            }
        });
        add(txtAID, new org.netbeans.lib.awtextra.AbsoluteConstraints(686, 744, 188, -1));

        jLabel15.setText("Species:");
        add(jLabel15, new org.netbeans.lib.awtextra.AbsoluteConstraints(632, 707, -1, -1));

        jLabel16.setText("ID:");
        add(jLabel16, new org.netbeans.lib.awtextra.AbsoluteConstraints(632, 747, -1, -1));

        buttonGroup1.add(jRadioButton1);
        jRadioButton1.setText("All Requests Sent");
        jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton1ActionPerformed(evt);
            }
        });
        add(jRadioButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 365, -1, -1));

        buttonGroup1.add(jRadioButton2);
        jRadioButton2.setText("Requests Assigned");
        jRadioButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton2ActionPerformed(evt);
            }
        });
        add(jRadioButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(148, 365, -1, -1));

        buttonGroup1.add(jRadioButton3);
        jRadioButton3.setText("Requests Unassigned");
        jRadioButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton3ActionPerformed(evt);
            }
        });
        add(jRadioButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(287, 365, -1, -1));

        jButton6.setText("Check out");
        jButton6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton6ActionPerformed(evt);
            }
        });
        add(jButton6, new org.netbeans.lib.awtextra.AbsoluteConstraints(298, 51, -1, -1));

        jButton7.setText("Back");
        jButton7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton7ActionPerformed(evt);
            }
        });
        add(jButton7, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 853, -1, -1));

        jLabel17.setFont(new java.awt.Font("Tahoma", 0, 36)); // NOI18N
        jLabel17.setText("Inspection Work Request");
        add(jLabel17, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 0, -1, -1));
    }// </editor-fold>//GEN-END:initComponents

    private void txtAddressActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtAddressActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtAddressActionPerformed

    private void txtEmailActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtEmailActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtEmailActionPerformed

    private void txtNameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtNameActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtNameActionPerformed

    private void txtIDActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtIDActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtIDActionPerformed

    private void txtVAddressActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtVAddressActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtVAddressActionPerformed

    private void txtVEmailActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtVEmailActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtVEmailActionPerformed

    private void txtVNameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtVNameActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtVNameActionPerformed

    private void txtVIDActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtVIDActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtVIDActionPerformed

    private void txtBreedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtBreedActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtBreedActionPerformed

    private void txtColorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtColorActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtColorActionPerformed

    private void txtSpeciesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtSpeciesActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtSpeciesActionPerformed

    private void txtAIDActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtAIDActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtAIDActionPerformed

    private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox1ActionPerformed
        // TODO add your handling code here:
        
        
    }//GEN-LAST:event_jComboBox1ActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
        int selectedRow = jTable1.getSelectedRow();
        if (selectedRow < 0){
            JOptionPane.showMessageDialog(null, "Please select a row first!","Warining",JOptionPane.WARNING_MESSAGE);
            return;
        }
        InspectionWorkRequest iwr=(InspectionWorkRequest)jTable1.getValueAt(selectedRow, 0);
        
        for(Enterprise en:network.getEnterpriseDirectory().getEnterpriseList()){
            if(en instanceof CustomerAndVolunteerEnterprise){
                en.getInspectionWorkQueue().getWorkRequestList().add(iwr);
                iwr.setStatus("Sent");
                iwr.setSender(userAccount);
                break;
            }
        }
        
        upperList.remove(iwr);
        populateUpperTable(upperList);
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:
        for(Enterprise en:network.getEnterpriseDirectory().getEnterpriseList()){
            if(en instanceof CustomerAndVolunteerEnterprise){
                for(InspectionWorkRequest iwr:upperList){
                    en.getInspectionWorkQueue().getWorkRequestList().add(iwr);
                    iwr.setStatus("Sent");
                    iwr.setSender(userAccount);
                }
            }
        }
        
        upperList.clear();
        populateUpperTable(upperList);
    }//GEN-LAST:event_jButton2ActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        // TODO add your handling code here:
        
        populateLowerTable(lowerList);
    }//GEN-LAST:event_jButton3ActionPerformed

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
        // TODO add your handling code here:
        int selectedRow = jTable2.getSelectedRow();
        if (selectedRow < 0){
            JOptionPane.showMessageDialog(null, "Please select a row first!","Warining",JOptionPane.WARNING_MESSAGE);
            return;
        }
        InspectionWorkRequest iwr=(InspectionWorkRequest)jTable2.getValueAt(selectedRow, 0);
        
        txtName.setText(iwr.getCustomer().getName());
        txtID.setText(String.valueOf(iwr.getCustomer().getId()));
        txtAddress.setText(iwr.getCustomer().getAddress());
        txtEmail.setText(iwr.getCustomer().getEmail());
        
        if(iwr.getStatus().equals("Assigned")){
            txtVName.setText(iwr.getVolunteer().getName());
            txtVID.setText(String.valueOf(iwr.getVolunteer().getId()));
            txtVAddress.setText(iwr.getVolunteer().getAddress());
            txtVEmail.setText(iwr.getVolunteer().getEmail());
        }else if(iwr.getStatus().equals("Sent")){
            txtVName.setText("Volunteer Unassigned");
            txtVID.setText("Volunteer Unassigned");
            txtVAddress.setText("Volunteer Unassigned");
            txtVEmail.setText("Volunteer Unassigned");
        }
        
        
        txtSpecies.setText(iwr.getAnimal().getSpecies());
        txtAID.setText(String.valueOf(iwr.getAnimal().getID()));
        txtBreed.setText(iwr.getAnimal().getBreed());
        txtColor.setText(iwr.getAnimal().getColor());
    }//GEN-LAST:event_jButton4ActionPerformed

    private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton1ActionPerformed
        // TODO add your handling code here:
        lowerList.clear();
        
        if(jRadioButton1.isSelected()){
            for(InspectionWorkRequest iwr:organization.getInspectionWorkQueue().getWorkRequestList()){
                if(iwr.getStatus().equalsIgnoreCase("Sent") || iwr.getStatus().equalsIgnoreCase("Assigned")){
                    lowerList.add(iwr);
                }
            }
        }
    }//GEN-LAST:event_jRadioButton1ActionPerformed

    private void jRadioButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton2ActionPerformed
        // TODO add your handling code here:
        lowerList.clear();
        
        if(jRadioButton2.isSelected()){
            for(InspectionWorkRequest iwr:organization.getInspectionWorkQueue().getWorkRequestList()){
                if(iwr.getStatus().equalsIgnoreCase("Assigned")){
                    lowerList.add(iwr);
                }
            }
        }
    }//GEN-LAST:event_jRadioButton2ActionPerformed

    private void jRadioButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton3ActionPerformed
        // TODO add your handling code here:
        lowerList.clear();
        
        if(jRadioButton3.isSelected()){
            for(InspectionWorkRequest iwr:organization.getInspectionWorkQueue().getWorkRequestList()){
                if(iwr.getStatus().equalsIgnoreCase("Sent")){
                    lowerList.add(iwr);
                }
            }
        }
    }//GEN-LAST:event_jRadioButton3ActionPerformed

    private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed
        // TODO add your handling code here:
        upperList.clear();
  
        double i=(Double)jComboBox1.getSelectedItem();
        for(InspectionWorkRequest iwr:organization.getInspectionWorkQueue().getWorkRequestList()){
            if(iwr.getStatus().equalsIgnoreCase("Generated") || iwr.getStatus().equalsIgnoreCase("Completed")){
                if(iwr.nextTimeCheck(i)){
                    upperList.add(iwr);
                }
            }
        }
        
        populateUpperTable(upperList);
        
    }//GEN-LAST:event_jButton6ActionPerformed

    private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton7ActionPerformed
        userProcessContainer.remove(this);
        CardLayout layout = (CardLayout) userProcessContainer.getLayout();
        layout.previous(userProcessContainer);
        // TODO add your handling code here:
    }//GEN-LAST:event_jButton7ActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.ButtonGroup buttonGroup3;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton6;
    private javax.swing.JButton jButton7;
    private javax.swing.JComboBox jComboBox1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JRadioButton jRadioButton1;
    private javax.swing.JRadioButton jRadioButton2;
    private javax.swing.JRadioButton jRadioButton3;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JTable jTable1;
    private javax.swing.JTable jTable2;
    private javax.swing.JTextField txtAID;
    private javax.swing.JTextField txtAddress;
    private javax.swing.JTextField txtBreed;
    private javax.swing.JTextField txtColor;
    private javax.swing.JTextField txtEmail;
    private javax.swing.JTextField txtID;
    private javax.swing.JTextField txtName;
    private javax.swing.JTextField txtSpecies;
    private javax.swing.JTextField txtVAddress;
    private javax.swing.JTextField txtVEmail;
    private javax.swing.JTextField txtVID;
    private javax.swing.JTextField txtVName;
    // End of variables declaration//GEN-END:variables
}
<file_sep>/FinalProject/FinalProject/src/Interface/InventoryManager/ManageAnimalInventory.java
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Interface.InventoryManager;

import Business.Animal.Animal;
import Business.EcoSystem;
import Business.Enterprise.Enterprise;
import Business.Network.Network;
import Business.Organization.Organization;
import Business.UserAccount.UserAccount;
import java.awt.CardLayout;
import java.awt.Color;
import java.awt.Image;
import javax.swing.JFileChooser;
import javax.swing.JPanel;
import javax.swing.table.DefaultTableModel;
import javax.swing.ImageIcon;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartFrame;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.data.category.DefaultCategoryDataset;
import java.io.File;
/**
 *
 * @author <NAME>
 */
public class ManageAnimalInventory extends javax.swing.JPanel {

    /**
     * Creates new form ManageAnimalInventory
     */
    JPanel userProcessContainer;
    UserAccount userAccount;
    Organization organization;
    Enterprise enterprise;
    Network network;
    EcoSystem system;
    ImageIcon icon;
    String picturepath=null;

    ManageAnimalInventory(JPanel userProcessContainer, UserAccount userAccount, Organization organization, Enterprise enterprise, Network network, EcoSystem system) {
        initComponents();
        this.userProcessContainer=userProcessContainer;
        this.userAccount=userAccount;
        this.organization=organization;
        this.enterprise=enterprise;
        this.network=network;
        this.system=system;
        
        populateTable();
    }
    
    public void populateTable(){
        DefaultTableModel model = (DefaultTableModel) jTable1.getModel();
        
        model.setRowCount(0);
        
        if(enterprise.getAnimalDirectory()!=null){
            for (Animal animal : enterprise.getAnimalDirectory().getAnimalDirectory()){
            Object[] row = new Object[5];
            row[0] = animal;
            row[1] = animal.getSpecies();
            row[2]=animal.getBreed();
            row[3]=animal.getColor();
            row[4]=animal.getAge();
            
           
            
            model.addRow(row);
            }
        }
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        txtGender = new javax.swing.JTextField();
        txtAge = new javax.swing.JTextField();
        txtColor = new javax.swing.JTextField();
        txtBreed = new javax.swing.JTextField();
        jButton1 = new javax.swing.JButton();
        backJButton = new javax.swing.JButton();
        jLabel5 = new javax.swing.JLabel();
        txtSpecies = new javax.swing.JTextField();
        jlPhoto = new javax.swing.JLabel();
        jButton2 = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        jLabel6 = new javax.swing.JLabel();

        setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "ID", "Species", "Breed", "Color", "Age"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(jTable1);

        add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 60, 917, 255));

        jLabel1.setText("Breed:");
        add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(116, 396, -1, -1));

        jLabel2.setText("Gender:");
        add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(108, 431, -1, -1));

        jLabel3.setText("Color:");
        add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(119, 471, -1, -1));

        jLabel4.setText("Age:");
        add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(127, 506, -1, -1));
        add(txtGender, new org.netbeans.lib.awtextra.AbsoluteConstraints(172, 428, 170, -1));
        add(txtAge, new org.netbeans.lib.awtextra.AbsoluteConstraints(172, 503, 170, -1));
        add(txtColor, new org.netbeans.lib.awtextra.AbsoluteConstraints(172, 468, 170, -1));
        add(txtBreed, new org.netbeans.lib.awtextra.AbsoluteConstraints(172, 393, 170, -1));

        jButton1.setText("Create");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(271, 560, -1, -1));

        backJButton.setText("<< Back");
        backJButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                backJButtonActionPerformed(evt);
            }
        });
        add(backJButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(94, 560, -1, -1));

        jLabel5.setText("Species:");
        add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(105, 356, -1, -1));
        add(txtSpecies, new org.netbeans.lib.awtextra.AbsoluteConstraints(172, 353, 170, -1));

        jlPhoto.setText("      Upload photo here");
        add(jlPhoto, new org.netbeans.lib.awtextra.AbsoluteConstraints(611, 353, 189, 165));

        jButton2.setText("Upload");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });
        add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(672, 531, -1, -1));

        jButton3.setText("Bar Chart");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });
        add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(761, 531, -1, -1));

        jLabel6.setFont(new java.awt.Font("Tahoma", 0, 36)); // NOI18N
        jLabel6.setText("Manage Inventory");
        add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, -1, -1));
    }// </editor-fold>//GEN-END:initComponents

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
        Animal an=enterprise.getAnimalDirectory().newAnimal();
        
        //an.setIcon(icon);
        an.setPicturepath(picturepath);
        an.setSpecies(txtSpecies.getText());
        an.setBreed(txtBreed.getText());
        an.setColor(txtColor.getText());
        an.setGender(txtGender.getText());
        an.setAge(txtAge.getText());
        
        populateTable();
    }//GEN-LAST:event_jButton1ActionPerformed

    private void backJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_backJButtonActionPerformed

        userProcessContainer.remove(this);
        CardLayout layout = (CardLayout) userProcessContainer.getLayout();
        layout.previous(userProcessContainer);
    }//GEN-LAST:event_backJButtonActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:
        /*JFileChooser imgc = new JFileChooser();
        imgc.setFileSelectionMode(JFileChooser.FILES_ONLY);
        int i = imgc.showOpenDialog(null);
        String path;
        path = imgc.getSelectedFile().getAbsolutePath();
        if(i== imgc.APPROVE_OPTION){
            
            String name = imgc.getSelectedFile().getName();
            System.out.println("path:"+path+"; name:"+name);
        }else{
            System.out.println("no document");
        }
        icon = new ImageIcon(Image.class.getResource(String.valueOf(path)));//ImageIcon(path);
        icon.setImage(icon.getImage().getScaledInstance(150,150,Image.SCALE_DEFAULT));
        jlPhoto.setIcon(icon);*/
        /*JFileChooser imgc = new JFileChooser();
        imgc.setFileSelectionMode(JFileChooser.FILES_ONLY);
        int i = imgc.showOpenDialog(null);
        String path;
        path = imgc.getSelectedFile().getAbsolutePath();
        if(i== imgc.APPROVE_OPTION){
            
            String name = imgc.getSelectedFile().getName();
            System.out.println("path:"+path+"; name:"+name);
        }else{
            System.out.println("no document");
        }
        icon = new ImageIcon(path);
        icon.setImage(icon.getImage().getScaledInstance(150,150,Image.SCALE_DEFAULT));
        jlPhoto.setIcon(icon);*/
        
        picturepath = null;
        JFileChooser jfc = new JFileChooser();
        jfc.showOpenDialog(null);
        File pic = jfc.getSelectedFile();
        if (pic!=null&&pic.getAbsolutePath().endsWith(".jpg")){
            
            picturepath = pic.getAbsolutePath();
            ImageIcon imageIcon = new ImageIcon(picturepath);
            Image image = imageIcon.getImage();
            Image smallImage = image.getScaledInstance(169,169,Image.SCALE_FAST);
            ImageIcon smallIcon = new ImageIcon(smallImage);
            jlPhoto.setIcon(smallIcon);
        }
        
        
    }//GEN-LAST:event_jButton2ActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        // TODO add your handling code here:
        DefaultCategoryDataset dataset = new DefaultCategoryDataset();
        int dog = 0;
        int cat = 0;
        for(Animal an:enterprise.getAnimalDirectory().getAnimalDirectory()){
        if(an.getSpecies().equals("dog")){
            dog++;
        }
        if(an.getSpecies().equals("cat")){
            cat++;
        }
    }
        dataset.setValue(dog, "1", "Dog");
        dataset.setValue(cat, "2", "Cat");
        JFreeChart chart = ChartFactory.createBarChart("Animal Variety", "Animals Species", "Amount", dataset, PlotOrientation.VERTICAL, false, true, false);
        CategoryPlot p = chart.getCategoryPlot();
        p.setRangeGridlinePaint(Color.BLACK);
        ChartFrame frame = new ChartFrame("Bar Chart for Animals", chart);
        frame.setVisible(true);
        frame.setSize(450,350);
    }//GEN-LAST:event_jButton3ActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton backJButton;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable jTable1;
    private javax.swing.JLabel jlPhoto;
    private javax.swing.JTextField txtAge;
    private javax.swing.JTextField txtBreed;
    private javax.swing.JTextField txtColor;
    private javax.swing.JTextField txtGender;
    private javax.swing.JTextField txtSpecies;
    // End of variables declaration//GEN-END:variables
}
<file_sep>/FinalProject/FinalProject/src/Interface/CertificationManager/CertificationManagerWorkArea.java
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Interface.CertificationManager;

import Business.EcoSystem;
import Business.Enterprise.Enterprise;
import Business.Network.Network;
import Business.Organization.Organization;
import Business.UserAccount.UserAccount;
import Interface.InventoryManager.ManageAnimalInventory;
import java.awt.CardLayout;
import javax.swing.JPanel;

/**
 *
 * @author <NAME>
 */
public class CertificationManagerWorkArea extends javax.swing.JPanel {

    /**
     * Creates new form CertificationManagerWorkArea
     */
    JPanel userProcessContainer;
    UserAccount userAccount;
    Organization organization;
    Enterprise enterprise;
    Network network;
    EcoSystem system;    

    public CertificationManagerWorkArea(JPanel userProcessContainer, UserAccount account, Organization organization, Enterprise enterprise, Network network, EcoSystem system) {
        initComponents();
        this.userProcessContainer=userProcessContainer;
        this.userAccount=account;
        this.organization=organization;
        this.enterprise=enterprise;
        this.network=network;
        this.system=system;
        
        txtEnterprise.setText(enterprise.getName());
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel2 = new javax.swing.JLabel();
        txtEnterprise = new javax.swing.JTextField();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jLabel3 = new javax.swing.JLabel();

        setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        jLabel2.setText("Enterprise:");
        add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 60, -1, -1));

        txtEnterprise.setEditable(false);
        add(txtEnterprise, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 62, 194, -1));

        jButton1.setText("Recive Appilication Work Request");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 102, -1, -1));

        jButton2.setText("Recive Lost Pet Work Request");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });
        add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 145, -1, -1));

        jLabel3.setFont(new java.awt.Font("Tahoma", 0, 36)); // NOI18N
        jLabel3.setText("Certification Manager");
        add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, -1, -1));
    }// </editor-fold>//GEN-END:initComponents

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
        ReciveAdoptionWorkRequest ma = new ReciveAdoptionWorkRequest(userProcessContainer, userAccount, organization,  enterprise, network, system);
        userProcessContainer.add("ManageAnimalInventory", ma);
        CardLayout layout = (CardLayout) userProcessContainer.getLayout();
        layout.next(userProcessContainer);
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:
        ReciveLostAnimalWorkRequest mlp = new ReciveLostAnimalWorkRequest(userProcessContainer, userAccount, organization,  enterprise, network, system);
        userProcessContainer.add("ManageAnimalInventory", mlp);
        CardLayout layout = (CardLayout) userProcessContainer.getLayout();
        layout.next(userProcessContainer);
    }//GEN-LAST:event_jButton2ActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JTextField txtEnterprise;
    // End of variables declaration//GEN-END:variables
}
<file_sep>/FinalProject/FinalProject/src/Interface/CustomerRole/FosterCareAnnounce.java
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Interface.CustomerRole;

import Business.Animal.Animal;
import Business.EcoSystem;
import Business.Enterprise.Enterprise;
import Business.Network.Network;
import Business.Organization.Organization;
import Business.UserAccount.UserAccount;
import Business.WorkQueue.AdoptionWorkRequest;
import Business.WorkQueue.FostCareWorkRequest;
import Business.WorkQueue.InspectionWorkRequest;
import java.awt.CardLayout;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author brandonz
 */
public class FosterCareAnnounce extends javax.swing.JPanel {

    /**
     * Creates new form FosterCareAnnounce
     */
    private JPanel userProcessContainer;
    private EcoSystem system;
    private UserAccount userAccount;
    private Enterprise enterprise;
    private Network netWork;
    private Animal an;
    public FosterCareAnnounce(JPanel userProcessContainer,UserAccount userAccount, Enterprise enterprise, Network network,EcoSystem system) {
        initComponents();
        this.userProcessContainer = userProcessContainer;
        this.system = system;
        this.userAccount = userAccount;
        this.enterprise = enterprise;
        this.netWork = network;
      
        display();
        
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel8 = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();
        jLabel3 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        jLabel4 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        txtBreed2 = new javax.swing.JTextField();
        txtColor = new javax.swing.JTextField();
        txtGender = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        jButton2 = new javax.swing.JButton();
        jLabel5 = new javax.swing.JLabel();
        txtSpecies = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        txtAge = new javax.swing.JTextField();
        txtDay = new javax.swing.JTextField();
        txtHabit = new javax.swing.JTextField();
        jLabel17 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        txtPhone = new javax.swing.JTextField();
        jLabel20 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        txtMessage = new javax.swing.JTextField();
        backJButton = new javax.swing.JButton();
        jLabel9 = new javax.swing.JLabel();

        jLabel8.setText("jLabel8");

        setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jButton1.setText("Announce");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(846, 670, -1, -1));

        jLabel3.setText("My Animal");
        add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 101, -1, -1));

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Name", "Species", "Breed", "Color", "Age"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(jTable1);

        add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 124, 960, 255));

        jLabel4.setFont(new java.awt.Font("Tahoma", 3, 18)); // NOI18N
        jLabel4.setText("Animal Information:");
        add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 449, -1, -1));

        jLabel13.setText("Color:");
        add(jLabel13, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 616, -1, -1));

        jLabel14.setText("Breed:");
        add(jLabel14, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 576, -1, -1));

        txtBreed2.setEditable(false);
        txtBreed2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtBreed2ActionPerformed(evt);
            }
        });
        add(txtBreed2, new org.netbeans.lib.awtextra.AbsoluteConstraints(66, 573, 188, -1));

        txtColor.setEditable(false);
        txtColor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtColorActionPerformed(evt);
            }
        });
        add(txtColor, new org.netbeans.lib.awtextra.AbsoluteConstraints(66, 613, 188, -1));

        txtGender.setEditable(false);
        txtGender.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtGenderActionPerformed(evt);
            }
        });
        add(txtGender, new org.netbeans.lib.awtextra.AbsoluteConstraints(63, 533, 188, -1));

        jLabel15.setText("Species:");
        add(jLabel15, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 499, -1, -1));

        jButton2.setText("Import Animal Information");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });
        add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 397, -1, -1));

        jLabel5.setText("Gender:");
        add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 536, -1, -1));

        txtSpecies.setEditable(false);
        txtSpecies.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtSpeciesActionPerformed(evt);
            }
        });
        add(txtSpecies, new org.netbeans.lib.awtextra.AbsoluteConstraints(66, 496, 188, -1));

        jLabel16.setText("Age:");
        add(jLabel16, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 656, -1, -1));

        txtAge.setEditable(false);
        txtAge.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtAgeActionPerformed(evt);
            }
        });
        add(txtAge, new org.netbeans.lib.awtextra.AbsoluteConstraints(66, 653, 188, -1));

        txtDay.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtDayActionPerformed(evt);
            }
        });
        add(txtDay, new org.netbeans.lib.awtextra.AbsoluteConstraints(748, 569, 92, -1));

        txtHabit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtHabitActionPerformed(evt);
            }
        });
        add(txtHabit, new org.netbeans.lib.awtextra.AbsoluteConstraints(747, 529, 188, -1));

        jLabel17.setText("Phone:");
        add(jLabel17, new org.netbeans.lib.awtextra.AbsoluteConstraints(703, 495, -1, -1));

        jLabel6.setText("Pet Habit:");
        add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(686, 532, -1, -1));

        jLabel7.setFont(new java.awt.Font("Tahoma", 3, 18)); // NOI18N
        jLabel7.setText("My Information:");
        add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(578, 445, -1, -1));

        txtPhone.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtPhoneActionPerformed(evt);
            }
        });
        add(txtPhone, new org.netbeans.lib.awtextra.AbsoluteConstraints(748, 492, 188, -1));

        jLabel20.setText("Help me for how many days:");
        add(jLabel20, new org.netbeans.lib.awtextra.AbsoluteConstraints(578, 572, -1, -1));

        jLabel2.setText("Message:");
        add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(688, 607, -1, -1));

        txtMessage.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtMessageActionPerformed(evt);
            }
        });
        add(txtMessage, new org.netbeans.lib.awtextra.AbsoluteConstraints(748, 604, 188, -1));

        backJButton.setText("<<Back");
        backJButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                backJButtonActionPerformed(evt);
            }
        });
        add(backJButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 693, -1, -1));

        jLabel9.setFont(new java.awt.Font("Tahoma", 0, 36)); // NOI18N
        jLabel9.setText("Foster Care Announce");
        add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 13, -1, -1));
    }// </editor-fold>//GEN-END:initComponents

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
    int selectedRow = jTable1.getSelectedRow();
        if (selectedRow >= 0) {
            FostCareWorkRequest frequest = new FostCareWorkRequest();
            InspectionWorkRequest irequest = (InspectionWorkRequest) jTable1.getValueAt(selectedRow, 0);
            frequest.setAnimal(irequest.getAnimal());
            frequest.setCustomer(irequest.getCustomer());
            frequest.setDayCount(txtDay.getText());
            frequest.setPhone(txtPhone.getText());
            frequest.setHabit(txtHabit.getText());
            frequest.setMessage(txtMessage.getText());
            frequest.setStatus("Sent");
            frequest.setResult("");
            enterprise.getFosterCareWorkQueue().getWorkRequestList().add(frequest);
            
            JOptionPane.showMessageDialog(null, "Request Posted");
            //userAccount.getFosterCareWorkQueue().getWorkRequestList().add(frequest);
      } else {
           JOptionPane.showMessageDialog(null, "Choose a row to announce.");
        }

        // TODO add your handling code here:
    }//GEN-LAST:event_jButton1ActionPerformed

    private void txtBreed2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtBreed2ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtBreed2ActionPerformed

    private void txtColorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtColorActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtColorActionPerformed

    private void txtGenderActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtGenderActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtGenderActionPerformed

    private void txtSpeciesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtSpeciesActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtSpeciesActionPerformed

    private void txtAgeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtAgeActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtAgeActionPerformed

    private void txtDayActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtDayActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtDayActionPerformed

    private void txtHabitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtHabitActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtHabitActionPerformed

    private void txtPhoneActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtPhoneActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtPhoneActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:
        int selectedRow = jTable1.getSelectedRow();
        
        if (selectedRow < 0){
            JOptionPane.showMessageDialog(null, "Please select a row first!","Warining",JOptionPane.WARNING_MESSAGE);
            return;
        }
        InspectionWorkRequest inspectionWorkRequest=(InspectionWorkRequest)jTable1.getValueAt(selectedRow, 0);
        Animal animal=inspectionWorkRequest.getAnimal();
        
        txtSpecies.setText(animal.getSpecies());
        txtGender.setText(animal.getGender());
        txtBreed2.setText(animal.getBreed());
        txtColor.setText(animal.getColor());
        txtAge.setText(animal.getAge());

        
        
    }//GEN-LAST:event_jButton2ActionPerformed

    private void txtMessageActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtMessageActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtMessageActionPerformed

    private void backJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_backJButtonActionPerformed

        userProcessContainer.remove(this);
        CardLayout layout = (CardLayout) userProcessContainer.getLayout();
        layout.previous(userProcessContainer);
    }//GEN-LAST:event_backJButtonActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton backJButton;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable jTable1;
    private javax.swing.JTextField txtAge;
    private javax.swing.JTextField txtBreed2;
    private javax.swing.JTextField txtColor;
    private javax.swing.JTextField txtDay;
    private javax.swing.JTextField txtGender;
    private javax.swing.JTextField txtHabit;
    private javax.swing.JTextField txtMessage;
    private javax.swing.JTextField txtPhone;
    private javax.swing.JTextField txtSpecies;
    // End of variables declaration//GEN-END:variables

    private void display() {
        DefaultTableModel model = (DefaultTableModel) jTable1.getModel();
        model.setRowCount(0);
        for(InspectionWorkRequest inspectionWorkRequest: userAccount.getInspectionWorkQueue().getWorkRequestList()){
            Object[] row = new Object[5];
            Animal animal=inspectionWorkRequest.getAnimal();
            row[0] = inspectionWorkRequest;
            row[1] = animal.getSpecies();
            row[2]=animal.getBreed();
            row[3]=animal.getColor();
            row[4]=animal.getAge();
            
           
            
            model.addRow(row);
        }
        
    }  
}
<file_sep>/FinalProject/FinalProject/src/Business/Person/CustomerList.java
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Business.Person;

import java.util.ArrayList;
import java.util.logging.Logger;

/**
 *
 * @author <NAME>
 */
public class CustomerList {
    
    private ArrayList<Customer> customerList;

    public ArrayList<Customer> getCustomerList() {
        return customerList;
    }
    
    public CustomerList(){
        customerList=new ArrayList<Customer>();
    }
    
    public Customer newCustomer(String name){
        Customer customer=new Customer();
        customer.setName(name);
        customerList.add(customer);
        return customer;
    }
    
}
<file_sep>/README.md
# Animal-Shelter_JAVA-Project_NetBeans
JAVA application to standardize and automated the process of animal adoption, including searching, applying (adoption/lost), transportation, certification, inspection
<file_sep>/FinalProject/FinalProject/src/Interface/Register.java
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Interface;

import Business.EcoSystem;
import Business.Enterprise.CustomerAndVolunteerEnterprise;
import Business.Enterprise.Enterprise;
import Business.Network.Network;
import Business.Person.Customer;
import Business.Person.Volunteer;
import Business.Role.CustomerRole;
import Business.Role.VolunteerRole;
import Business.UserAccount.UserAccount;
import java.awt.CardLayout;
import javax.swing.JOptionPane;
import javax.swing.JPanel;

/**
 *
 * @author <NAME>
 */
public class Register extends javax.swing.JPanel {

    /**
     * Creates new form Register
     */
    JPanel userProcessContainer;
    EcoSystem system;
    CustomerAndVolunteerEnterprise  cve;
    
    Register(JPanel container, EcoSystem system) {
        initComponents();
        this.system=system;
        this.userProcessContainer=container;
        
        pouplateComoBox();
    }
    
    private void pouplateComoBox(){
        jcbNetwork.removeAllItems();
        
        for(Network network:system.getNetworkList()){
            jcbNetwork.addItem(network);
        }
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        txtName = new javax.swing.JTextField();
        txtEmail = new javax.swing.JTextField();
        txtAddress = new javax.swing.JTextField();
        txtZipCode = new javax.swing.JTextField();
        txtUserName = new javax.swing.JTextField();
        txtPassword = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jLabel8 = new javax.swing.JLabel();
        jcbNetwork = new javax.swing.JComboBox();

        jLabel1.setText("Name:");

        jLabel2.setText("Email:");

        jLabel3.setText("Address:");

        jLabel4.setText("Zip Code:");

        jLabel5.setText("User Name:");

        jLabel6.setText("Password:");

        jLabel7.setFont(new java.awt.Font("Tahoma", 3, 24)); // NOI18N
        jLabel7.setForeground(new java.awt.Color(255, 102, 255));
        jLabel7.setText("Register now for adorable animals and a happier life!");

        jButton1.setText("Be a Volunteer");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jButton2.setText("Be an Adopter");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        jLabel8.setText("NetWork:");

        jcbNetwork.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(146, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(147, 147, 147)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addComponent(jLabel1)
                                            .addComponent(jLabel3)
                                            .addComponent(jLabel2))
                                        .addGap(24, 24, 24)
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(txtAddress, javax.swing.GroupLayout.DEFAULT_SIZE, 232, Short.MAX_VALUE)
                                            .addComponent(txtName)
                                            .addComponent(txtEmail)))
                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                        .addComponent(jLabel4)
                                        .addGap(18, 18, 18)
                                        .addComponent(txtZipCode, javax.swing.GroupLayout.PREFERRED_SIZE, 232, javax.swing.GroupLayout.PREFERRED_SIZE))))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addGap(132, 132, 132)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel6)
                                    .addComponent(jLabel5)
                                    .addComponent(jLabel8))
                                .addGap(18, 18, 18)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(txtPassword, javax.swing.GroupLayout.DEFAULT_SIZE, 232, Short.MAX_VALUE)
                                    .addComponent(txtUserName, javax.swing.GroupLayout.DEFAULT_SIZE, 232, Short.MAX_VALUE)
                                    .addComponent(jcbNetwork, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 184, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(jButton1)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jButton2))
                        .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 650, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(115, 115, 115))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(99, 99, 99)
                .addComponent(jLabel7)
                .addGap(55, 55, 55)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(txtEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel3)
                    .addComponent(txtAddress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(txtZipCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(txtUserName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(txtPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(jcbNetwork, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 77, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(jButton1)
                        .addGap(8, 8, 8))
                    .addComponent(jButton2, javax.swing.GroupLayout.Alignment.TRAILING))
                .addGap(166, 166, 166))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
        Network net=(Network)jcbNetwork.getSelectedItem();
        
        for(Enterprise ent:net.getEnterpriseDirectory().getEnterpriseList()){
            if(ent instanceof CustomerAndVolunteerEnterprise){
                String name=txtName.getText();
                Volunteer vol=((CustomerAndVolunteerEnterprise) ent).getVolunteerList().newVolunteer(name);
                vol.setEmail(txtEmail.getText());
                vol.setAddress(txtAddress.getText());
                vol.setZipCode(txtZipCode.getText());
                
                UserAccount ua=ent.getUserAccountDirectory().createUserAccount(txtUserName.getText(), txtPassword.getText(), vol, new VolunteerRole());
                vol.setUserAccount(ua);
                break;
            }
        }
        
        JOptionPane.showMessageDialog(null, "You are now a registed volunteer at: "+net.getName());
        
        userProcessContainer.removeAll();
        JPanel blankJP = new JPanel();
        userProcessContainer.add("blank", blankJP);
        CardLayout crdLyt = (CardLayout) userProcessContainer.getLayout();
        crdLyt.next(userProcessContainer);
        
        //jButton1.setEnabled(false);
        //jButton2.setEnabled(false);
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:
        Network net=(Network)jcbNetwork.getSelectedItem();
        
        for(Enterprise ent:net.getEnterpriseDirectory().getEnterpriseList()){
            if(ent instanceof CustomerAndVolunteerEnterprise){
                String name=txtName.getText();
                Customer Cus=((CustomerAndVolunteerEnterprise) ent).getCustomerList().newCustomer(name);
                Cus.setEmail(txtEmail.getText());
                Cus.setAddress(txtAddress.getText());
                Cus.setZipCode(txtZipCode.getText());
                
                UserAccount ua=ent.getUserAccountDirectory().createUserAccount(txtUserName.getText(), txtPassword.getText(), Cus, new CustomerRole());
                Cus.setUserAccount(ua);
            }
        }
        
        JOptionPane.showMessageDialog(null, "You are now a registed Customer at: "+net.getName());
        
        userProcessContainer.removeAll();
        JPanel blankJP = new JPanel();
        userProcessContainer.add("blank", blankJP);
        CardLayout crdLyt = (CardLayout) userProcessContainer.getLayout();
        crdLyt.next(userProcessContainer);
        //dB4OUtil.storeSystem(system);
        
        /*jButton1.setEnabled(false);
        jButton2.setEnabled(false);*/
    }//GEN-LAST:event_jButton2ActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JComboBox jcbNetwork;
    private javax.swing.JTextField txtAddress;
    private javax.swing.JTextField txtEmail;
    private javax.swing.JTextField txtName;
    private javax.swing.JTextField txtPassword;
    private javax.swing.JTextField txtUserName;
    private javax.swing.JTextField txtZipCode;
    // End of variables declaration//GEN-END:variables
}
<file_sep>/FinalProject/FinalProject/src/Business/WorkQueue/InventoryWorkRequest.java
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Business.WorkQueue;

import Business.Enterprise.Enterprise;

/**
 *
 * @author raunak
 */
public class InventoryWorkRequest extends WorkRequest{
    
    private Enterprise enterpriseSend;
    private Enterprise enterpriseReceive;

    public Enterprise getEnterpriseSend() {
        return enterpriseSend;
    }

    public void setEnterpriseSend(Enterprise enterpriseSend) {
        this.enterpriseSend = enterpriseSend;
    }

    public Enterprise getEnterpriseReceive() {
        return enterpriseReceive;
    }

    public void setEnterpriseReceive(Enterprise enterpriseReceive) {
        this.enterpriseReceive = enterpriseReceive;
    }
    
    @Override
    public String toString() {
        return enterpriseReceive.getName();
    }

}
<file_sep>/FinalProject/FinalProject/src/userinterface/VolunteerWorkArea/GradeJPanel.java
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package userinterface.VolunteerWorkArea;

import Business.UserAccount.UserAccount;
import Business.WorkQueue.InspectionWorkRequest;
import java.awt.CardLayout;
import java.awt.Component;
import java.util.Date;
import javax.swing.JOptionPane;
import javax.swing.JPanel;

/**
 *
 * @author brandonz
 */
public class GradeJPanel extends javax.swing.JPanel {

    /**
     * Creates new form GradeJPanel
     */
    JPanel userProcessContainer;
    UserAccount useraccount;
    InspectionWorkRequest isp;
    int grade;
    String s=new String();
    
    public GradeJPanel(JPanel userProcessContainer, UserAccount useraccount, InspectionWorkRequest isp  ) {
        initComponents();
        this.userProcessContainer = userProcessContainer;
        this.useraccount = useraccount;
        this.isp = isp;
        grade = 0;
        
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        buttonGroup3 = new javax.swing.ButtonGroup();
        buttonGroup4 = new javax.swing.ButtonGroup();
        buttonGroup5 = new javax.swing.ButtonGroup();
        buttonGroup6 = new javax.swing.ButtonGroup();
        jRadioButton1 = new javax.swing.JRadioButton();
        jRadioButton2 = new javax.swing.JRadioButton();
        jRadioButton3 = new javax.swing.JRadioButton();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jRadioButton4 = new javax.swing.JRadioButton();
        jRadioButton5 = new javax.swing.JRadioButton();
        jRadioButton6 = new javax.swing.JRadioButton();
        jLabel4 = new javax.swing.JLabel();
        jRadioButton7 = new javax.swing.JRadioButton();
        jRadioButton8 = new javax.swing.JRadioButton();
        jRadioButton9 = new javax.swing.JRadioButton();
        jLabel5 = new javax.swing.JLabel();
        jRadioButton10 = new javax.swing.JRadioButton();
        jRadioButton11 = new javax.swing.JRadioButton();
        jRadioButton12 = new javax.swing.JRadioButton();
        jLabel6 = new javax.swing.JLabel();
        jRadioButton13 = new javax.swing.JRadioButton();
        jRadioButton14 = new javax.swing.JRadioButton();
        jRadioButton15 = new javax.swing.JRadioButton();
        jLabel7 = new javax.swing.JLabel();
        jRadioButton16 = new javax.swing.JRadioButton();
        jRadioButton17 = new javax.swing.JRadioButton();
        jRadioButton18 = new javax.swing.JRadioButton();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        txtGrade = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();

        buttonGroup1.add(jRadioButton1);
        jRadioButton1.setText("Good");
        jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton1ActionPerformed(evt);
            }
        });

        buttonGroup1.add(jRadioButton2);
        jRadioButton2.setText("Fair");

        buttonGroup1.add(jRadioButton3);
        jRadioButton3.setText("Bad");

        jLabel2.setText("Status");

        jLabel3.setText("Relationship between customer and pet");

        buttonGroup6.add(jRadioButton4);
        jRadioButton4.setText("Good");
        jRadioButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton4ActionPerformed(evt);
            }
        });

        buttonGroup6.add(jRadioButton5);
        jRadioButton5.setText("Fair");

        buttonGroup6.add(jRadioButton6);
        jRadioButton6.setText("Bad");

        jLabel4.setText("Living condition");

        buttonGroup2.add(jRadioButton7);
        jRadioButton7.setText("Good");

        buttonGroup2.add(jRadioButton8);
        jRadioButton8.setText("Fair");

        buttonGroup2.add(jRadioButton9);
        jRadioButton9.setText("Bad");

        jLabel5.setText("Space");

        buttonGroup3.add(jRadioButton10);
        jRadioButton10.setText("Good");

        buttonGroup3.add(jRadioButton11);
        jRadioButton11.setText("Fair");

        buttonGroup3.add(jRadioButton12);
        jRadioButton12.setText("Bad");

        jLabel6.setText("Food");

        buttonGroup4.add(jRadioButton13);
        jRadioButton13.setText("Good");

        buttonGroup4.add(jRadioButton14);
        jRadioButton14.setText("Fair");

        buttonGroup4.add(jRadioButton15);
        jRadioButton15.setText("Bad");

        jLabel7.setText("Pet supplies");

        buttonGroup5.add(jRadioButton16);
        jRadioButton16.setText("Good");

        buttonGroup5.add(jRadioButton17);
        jRadioButton17.setText("Fair");

        buttonGroup5.add(jRadioButton18);
        jRadioButton18.setText("Bad");

        jButton1.setText("Confirm");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jButton2.setText("Back");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        txtGrade.setEditable(false);

        jLabel8.setFont(new java.awt.Font("Tahoma", 0, 36)); // NOI18N
        jLabel8.setText("Grade Inspection");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(54, 54, 54)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel5)
                                    .addComponent(jLabel6)
                                    .addComponent(jLabel7)
                                    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel4))
                                .addGap(135, 135, 135))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addContainerGap()
                                .addComponent(jLabel3)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jRadioButton1)
                                .addGap(36, 36, 36)
                                .addComponent(jRadioButton2)
                                .addGap(28, 28, 28)
                                .addComponent(jRadioButton3))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jRadioButton7)
                                .addGap(36, 36, 36)
                                .addComponent(jRadioButton8)
                                .addGap(28, 28, 28)
                                .addComponent(jRadioButton9))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jRadioButton10)
                                .addGap(36, 36, 36)
                                .addComponent(jRadioButton11)
                                .addGap(28, 28, 28)
                                .addComponent(jRadioButton12))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jRadioButton13)
                                .addGap(36, 36, 36)
                                .addComponent(jRadioButton14)
                                .addGap(18, 18, 18)
                                .addComponent(jRadioButton15))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jRadioButton16)
                                .addGap(46, 46, 46)
                                .addComponent(jRadioButton17)
                                .addGap(18, 18, 18)
                                .addComponent(jRadioButton18))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jRadioButton4)
                                .addGap(36, 36, 36)
                                .addComponent(jRadioButton5)
                                .addGap(28, 28, 28)
                                .addComponent(jRadioButton6))))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(54, 54, 54)
                        .addComponent(jButton2)
                        .addGap(142, 142, 142)
                        .addComponent(txtGrade, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jButton1))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(jLabel8)))
                .addGap(215, 215, 215))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(13, 13, 13)
                .addComponent(jLabel8)
                .addGap(10, 10, 10)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(1, 1, 1)
                        .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jRadioButton1)
                    .addComponent(jRadioButton2)
                    .addComponent(jRadioButton3))
                .addGap(27, 27, 27)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel4)
                    .addComponent(jRadioButton7)
                    .addComponent(jRadioButton8)
                    .addComponent(jRadioButton9))
                .addGap(27, 27, 27)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(4, 4, 4)
                        .addComponent(jLabel5))
                    .addComponent(jRadioButton10)
                    .addComponent(jRadioButton11)
                    .addComponent(jRadioButton12))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(4, 4, 4)
                        .addComponent(jLabel6))
                    .addComponent(jRadioButton13)
                    .addComponent(jRadioButton14)
                    .addComponent(jRadioButton15))
                .addGap(26, 26, 26)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel7)
                    .addComponent(jRadioButton16)
                    .addComponent(jRadioButton17)
                    .addComponent(jRadioButton18))
                .addGap(26, 26, 26)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jRadioButton4)
                        .addComponent(jLabel3))
                    .addComponent(jRadioButton5)
                    .addComponent(jRadioButton6))
                .addGap(83, 83, 83)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButton2)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(1, 1, 1)
                        .addComponent(txtGrade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jButton1)))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton1ActionPerformed
       

        // TODO add your handling code here:
    }//GEN-LAST:event_jRadioButton1ActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
       
        if(jRadioButton1.isSelected() == false && jRadioButton2.isSelected() == false && jRadioButton3.isSelected() == false){
           JOptionPane.showMessageDialog(null, "answer the first question");
           return;
        }
        if(jRadioButton7.isSelected() == false && jRadioButton8.isSelected() == false && jRadioButton9.isSelected() == false){
           JOptionPane.showMessageDialog(null, "answer the second question");
           return;
        }
        if(jRadioButton10.isSelected() == false && jRadioButton11.isSelected() == false && jRadioButton12.isSelected() == false){
           JOptionPane.showMessageDialog(null, "answer the third question");
           return;
        }
        if(jRadioButton13.isSelected() == false && jRadioButton14.isSelected() == false && jRadioButton15.isSelected() == false){
           JOptionPane.showMessageDialog(null, "answer the forth question");
           return;
        }
        if(jRadioButton16.isSelected() == false && jRadioButton17.isSelected() == false && jRadioButton18.isSelected() == false){
           JOptionPane.showMessageDialog(null, "answer the fifth question");
           return;
        }
        if(jRadioButton4.isSelected() == false && jRadioButton5.isSelected() == false && jRadioButton6.isSelected() == false){
           JOptionPane.showMessageDialog(null, "answer the sixth question");
           return;
        }
        
        grade = 0;
        s=null;
        
        if(jRadioButton1.isSelected())  {
            grade = grade +3;
        }
        if(jRadioButton2.isSelected())  {
            grade = grade +2;
        }
        if(jRadioButton3.isSelected()){
            grade = grade +1;
        }
        if(jRadioButton7.isSelected())  {
            grade = grade +3;
        }
        if(jRadioButton8.isSelected())  {
            grade = grade +2;
        }
        if(jRadioButton9.isSelected()){
            grade = grade +1;
        }
        if(jRadioButton10.isSelected())  {
            grade = grade +3;
        }
        if(jRadioButton11.isSelected())  {
            grade = grade +2;
        }
        if(jRadioButton12.isSelected()){
            grade = grade +1;
        }
        if(jRadioButton13.isSelected())  {
            grade = grade +3;
        }
        if(jRadioButton14.isSelected())  {
            grade = grade +2;
        }
        if(jRadioButton15.isSelected()){
            grade = grade +1;
        }
        if(jRadioButton16.isSelected())  {
            grade = grade +3;
        }
        if(jRadioButton17.isSelected())  {
            grade = grade +2;
        }
        if(jRadioButton18.isSelected()){
            grade = grade +1;
        }
        if(jRadioButton4.isSelected())  {
            grade = grade +3;
        }
        if(jRadioButton5.isSelected())  {
            grade = grade +2;
        }
        if(jRadioButton6.isSelected()){
            grade = grade +1;
        }
        Date date = new Date();
        //isp.setGrade(grade);
        isp.setLastTimeCheckDate(date);
        isp.setStatus("Completed");
        
        
        if(grade<=7){
            s="C";
        }else if(grade>7 && grade<=14){
            s="B";
        }else if(grade>14 && grade<=18){
            s="A";
        }
        
        if(isp.getFirstInspection()==null){
            isp.setFirstInspection(s);
        }else if(isp.getSecondInspection()==null){
            isp.setSecondInspection(s);
        }else if(isp.getThirdInspection()==null){
            isp.setThirdInspection(s);
        }
        
        useraccount.getInspectionWorkQueue().getWorkRequestList().remove(isp);
        
        txtGrade.setText(s);
        JOptionPane.showMessageDialog(null, "Grade Completed");
        jButton1.setEnabled(false);
        
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        /*userProcessContainer.remove(this);
        CardLayout cardLayout = (CardLayout)userProcessContainer.getLayout();
        cardLayout.show(userProcessContainer,"AssignJPanel");  */
        
        userProcessContainer.remove(this);
        Component[] componentArray = userProcessContainer.getComponents();
        Component component = componentArray[componentArray.length - 1];
        AssignJPanel assignJPanel = (AssignJPanel) component;
        assignJPanel.populateTable1();
        CardLayout layout = (CardLayout) userProcessContainer.getLayout();
        layout.previous(userProcessContainer);
        // TODO add your handling code here:
    }//GEN-LAST:event_jButton2ActionPerformed

    private void jRadioButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton4ActionPerformed
        // TODO add your handling code here:
  
    }//GEN-LAST:event_jRadioButton4ActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.ButtonGroup buttonGroup3;
    private javax.swing.ButtonGroup buttonGroup4;
    private javax.swing.ButtonGroup buttonGroup5;
    private javax.swing.ButtonGroup buttonGroup6;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JRadioButton jRadioButton1;
    private javax.swing.JRadioButton jRadioButton10;
    private javax.swing.JRadioButton jRadioButton11;
    private javax.swing.JRadioButton jRadioButton12;
    private javax.swing.JRadioButton jRadioButton13;
    private javax.swing.JRadioButton jRadioButton14;
    private javax.swing.JRadioButton jRadioButton15;
    private javax.swing.JRadioButton jRadioButton16;
    private javax.swing.JRadioButton jRadioButton17;
    private javax.swing.JRadioButton jRadioButton18;
    private javax.swing.JRadioButton jRadioButton2;
    private javax.swing.JRadioButton jRadioButton3;
    private javax.swing.JRadioButton jRadioButton4;
    private javax.swing.JRadioButton jRadioButton5;
    private javax.swing.JRadioButton jRadioButton6;
    private javax.swing.JRadioButton jRadioButton7;
    private javax.swing.JRadioButton jRadioButton8;
    private javax.swing.JRadioButton jRadioButton9;
    private javax.swing.JTextField txtGrade;
    // End of variables declaration//GEN-END:variables
}
<file_sep>/FinalProject/FinalProject/src/Interface/InventoryManager/SendWorkRequest.java
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Interface.InventoryManager;

import Business.Animal.Animal;
import Business.EcoSystem;
import Business.Enterprise.AnimalShelterEnterprise;
import Business.Enterprise.Enterprise;
import Business.Network.Network;
import Business.Organization.Organization;
import Business.UserAccount.UserAccount;
import Business.WorkQueue.InventoryWorkRequest;
import Business.WorkQueue.WorkRequest;
import java.awt.CardLayout;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author <NAME>
 */
public class SendWorkRequest extends javax.swing.JPanel {

    /**
     * Creates new form SendWorkRequest
     */
    JPanel userProcessContainer;
    UserAccount userAccount;
    Organization organization;
    Enterprise enterprise;
    Network network;
    EcoSystem system;

    SendWorkRequest(JPanel userProcessContainer, UserAccount userAccount, Organization organization, Enterprise enterprise, Network network, EcoSystem system) {
        initComponents();
        this.userProcessContainer=userProcessContainer;
        this.userAccount=userAccount;
        this.organization=organization;
        this.enterprise=enterprise;
        this.network=network;
        this.system=system;
        
        populateJcbEnterprise();
        populateHistory();
        populateCustomerRequest();
    }
    
    
    
    
    
    
    public void populateTable(Enterprise enterprise){
        DefaultTableModel model = (DefaultTableModel) jTable2.getModel();
        
        model.setRowCount(0);
        if(enterprise.getAnimalDirectory()!=null){
            for (Animal animal : enterprise.getAnimalDirectory().getAnimalDirectory()){
            Object[] row = new Object[5];
            row[0] = animal;
            row[1] = animal.getBreed();
            row[2]=animal.getGender();
            row[3]=animal.getColor();
            row[4]=animal.getAge();
           
            
            model.addRow(row);
            }
        }
        
    }
    
    
    
    
    
    
    
    public void populateHistory(){
        DefaultTableModel model = (DefaultTableModel) jTable1.getModel();
        
        model.setRowCount(0);
        
        
        for (WorkRequest wr : enterprise.getWorkQueueSent().getWorkRequestList()){
        InventoryWorkRequest inwr=(InventoryWorkRequest)wr;
        Object[] row = new Object[6];
        row[0] = inwr;
        row[1] = inwr.getSender();
        row[2]=inwr.getAnimal();
        row[3]=inwr.getAnimal().getBreed();
        row[4]=inwr.getMessage();
        row[5]=inwr.getStatus();
           
            
        model.addRow(row);
        }
        
        
    }
    
    
    
    
    
    public void populateCustomerRequest(){
        DefaultTableModel model = (DefaultTableModel) jTable3.getModel();
        
        model.setRowCount(0);
        
        
        for (WorkRequest wr : organization.getWorkQueueReceived().getWorkRequestList()){
        InventoryWorkRequest inwr=(InventoryWorkRequest)wr;
        Object[] row = new Object[6];
        row[0] = inwr;
        row[1] = inwr.getSender();
        row[2]=inwr.getAnimal();
        row[3]=inwr.getAnimal().getBreed();
        row[4]=inwr.getMessage();
        row[5]=inwr.getStatus();
           
            
        model.addRow(row);
        }
    }
    
    
    
    
    
    
    
    public void populateJcbEnterprise(){
        jcbEnterprise.removeAllItems();
        
        for(Enterprise en:network.getEnterpriseDirectory().getEnterpriseList()){
            if(en instanceof AnimalShelterEnterprise){
                jcbEnterprise.addItem(en);
            }
        }
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        jLabel2 = new javax.swing.JLabel();
        jcbEnterprise = new javax.swing.JComboBox();
        jButton1 = new javax.swing.JButton();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTable2 = new javax.swing.JTable();
        jButton2 = new javax.swing.JButton();
        txtMessage = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        backJButton = new javax.swing.JButton();
        jLabel4 = new javax.swing.JLabel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jTable3 = new javax.swing.JTable();
        jButton3 = new javax.swing.JButton();
        jButton4 = new javax.swing.JButton();
        jLabel5 = new javax.swing.JLabel();

        setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Shelter", "Sender", "Animal ID", "Breed", "Message", "Status"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(jTable1);
        if (jTable1.getColumnModel().getColumnCount() > 0) {
            jTable1.getColumnModel().getColumn(0).setResizable(false);
            jTable1.getColumnModel().getColumn(1).setResizable(false);
            jTable1.getColumnModel().getColumn(2).setResizable(false);
            jTable1.getColumnModel().getColumn(3).setResizable(false);
            jTable1.getColumnModel().getColumn(4).setResizable(false);
            jTable1.getColumnModel().getColumn(5).setResizable(false);
        }

        add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(139, 738, 655, 208));

        jLabel2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        jLabel2.setText("Enterprise:");
        add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(139, 86, -1, -1));

        jcbEnterprise.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        jcbEnterprise.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jcbEnterpriseActionPerformed(evt);
            }
        });
        add(jcbEnterprise, new org.netbeans.lib.awtextra.AbsoluteConstraints(257, 86, 174, -1));

        jButton1.setText("Cancle");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(705, 964, 89, 37));

        jTable2.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "ID", "Breed", "Gender", "Color", "Age"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane2.setViewportView(jTable2);

        add(jScrollPane2, new org.netbeans.lib.awtextra.AbsoluteConstraints(139, 129, 655, 208));

        jButton2.setText("Send");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });
        add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(705, 355, 89, 37));
        add(txtMessage, new org.netbeans.lib.awtextra.AbsoluteConstraints(409, 362, 286, -1));

        jLabel3.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        jLabel3.setText("History:");
        add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(139, 709, -1, -1));

        jLabel1.setText("Add Message:");
        add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(323, 365, -1, -1));

        backJButton.setText("<< Back");
        backJButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                backJButtonActionPerformed(evt);
            }
        });
        add(backJButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(139, 976, -1, -1));

        jLabel4.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        jLabel4.setText("Customer Request:");
        add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(139, 399, -1, -1));

        jTable3.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Shelter", "Sender", "Animal ID", "Breed", "Message", "Status"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane3.setViewportView(jTable3);
        if (jTable3.getColumnModel().getColumnCount() > 0) {
            jTable3.getColumnModel().getColumn(0).setResizable(false);
            jTable3.getColumnModel().getColumn(1).setResizable(false);
            jTable3.getColumnModel().getColumn(2).setResizable(false);
            jTable3.getColumnModel().getColumn(3).setResizable(false);
            jTable3.getColumnModel().getColumn(4).setResizable(false);
            jTable3.getColumnModel().getColumn(5).setResizable(false);
        }

        add(jScrollPane3, new org.netbeans.lib.awtextra.AbsoluteConstraints(139, 428, 655, 208));

        jButton3.setText("Send");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });
        add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(705, 654, 89, 37));

        jButton4.setText("Reject");
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });
        add(jButton4, new org.netbeans.lib.awtextra.AbsoluteConstraints(598, 654, 89, 37));

        jLabel5.setFont(new java.awt.Font("Tahoma", 0, 36)); // NOI18N
        jLabel5.setText("Send Work Request");
        add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 13, -1, -1));
    }// </editor-fold>//GEN-END:initComponents

    private void jcbEnterpriseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcbEnterpriseActionPerformed
        // TODO add your handling code here:
        Enterprise ent=(Enterprise)jcbEnterprise.getSelectedItem();
        
        if(ent!=null){
            populateTable(ent);
        }
    }//GEN-LAST:event_jcbEnterpriseActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:
        /*
        int selectedRow = workRequestJTable.getSelectedRow();
        
        if (selectedRow < 0){
            return;
        }
        
        LabTestWorkRequest request = (LabTestWorkRequest)workRequestJTable.getValueAt(selectedRow, 0);
        
        JOptionPane.showMessageDialog(null, "No Person Found!","Warining",JOptionPane.WARNING_MESSAGE);
        
        */
        
        int selectedRow=jTable2.getSelectedRow();
        
        if(selectedRow<0){
            JOptionPane.showMessageDialog(null, "Please Select a Row First!","Warining",JOptionPane.WARNING_MESSAGE);
            return;
        }
        
        Enterprise en=(Enterprise)jcbEnterprise.getSelectedItem();
        if(en==enterprise){
            JOptionPane.showMessageDialog(null, "Wrong Enterprise!","Warining",JOptionPane.WARNING_MESSAGE);
            return;
        }
        
        Animal an=(Animal)jTable2.getValueAt(selectedRow, 0);
        
        InventoryWorkRequest iwr=new InventoryWorkRequest();
        iwr.setAnimal(an);
        iwr.setEnterpriseSend(enterprise);
        iwr.setEnterpriseReceive(en);
        iwr.setSender(userAccount);
        iwr.setStatus("sent");
        String message=txtMessage.getText();
        try{
                iwr.setMessage(message);
            }catch(Exception e){
                iwr.setMessage(enterprise.getName()+" "+"Sent You an Request");
            }
        
        
        enterprise.getWorkQueueSent().getWorkRequestList().add(iwr);
        en.getWorkQueueReceived().getWorkRequestList().add(iwr);
        
        
        populateHistory();
    }//GEN-LAST:event_jButton2ActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
        int selectedRow=jTable1.getSelectedRow();
        
        if(selectedRow < 0){
            JOptionPane.showMessageDialog(null, "Please select a row first!");
            return;
        }
        
        InventoryWorkRequest ii=(InventoryWorkRequest)jTable1.getValueAt(selectedRow, 0);
        
         int dialogResult=JOptionPane.showConfirmDialog(null, "Are You Sure to Withdraw the Request?", "Waring",JOptionPane.YES_NO_OPTION);
            if(dialogResult == JOptionPane.YES_OPTION){
                enterprise.getWorkQueueSent().getWorkRequestList().remove(ii);
                ii.getEnterpriseReceive().getWorkQueueReceived().getWorkRequestList().remove(ii);
                 JOptionPane.showMessageDialog(null, "Work Request Cancled Successfully!");
            }
            
        populateHistory();
    }//GEN-LAST:event_jButton1ActionPerformed

    private void backJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_backJButtonActionPerformed

        userProcessContainer.remove(this);
        CardLayout layout = (CardLayout) userProcessContainer.getLayout();
        layout.previous(userProcessContainer);
    }//GEN-LAST:event_backJButtonActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        // TODO add your handling code here:
        int selectedRow = jTable3.getSelectedRow();
        
        if (selectedRow < 0){
            JOptionPane.showMessageDialog(null, "Please select a row first!","Warining",JOptionPane.WARNING_MESSAGE);
            return;
        }
        InventoryWorkRequest iwr=(InventoryWorkRequest)jTable3.getValueAt(selectedRow, 0);
        
        enterprise.getWorkQueueSent().getWorkRequestList().add(iwr);
        iwr.getEnterpriseReceive().getWorkQueueReceived().getWorkRequestList().add(iwr);
        iwr.setStatus("Approved");
        organization.getWorkQueueReceived().getWorkRequestList().remove(iwr);
        
        
        populateHistory();
        populateCustomerRequest();
    }//GEN-LAST:event_jButton3ActionPerformed

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
        // TODO add your handling code here:
        int selectedRow = jTable3.getSelectedRow();
        
        if (selectedRow < 0){
            JOptionPane.showMessageDialog(null, "Please select a row first!","Warining",JOptionPane.WARNING_MESSAGE);
            return;
        }
        InventoryWorkRequest iwr=(InventoryWorkRequest)jTable3.getValueAt(selectedRow, 0);
        
        iwr.setStatus("Rejected");
        organization.getWorkQueueReceived().getWorkRequestList().remove(iwr);
        
        populateCustomerRequest();
    }//GEN-LAST:event_jButton4ActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton backJButton;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JTable jTable1;
    private javax.swing.JTable jTable2;
    private javax.swing.JTable jTable3;
    private javax.swing.JComboBox jcbEnterprise;
    private javax.swing.JTextField txtMessage;
    // End of variables declaration//GEN-END:variables
}
<file_sep>/FinalProject/FinalProject/src/Business/Organization/Organization.java
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Business.Organization;

import Business.Animal.AnimalDirectory;
import Business.Person.CustomerList;
import Business.Person.Staff;
import Business.Person.VolunteerList;
import Business.Role.Role;
import Business.UserAccount.UserAccountDirectory;
import Business.WorkQueue.AdoptionWorkQueue;
import Business.WorkQueue.FosterCareWorkQueue;
import Business.WorkQueue.InspectionWorkQueue;
import Business.WorkQueue.LostAnimalWorkQueue;
import Business.WorkQueue.WorkQueue;
import java.util.ArrayList;

/**
 *
 * @author raunak
 */
public abstract class Organization {

    private String name;
    private WorkQueue workQueueSent;
    private WorkQueue workQueueReceived;
    private AdoptionWorkQueue adoptionWorkQueue;
    private LostAnimalWorkQueue lostAnimalWorkQueue;
    private InspectionWorkQueue inspectionWorkQueue;
    private FosterCareWorkQueue fosterCareWorkQueue;
    private UserAccountDirectory userAccountDirectory;
    private AnimalDirectory animalDirectory;
    private Staff staff;
    private int organizationID;
    private static int counter;
    private String ZipCode;
    private String Address;
    
    public enum Type{
        Admin("Admin Organization"), 
        Inventory("Animal inventory center"),
        Certification("Certification Organization"),
        Inspection("InspectionOrganization");
        
  
        private String value;
        private Type(String value) {
            this.value = value;
        }
        public String getValue() {
            return value;
        }
    }

    public Organization(String name) {
        this.name = name;
        workQueueSent = new WorkQueue();
        workQueueReceived = new WorkQueue();
        adoptionWorkQueue=new AdoptionWorkQueue();
        lostAnimalWorkQueue=new LostAnimalWorkQueue();
        inspectionWorkQueue = new InspectionWorkQueue();
        fosterCareWorkQueue = new FosterCareWorkQueue();
        animalDirectory=new AnimalDirectory();
        staff=new Staff();
        userAccountDirectory = new UserAccountDirectory();
        organizationID = counter;
        ++counter;
    }

    public AdoptionWorkQueue getAdoptionWorkQueue() {
        return adoptionWorkQueue;
    }

    public LostAnimalWorkQueue getLostAnimalWorkQueue() {
        return lostAnimalWorkQueue;
    }

    public FosterCareWorkQueue getFosterCareWorkQueue() {
        return fosterCareWorkQueue;
    }

    public void setFosterCareWorkQueue(FosterCareWorkQueue fosterCareWorkQueue) {
        this.fosterCareWorkQueue = fosterCareWorkQueue;
    }

    public String getZipCode() {
        return ZipCode;
    }

    public void setZipCode(String ZipCode) {
        this.ZipCode = ZipCode;
    }

    public String getAddress() {
        return Address;
    }

    public void setAddress(String Address) {
        this.Address = Address;
    }
    

    public abstract ArrayList<Role> getSupportedRole();

    
    public UserAccountDirectory getUserAccountDirectory() {
        return userAccountDirectory;
    }

    public int getOrganizationID() {
        return organizationID;
    }

    public Staff getStaff() {
        return staff;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return name;
    }

    public WorkQueue getWorkQueueSent() {
        return workQueueSent;
    }

    public void setWorkQueueSent(WorkQueue workQueueSent) {
        this.workQueueSent = workQueueSent;
    }

    public WorkQueue getWorkQueueReceived() {
        return workQueueReceived;
    }

    public void setWorkQueueReceived(WorkQueue workQueueReceived) {
        this.workQueueReceived = workQueueReceived;
    }

    public AnimalDirectory getAnimalDirectory() {
        return animalDirectory;
    }

    public InspectionWorkQueue getInspectionWorkQueue() {
        return inspectionWorkQueue;
    }

    public void setInspectionWorkQueue(InspectionWorkQueue inspectionWorkQueue) {
        this.inspectionWorkQueue = inspectionWorkQueue;
    }
    
    
}
<file_sep>/FinalProject/FinalProject/src/Interface/CustomerRole/CustomerRoleWorkArea.java
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Interface.CustomerRole;

import Business.Animal.Animal;
import Business.EcoSystem;
import Business.Enterprise.Enterprise;
import Business.Network.Network;
import Business.Organization.Organization;
import Business.UserAccount.UserAccount;
import Business.WorkQueue.AdoptionWorkRequest;
import Business.WorkQueue.InspectionWorkRequest;
import Interface.InventoryManager.ManageAnimalInventory;
import java.awt.CardLayout;
import javax.swing.JPanel;

/**
 *
 * @author <NAME>
 */
public class CustomerRoleWorkArea extends javax.swing.JPanel {

    /** Creates new form CustomerRoleWorkArea */
    JPanel userProcessContainer;
    UserAccount userAccount;
    Enterprise enterprise;
    Network network;
    EcoSystem system;

    public CustomerRoleWorkArea(JPanel userProcessContainer, UserAccount account, Enterprise enterprise, Network network, EcoSystem system) {
        initComponents();
        this.userProcessContainer=userProcessContainer;
        this.userAccount=account;
        this.enterprise=enterprise;
        this.network=network;
        this.system=system;
    }

   

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jButton1 = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        jButton4 = new javax.swing.JButton();
        jButton5 = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();

        setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jButton1.setText("Search for Adoption");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(294, 152, 179, -1));

        jButton3.setText("Find a Lost Animal");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });
        add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(294, 212, 179, -1));

        jButton4.setText("Need foster care");
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });
        add(jButton4, new org.netbeans.lib.awtextra.AbsoluteConstraints(294, 272, 179, -1));

        jButton5.setText("Help others to foster care");
        jButton5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton5ActionPerformed(evt);
            }
        });
        add(jButton5, new org.netbeans.lib.awtextra.AbsoluteConstraints(294, 338, -1, -1));

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 36)); // NOI18N
        jLabel1.setText("Customer Work Area");
        add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 13, -1, -1));
    }// </editor-fold>//GEN-END:initComponents

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
        SearchForAdoption sfa = new SearchForAdoption(userProcessContainer, userAccount, enterprise, network, system);
        userProcessContainer.add("SearchForAdoption", sfa);
        CardLayout layout = (CardLayout) userProcessContainer.getLayout();
        layout.next(userProcessContainer);
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        // TODO add your handling code here:
        ReportJPanel reportJPanel = new ReportJPanel(userProcessContainer, userAccount, enterprise, network, system);
        userProcessContainer.add("reportJPanel", reportJPanel);
        CardLayout layout = (CardLayout) userProcessContainer.getLayout();
        layout.next(userProcessContainer);
        
        /*ReportALostAnimal rla = new ReportALostAnimal(userProcessContainer, userAccount, enterprise, network, system);
        userProcessContainer.add("ReportALostAnimal", rla);
        CardLayout layout = (CardLayout) userProcessContainer.getLayout();
        layout.next(userProcessContainer);*/
    }//GEN-LAST:event_jButton3ActionPerformed

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
        
        FosterCareAnnounce fosterCareAnnounce = new FosterCareAnnounce( userProcessContainer, userAccount, enterprise,  network, system);
        userProcessContainer.add("fosterCareAnnounce", fosterCareAnnounce);
        CardLayout layout = (CardLayout) userProcessContainer.getLayout();
        layout.next(userProcessContainer);
                // TODO add your handling code here:
    }//GEN-LAST:event_jButton4ActionPerformed

    private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed

        HelpToFosterCare helpToFosterCare = new HelpToFosterCare(userProcessContainer, userAccount, enterprise, network, system);
        userProcessContainer.add("helpToFosterCarel", helpToFosterCare);
        CardLayout layout = (CardLayout) userProcessContainer.getLayout();
        layout.next(userProcessContainer); 
        // TODO add your handling code here:
    }//GEN-LAST:event_jButton5ActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton5;
    private javax.swing.JLabel jLabel1;
    // End of variables declaration//GEN-END:variables

}
