Skip to main content

Posts

Showing posts from June, 2022

22 may 2022, cpa java coding solution.(create a class RRT......).

 Q2. Create the class RRT(Rapid response team) with the below attributes: ticketNo-int raisedBy-String  assignedTo-String priority-int project-String All attributes should be private,write getters and setters and  parameterized constructor as required. Create class MyClass with main method. Implement a static method-getHighestPriorityTicket in MyClass class. getHighestPriorityTicket method:      This method will take an array of RRT objects ,and a String value as  parameters.This method will return the RRT object with highest priority ticket from the array of the RRT objects for the given project(String  parameter passed).Highest priority is the one which has lesser value. for example:1 is considered as high priority and 5 is considered as  low priority.    If no RRT with the above condition is present in the array of the  RRT objects,then the method should return null.    The main method should print the ticketNo,raisedBy and assignedTo from returned object if the returned object is n