top | item 24942483

(no title)

anthonyjhan | 5 years ago

                static Scanner kb = new Scanner (System.in);

                public static void main ( ) {

                         final int SIZE = 100;

                         String [ ] empID = new String [SIZE];             //array of employee's id

                         String [ ] empName = new String [SIZE];           //array of employee's name

                         double [ ] empSal = new double [SIZE];            //array of employee's salary

                         int response;



                         System.out.println ("\fInput " + SIZE + " of Empolyees' Records");

                         accept (empID, empName, empSal);



                         System.out.println (“\nUnsorted lists output:”);

                         displayAllEmp (empID, empName, empSal);

 

    do {

                       System.out.println (“\nEmployee ID is found in location “ + searchByID (empID, empName, empSal));           

                      System.out.println (“\nThere are “ + countEmpSalary (empSal, sal) + “  whose salary is above “ + sal);

        System.out.println ("\nReapeat? Press [0] to stop. >>> ");

        response = kb.nextInt();

    }while (response != 0);



                        sortBySalaryInDescending (empID, empName, empSal);                

                        System.out.println (“\nSorted lists output by Employee's Salary in Descending Order”);

                        displayAllEmp (empID, empName, empSal);



          sortByEmpNameInAscending (empID, empName, empSal);

                        System.out.println (“\nSorted lists output by Employee's Name in Ascending Order”);

                        displayAllEmp (empID, empName, empSal);

                        


                        do {

                       System.out.println (“\nEmployee's name is found in location “ + searchByName (empID, empName, empSal));                  

                      System.out.println (“\nThere are “ + countEmpSalary (empSal, sal) + “  whose salary is above “ + sal);

         deleteSpecificEmpByID (empID, empName, empSal);

        System.out.println ("\nReapeat? Press [0] to stop. >>> ");

        response = kb.nextInt();

    }while (response != 0);                    

                }//End of method main



                //Method Descriptions. 

                //You may also add a code in the main method if you think it is necessary but never delete from the existing code.

discuss

order

No comments yet.