C# How to Program: Creating Month Class. C# OOP, Properties, Methods, ToString() and C# DateTime Classes

Share it with your friends Like

Thanks! Share it with your friends!

Close

C# How to Program: Creating Month Class. C# OOP, Properties, Methods, ToString() and C# DateTime Classes

Create a Month class that has a single data member of month number. Include a member method that returns the name of the month and another method that returns the number of days in the month. The ToString( ) method should return the name and number of days. Write a second class to test your Month class. The second class should allow the user to input a month number. Display the name of the month associated with the number entered and the number of days in that month. For this exercise, use 28 for February. If the user inputs an invalid entry, display an appropriate message.

DOWNLOAD SOURCE CODE: doyle-5-2-mathclass

Comments

Write a comment

*