Answered step by step
Verified Expert Solution
Question
1 Approved Answer
a ) Write a method called GetDayOfMonth ( ) which prompts and accepts the day of the month ( an integer ) from the user
a Write a method called GetDayOfMonth which prompts and accepts the day of the
month an integer from the user then returns this number. Use exception handling to
indicate that an exception occurred if the day of the month is less than one or greater
than thirtyone, but do not handle the exception in this method.
b Write a method called ProcessDay that calls the GetDayOfMonth method and
displays the day returned by the method. Handle any exceptions that may occur in the
ProcessDay or passed up to it
from methods called. Rethrow any exception that occurs.
c Write a main method which calls the ProcessDay method. Handle all exceptions
that may occur.
d Ensure that you program compiles and runs correctly, both when there is good input
day or invalid input day or day
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started