Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ program please help thank you so much !! Program Overview: This program will ask the user for their date of birth (day and month)

C++ program please help thank you so much !! image text in transcribed
image text in transcribed
Program Overview: This program will ask the user for their date of birth (day and month) and determine their astrological sign (see below). Then, depending on the sign, it will provide a horoscope, a short message detailing their upcoming fortune. Relevant Details and Formulas sign Aries auruS Gemini Cance Start DateEnd Date March 21 Apr1 20 May 20 May 21 June 21 July 23 August 23 September 23 Octobez 22 October 23 Novesber 21 April 19 June 20 July 22 August 22 September 22 virgo Libra Scorpio Sagittarius Novenber 22 Decenber 21 Capricorn December 22 January 19 Aquarius January 20 Fbruary 18 Pisces February 19 areh 2o Soarcel httpst/len.wskspedza.G/VECL/ASTrologica sign Daces table Example horoscope: "Aries, you should practice progzamming moze,it will pay dividends in an upcoming trial ot hardship. Program Specification Prompt the user for their month and day of birth. You may use either a string (Jan, January, etc) or numbers for the montih Ensure that the values entered by the user are valid. if not, an error message should be generated and the program should be stoppecd Store the number of days in each month in 12 constants. (Use 29 .Create a constant (or enum) for each sign with values trom 1 to .The start and end dates of each sign do not need to be stored as or February) constants The program must detexmine the astrological sign of the user asing an 4if statement and stoze the value in an int variable Social Sclences . Use a awitah statement to determine which horoscope message to output based on the sign variable. Make sure to include the sign in the output. The switch values must use the twelve sign constants. Things to note and helpful hints Check that the input is both in the valid range of expected values and that it was of the appropriate type. cin.fail will return true if the input stream shut down due to unusable input text. Remember, the return statement will immediately end your program. Example Output What month were you born in (1-12)? What day of the month were you born? Your Horoscope Virgo, be open to accepeing new experiences, favorabie change is coming Example Erroneous Input (Month out of Range) : What month were you bozn in (1-12) 2 1 3 invalid month entered. Example Erroneous Input-(Input-is-wrong type) i What month were you born in (1-12)2 February Expected numeric value Example EExoneous Input (Day out of Range) What month were you born in (1-12) 2 What day of the month weze you born? 30 Invalid day entered Social Sclences

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Issues In Database Management A Refernce For The Thinking Practitioner

Authors: Fabian Pascal

1st Edition

0201485559, 978-0201485554

Students also viewed these Databases questions

Question

What will you do or say to Anthony about this issue?

Answered: 1 week ago