Likes

Java Lab_7_Ans_3

Kiwi Inc. is a leading software development company in the US. The top managment of the organization has found that the Help Desk division does not handle queries or issues of the employees on a priority basis. For this, the top managment has decided to automate the tasks of the help Desk division. Therefore the managment has assigned this task to the development team to create an application that has the following functionalities:

- Application must enable employees to log their requests or issues.
-Application must enable the team of the Help Desk division to handle queries on the first come first served basis.

The development team has assigned the task to john, the Senior Software Developer. However, in the initial phase of development, John needs to create the user interface and creat the application only for a single user. Help John to achieve the preceding requirement.


Solution


import java.until.ArrayDequr;

public class Request  {

ArrayDeque<String> pool;

public Request()   {
    pool = new ArrayDeque<String>();
}

public void initRequest(String i, String p)   {
String ID = i;
String prb = p;

String rqt = "Empliyee ID: " + ID +"\nProblem: " + prb;
pool.add(rqt);

}

public void dispRequest()   {
System.out.println
("================================================================");
System.out.println("-----------------------REQUEST POOL-------\n");

if (pool.isEmpty () == true) {
           System.out.println ("Currently, there is no request in the pool.");
        }
           else
        {
             for (String s : pool) {
             System.out.println (s);
             System.out.println
      ("--------------------------------------------");
    }
 }

}
      public void attdRequest () {
       String status;
   
     if (pool . isEmpty () == true) {
         System.out.println
   ("=====================================================");
     System.out.println ("Currently, there is no request in the pool.");
      } else {
           System.out.println
   ("=====================================================");
      System.out.println ("You need to resolve yhr following problem:");
        System.out.print(pool . getFirst () );
     
        status = "R";
   
      if (status . toUpperCase () . equals ("R") ) {
           System.out.println
    ("======================================================");
       System.out.println ("The problem has been resolved:");
         System.out.println (pool . getFirst () );
          pool . remove ();
     } else if (status . toUpperCase () . equals ("P") ) {
         System.out.println
   ("\n=======================================================");
         System.out.println ("Please resolve the problem ASAP .");
           } else {
              status = "N";
        }
    }
}
   
     public static void main (String [] args) {
        Request rq = new Request ();
        rq . initRequest ("3423", "System is not working");
        rq . initReuest (" 3764", "Internet is not working");
        rq . dispRequest ();
        rq . attdRequest ();
    }
}          

6 comments:

Be Healthy News said...

This is really great information shared by you. I appreciate your post for Software Company.
Software Development Company in Indore

GenTech said...

Nice information provided and thanks for sharing
Genesis Technologies having job vacancies for developers in Java. We are looking for talented people who are willing to work in a challenging environment. Now get the opportunity to work with us and acquire Java Developer Jobs in Indore.

IICE-Indore said...

I am really happy to say it’s an interesting post to read . I learn new information from your article , you are doing a great job .
Software Development in Indore
Keep it up

Android App Development Company in Indore said...

You have written a clean java program. Thanks for giving an example for coders who are looking to learn java from scratch.

Software Development Company In Indore

IICE-Indore said...

thanks for sharing this fantastic article.I study your publish and me really adore it.Any extra records to visit Our website
Keep Posting:)

digiclayinfotech said...

Hi! Thank you for the share this information. This is very useful information for online blog review readers. Keep it up such a nice posting like this. We are most leading IT & Software company in India