IN JAVA USING METHODS/FUNCTIONS
Write the function convertToTraditional(..) that accepts astandard time and converts it to traditional time.
Write the function convertToStandardTime(..) that accepts atraditional time and converts it to standard time.
The input file TimeInput.txt will contain 5 lines, eachrepresenting a STANDARD time or TRADITIONAL time in the form (hh:mm or hh:mm xx )
The output file TimeOutput.txt will contain 5 lines of output,which represents the converted time. If the input is invalid, stateinvalid
Sample Input (only 3 shown):
1:34 PM
01:34
26:62
Sample Output (only 3 shown):
13:34
1:34 AM
invalid
-
I will give you a very good rating, but can you please do thiscode without endsWith, .isEmpty, .split, String
ORPayPal Gateway not configured
ORPayPal Gateway not configured