Question: 3 . The Address class: - Member Variables - a string that holds the street name - street - a string that holds the city

3. The Address class:
- Member Variables
- a string that holds the street name - street
- a string that holds the city name - city
- a string that holds the state name - state
- a size_t that holds the zip code - zipcode
- Constructors
- a default constructor that takes no parameters.
- a parameterized constructor that takes values for each member variable in the above order to create an Address object.
- Member Functions/Methods
- Getters \& Setters (aka Mutators \& Accessors) for each member variable [8 in total].
- Notice that in setDOB0, you will using parameters to build a new Date object but in the constructor, an existing Date object will be passed.
- All string variables will have values stored in upper-case only.
- The operator> function takes istrean\& (for cin) and Address\& (for Address object) as parameters and returns istreans (for cin). It will be declared as a friend of Address class.
- The overloaded >> operator sets the values for all member variables using user input. The Autograder will send inputs in the following sequence. As always, the > aren't included in the actual inputs. A new line indicates that the enter/return key has been pressed:
STREET>
Be extra careful managing your input stream!
- The operator function takes ostream (for cout) and Address\& (for Address object) as parameters and returns ostream\& (for cout). The overloaded operator displays the Address object in format specified below. It will be declared as a friend of Address class.
- the output must match the following format exactly! What is between the > will be your member variables. Do not indude the > characters in your output. Be sure to end each line.
- The left side of the '\(\because \)' will be a field of 13 characters, then the colon character '\(\), then a field of 21 characters for a total of 35 characters.
STREET
CITY
STATE
ZIP CODE
zip>
4. The Pet class:
- Member Variables
- a string that holds the pet name - name
- a date that holds the date of birth - DOB
- a string that holds the pet type - type
- a string that holds the breed - breed
- Constructors
- a default constructor that takes no parameters.
- a full parameterized constructor that takes values for each member variable in the above order to create a Pet object. Use constructor for Date class to set DoB
- Member Functions/Methods
- Getters \& Setters (aka Mutators \& Accessors) for each member variable [8 in total].
- All string variables will have values stored in upper-case only.
- settype will take a const int \& as input and sets the type using below values (should implement using switch-case only).
-1 : DOG
-2 : CAT
-3 : BIRD
-4 : SNAKE
3 . The Address class: - Member Variables - a

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 Programming Questions!