You are on page 1of 4

PMSCS OOP 602

HW Chap 08
Name: Md. Jeyson Jaman Sawan
Roll: CSE202101001
Level 1 Programming Exercises★

06. When you run Ch8TestAgelnputVer4 and enter a negative number, you will get an error
message: “Sorry, you do not qualify to enter the junior competition.” However, when a negative
number is entered, it is more appropriate to say “Illegal value: negative age is invalid.” Modify
the TestInputVer4 class so that an appropriate error message is displayed for a negative input
value.

Solution:

You might also like