SHARE
SPREAD
HELP

The Tradition of Sharing

Help your friends and juniors by posting answers to the questions that you know. Also post questions that are not available.


To start with, Sr2Jr’s first step is to reduce the expenses related to education. To achieve this goal Sr2Jr organized the textbook’s question and answers. Sr2Jr is community based and need your support to fill the question and answers. The question and answers posted will be available free of cost to all.

 

#
Authors:
Barbara Dolye
Chapter:
Making Decisions
Exercise:
Programming Exercises
Question:2 | ISBN:9781285096261 | Edition: 4

Question

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.

TextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbook

Sorry the answer is not available at the moment…

If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.

Spread the 'tradition of sharing'.