Wite a program which is used to enter and calculate the average of finishing times for a running race.Enter times in seconds.Times may include decimal places.Because times are entered as the runners cross the finish line,each time entered must be greater than or the same as the previous time entered. Use looping and if constructs ,JOPtinPane.showInputDialog();
Include two features to help prevent mistakes;
Accept only a positive value for the first entry. If the user does not enter a positive value,reprompt until appositive value is entered.
After the first entry,accept only values that are greater than or the same as the previous entry.
Values that are not accepted do not get includes in the average.
Print appropriate error messages ineach of two cases. You program should stop accepting input when the user enter a negative time.at the end ,you program should print the average finishing time. Do not use arrays .