Question: Write a program on c++ Problem In just a few weeks, the season will change. For this program, your job is to accept the name

 Write a program on c++ Problem In just a few weeks,the season will change. For this program, your job is to accept

Write a program on c++

Problem In just a few weeks, the season will change. For this program, your job is to accept the name of a month and a day in that month from the user and then display the corresponding season to the user. For this program, you will need to use a variety of if statements. The switch statement we learned about in this chapter is not useful for solving this problem. Hints Make a plan of attack before you start trying to write this program. Make sure you've watched the video on String variable basics included in this week's module as the techniques applied there will be extremely helpful. Your Task: o o 1. Use only statements we have learned in class up to this point. 2. Create a new project Seasons along with the program Seasons.cpp. 3. Ask the user to enter the name of the month and the day and capture their response into two variables. 4. Use the user input and the following table to determine the season: Spring: March 20 - June 20 Summer: June 21 - September 21 - Fall: September 22 - December 20 Winter: December 21 - March 19 5. The actual first day of each season can shift from year to year, but for this assignment, you must use the dates specified in the previous table. 6. To be valid, the month name must start with an uppercase letter and be followed by lowercase letters such as January, February, etc. 7. To be valid, the day must be valid for the month. As examples, for January allow 1-31, for February allow 1-29, for April allow 1-30, etc. 8. Display the season that corresponds to the date. 9. If the month or the day is invalid, show the season as the word Invalid. 10. Be sure to test your program at the boundaries to be sure it gives the right results. For instance, test at days -1, 0, 1, the last day of the month, and one day beyond the end of the month

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!