Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Make a class that checks what your Chinese horoscope is. The Horoscope class will have the following private attributes string sign; String dob // date

Make a class that checks what your Chinese horoscope is.

The Horoscope class will have the following private attributes

string sign;

String dob // date of birth, mm / dd / yyyy

string //date of star

string // date end

Make a default constructor should initialize with your information according to the date of birth.

Make a parameter constructor that will only receive the date of birth, and the constructor will be in charge of updating the other attributes.

Make setter and getter for the dob attribute. Where the setter will update the other attributes as well.

Make getters d the attributes sign, date and end Date

Make a method that calculates which is your Chinese sign, that is called void compute Sign0

Make a method void display () where you will print the information of the sign

Make a main to test your class.

Use the following multidimensional array

const string SIGNS [9] [3] Horse "," 19900127 "," 19910214 ")

Cabral 1991 0215 19920203

Mono", 19920204 19930122)

Gallo 19930123 19940209

Dog ", 19940209 19950130

Pork 19950131 19960218 Rata 19960219 19970206

Ox ", 19970207 19980127 Tiger", 19980128 19990215

Tip: Use substr to change the format of the date of birth.

Reference for horoscope Chinese https. En.wikipedia.org/wiki/Chinese zodiac

output Example # 1: Enter your date of birth (mm / ddlyyyy): 09/01/1993

Sign: Rooster

Date of birth: 09/01/1993 Period of Date: 01/23/1993 02/09/1994

output Example # 2: Enter your date of birth

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

Database Driven Web Sites

Authors: Mike Morrison, Joline Morrison

1st Edition

061901556X, 978-0619015565

More Books

Students also viewed these Databases questions