Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(.f95) Programming Assignment What's your. sign? Program Overview: This program will ask the user for their date of birth (day and month) and determine their

(.f95)
image text in transcribed
image text in transcribed
Programming Assignment What's your. sign? 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 wi1l provide a horoscope, a short message detailing their upcoming fortune Relevant Details and Formulas: Sign Aries Taurus Gemini Cancer Leo irgo Libra Scorpio Sagittarius November 22 December 21 Capricorn December 22 January 19 Aquarius January 20 February 18 Pisces Start Date End Date March 21 April 20 May 21 June 21 July 23 August 23 September 23 October 22 October 23 November 21 April 19 May 20 June 20 July 22 August 22 September 22 February 19 March 20 Sources httpsi//en.wikipedia.org/wiki/hstrological sign Dates tablel Example horoscope: "Aries, you should practice programming more, it will pay dividends in an upcoming trial of hardship." Program Specification Prompt the user for their month and day of birth. You may use either characters (Jan, January, etc) or numbers for the month. Ensure that the values entered by the user are valid. If not, an error message should be generated and the program should be stopped . Store the number of days in each month in 12 parameters. (Use 29 Eor February) * Create a parameter for each sign with values from 1 to 12. " The start and end dates of each sign do not need to be stored in parameters. The program must determine the astrological sign of the user using an if statement and store the value in an integer variable. * Use a select case statement to determine which horoscope message to output based on the sign variable. Make sure to include the sign in the output. The select case must use the twelve sign parameters as its selectors. Things to note and helpful hints It is acceptable that the output is not well formatted. Although we are checking to see that the values entered in are in a valid range, you can still assume the user wi1l type in the appropriate type of input. Remember, the stop 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 accepting new experiences, favorable change is coming Example Erroneous Input (Month out of Range) What month were you born in (1-12)? 13 Invalid month entered Example Erroneous Input (Day out of Range) What month were you born in (1-12)? What day of the month were you born? Invalid day entered Example Erroneous Input (Day out of Range) What month were you born in (1-12)? What day of the month were you born? 30 Invalid day entered

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

More Books

Students also viewed these Databases questions

Question

Does it have at least one-inch margins?

Answered: 1 week ago

Question

Does it highlight your accomplishments rather than your duties?

Answered: 1 week ago