Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using C++, Design a class that holds the following personal data: name address age phone number Write appropriate accessor and mutator functions. getName getAddress getAddress

using C++,

Design a class that holds the following personal data:

name

address

age

phone number

Write appropriate accessor and mutator functions.

getName

getAddress

getAddress

getPhone

setName

setAddress

setAge

setPhone

The class should have the following constructors:

A default constructor that assigns empty strings ("") to the name, address, and phone member variables, and 0 to the age member variable.

A constructor that accepts the following values as arguments and assigns them to the appropriate member variables: name, address, age, and phone.

Demonstrate the class by writing a program that creates three instances of it. One instance should hold your information, and the other two should hold your friends' or family members' information. Dsplay them.

Sample Run My information: Name: Joe Doe Address: 15 Main Drive Age: 50 Phone: 408-555-1111 My family meber's information: Name: Jane Doe Address: 123 Bay Street Age: 45 Phone: 408-555-1212 My friend's information: Name: Henry Smith Address: 111 Stelling Road Age: 30 Phone: 408-555-2222 

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_2

Step: 3

blur-text-image_3

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

The Accidental Data Scientist

Authors: Amy Affelt

1st Edition

1573877077, 9781573877077

More Books

Students also viewed these Databases questions

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago