Create a programme that implements the StringTooLongException exception class, which is intended to be fired if a string is found to have an excessive number of characters. Read user-supplied strings into the program's main driver until the user inputs "DONE." Throw the exception if a string with too many characters (let's say 20) is entered. Permit the programme to end when an exception is thrown.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter11: Exception Handling
Section: Chapter Questions
Problem 1CP
icon
Related questions
Question

Create a programme that implements the StringTooLongException exception class, which is intended to be fired if a string is found to have an excessive number of characters. Read user-supplied strings into the program's main driver until the user inputs "DONE." Throw the exception if a string with too many characters (let's say 20) is entered. Permit the programme to end when an exception is thrown.

Expert Solution
steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Knowledge Booster
Fundamentals of system reliability
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning