Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

a program that converts dates from numerical month-day format. Ask for the month and day in the format of "month/day"..
Then convert it the date to the format "month-name day". For example, input of 1/31 should produce January 31 as output. Include a loop to repeatedly ask for and convert dates until a blank line is entered.
There are already define two exception classes, one called MonthException and DayException. If the user enters anything other than a legal month number, (integer from 1 to 12), your program should throw and catch a MonthException. Similarly, if the user enters anything other than a valid day number (an integer from 1 to either 28, 30, or 31, depending on the month), your program should throw and catch a DayException. To keep things simple, assume that February always has 28 days.

About

First time creating a program that may cause an exception

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages