I need help in coding this in java : FlowMonitor has a public static array of ar
ID: 3592052 • Letter: I
Question
I need help in coding this in java :
FlowMonitor has a public static array of arrayRepresentativeIDs, arrayServiceIDs
The FlowMonitor class manages the execution flow of the program.
A flow manager class has an ArrayList of type Ticket.
FlowMonitor has a getSentiment method which returns an integer between 1 and 3, 1 being angriest conversation and 3 being happiest conversation.
FlowMonitor has a sentimentAnalysis method, which receives no argument and returns an ArrayList of three objects. Object one is an integer, which is the overall sentiment scores of the Tickets, object two is the average sentiment scores of the ticket for each customer representative, and object three is the average sentiment scores for the services.
FlowMonitor has a printAnalysis methods that prints the results of one of the three analyses in 3.g. The method receives an integer between 0 to 2 (corresponsing to different analyses) and prints the requested analysis on the screen.a. FlowMonitor has a getSentiment method which returns an integer between 1 and 3, 1 being angriest conversation and 3 being happiest conversation.
Explanation / Answer
//Returns the number of days in month (in year) public static int daysIn (int month, int year) throws IllegalArgumentException { if (year < 1) throw new IllegalArgumentException ("daysIn: year ("+year+") not positive"); if (month DECEMBER) throw new IllegalArgumentException ("daysIn: month ("+month+") not in range [1,12]"); //Thirty days hath September, April, June and November... if (month == APRIL || month == JUNE || month == SEPTEMBER || month == NOVEMBER) return 30; //...all the rest have thirty one... else if (month == JANUARY || month == MARCH || month == MAY || month == JULY || month == AUGUST || month == OCTOBER || month == DECEMBER) return 31; //...except February (must be FEBRUARY in else: see possible exception) else /* if (month == FEBRUARY) */ return 28 + (isLeapYear(year) ? 1 : 0); } //Returns the ordinal (1st, 2nd, 3rd, etc) representing month, day, year public static int ordinalDate (int month, int day, int year) { int ordinal = 0; //Scan every earlier month, summing the # of days in that month... for (int m=JANUARY; mRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.