(1) Task #1 Character and String Class Methods– Please apply the professors suggestions to your program.(2) Task #2 String.split and the StringBuilder ClassI was working on Task #1. However, I got stuck. My program did not work correctly.I got advice from a professor about my program.Please apply the above suggestion to your program.Professors advice.• Consider using the isDigit(char ch) boolean Character class method for testing char values found in Table 9-1 on page 558.• Assume that you are checking to see if the score on a test is not in the range from 0 to 100. Further, assume that the integer variable named score has already been declared correctly and has been defined by user input. You might use code similar to the code snippet below to detect an out of range value.if (score 100) { System.out.println(“The value you entered “ + score + “ is not in the range from 0 to 100.”); }Please apply the above suggestion to your program.– – – – – – – – – – – – – – – – – – – – – – – – – – – – – –My Programpublic class Time{public static void main(String[] args){private int hours; //Conventional hoursprivate int minutes; //Conventional minutesprivate boolean afternoon; // Flag for afternoon/**Constructs a customary time (12 hours, am or pm)from a military time ##:##@param militaryTime Time in the militaryformat ##:##*/public Time(String militaryTime){// Check to make sure something was enteredif (militaryTime == null){System.out.println(militaryTime + is not a valid miliary time. );}// Check to make sure there are 5 characterselse if (militaryTime.length()!=5){System.out.println(militaryTime + is not a valid miliary time. );}else{// Check to make sure the colon is in // the correct spotif (militaryTime.charAt(2)!=:){System.out.println(militaryTime + is not a +valid miliary time. );}// Check to make sure all other characters // are digitselse if (!(militaryTime.charAt(0)>=0 && militaryTime.charAt(0)<=9)){System.out.println(militaryTime + is not a valid military time.);}else if (!(militaryTime.charAt(1)>=0 && militaryTime.charAt(1)<=9)){System.out.println(militaryTime + is not a valid miliary time. );}else if (!(militaryTime.charAt(3)>=0 && militaryTime.charAt(3)<=9)){System.out.println(militaryTime + is not a valid miliary time. );}else if (!(militaryTime.charAt(4)>=0 && militaryTime.charAt(4)<=9)){System.out.println(militaryTime + is not a + valid miliary time. );}else{// SEPARATE THE STRING INTO THE HOURS// AND THE MINUTES, CONVERTING THEM TO// INTEGERS AND STORING INTO THE// INSTANCE VARIABLESthis.hours=Integer.valueOf(militaryTime.substring(0, 2));this.minutes=Integer.valueOf(militaryTime.substring(3));// Validate hours and minutes are valid valuesif(hours > 23) {System.out.println(militaryTime + is not a valid miliary time. );} else if(minutes > 59) {System.out.println(militaryTime + is not a valid miliary time. );} // Convert military time to conventional time // for afternoon timeselse if (hours > 12) {hours = hours – 12;afternoon = true;System.out.println(this.toString());}// Account for midnightelse if (hours == 0) {hours = 12;System.out.println(this.toString()); }// Account for noonelse if (hours == 12) {afternoon = true;System.out.println(this.toString()); }// Morning times do not need convertingelse {System.out.println(this.toString()); }} }}/**The toString method returns a conventional time.@return A conventional time with am or pm.*/public String toString(){String am_pm; String zero = ;if (afternoon)am_pm = PM;elseam_pm = AM;if (minutes < 10)zero = 0;return hours + : + zero + minutes + + am_pm;}}}
NURSING SAMPLE REQUIRED BEFORE PLACING THE ORDER BIDDER ABOVE 4.8
NURSING SAMPLE REQUIRED BEFORE PLACING THE ORDER BIDDER ABOVE 4.8 ONLY I am submitting the Part I assignment order now and Part II in a