Write appropriate accessor and mutator functions

Assignment Help Computer Engineering
Reference no: EM132164398

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

Reference no: EM132164398

Questions Cloud

Females with vitamin d deficiency : Assuming that the population variances are unequal, you need to test the claim that infertile females have lower AMH levels
Create an abstract data type which simulates operations : For this pre-lab you will create an abstract data type (ADT) which simulates operations associated with the ordinary concept of "a list".
Pretreatment and posttreatment kps scores : The sample standard deviation of the differences between the pretreatment and posttreatment KPS scores is 10.787. Using a 0.05 significance level
How does stress affect officers : Law enforcement officers face all types of stress during their daily activities. How does stress affect officers? After watching officer stress videos.
Write appropriate accessor and mutator functions : A default constructor that assigns empty strings ("") to the name, address, and phone member variables, and 0 to the age member variable.
Discuss about the boolean-logic operators : This is a pretty easy homework assignment but it just needs to be a program with defined funfuctions that includes boolean-logic operators.
Population variances are unequal : Assuming that the population variances are unequal, you need to test the claim that infertile females have lower AMH levels than fertile females using a 0.05
Explain the unique supervisory challenges : Explain the unique supervisory challenges that will exist in a prison. What types of employee misbehavior are possible, and how can management guard against.
Create an iterator that will allow the program to return : Create unique key values (Do not use map class from STD library.) Create an iterator that will allow the program to return the key,value pairs.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd