Home Segments Top Top Previous Next

620: Practice

Amend the program that you were asked to write in Segment 602 such that it creates and throws instances of the StrangeDataException class whenever a baseball score is either negative or greater than 50. Have your program catch such exceptions and then display a brief explanation before terminating itself.