Question: No Java. In C++. Inheritance Lab Create the following classes: Contact - Class # name : string # phone_num : string # email : string

No Java. In C++.

Inheritance Lab Create the following classes:

Contact - Class

# name : string # phone_num : string # email : string + <> Contact() : + <> Contact( name : string, phone_num : string, email : string ) : + setName( name : string ) : void + setPhone( phone : string ) : void + setEmail( email : string ) : void + getName( ) : string + getPhone( ) : string + getEmail( ) : string

WorkContact- Class

# company : string

# work_phone : string # title : string + <> WorkContact() : + <> WorkContact( name : string, phone_num : string, email : string , company : string, work_phone : string, title : string) : + setCompany(company : string) : void + setWorkPhone(work_phone : string) : void + setTitle( title : string ) : void + getCompany() : string + getWorkPhone() : string + getTitle() : string

Guidelines In the default constructors, initialize all strings to empty strings. Make sure to include error checking whenever possible.

Overload the << operator for both classes. Use a public inheritance to create WorkContact which inherits from Contact.

Driver File Create a driver file with the following WorkContacts: 1. Casey Jones 318-455-4312 cjones@comp.com Hills Bank 318-222-2323 Accountant

2. King Kong 318-843-1101 kkong@comp.com Hills Bank 318-222-2525 Accountant

3. Jaime King 831-847-1702 jking@abc.com ABC Ventures 831-255-8533 Software Engineer

4. Johanna Cruz 831-344-3742 jocruz@abc.com ABC Ventures 831-255-8221 Sr. Software Engineer

5. Juana Martinez 831-747-9702 jmartinez@22Code.com 22Code 831-552-6570 Research Scientist

Then display each of the WorkContact objects as a numbered list, similar to the list above. There should be no user input. You may want to store the contacts as an array or vector. Upload a zipped file with all of your files.

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!