Definition of the member functions to implement class

Assignment Help C/C++ Programming
Reference no: EM13937906

Example 12-9

#include <string>
Using namespace std;

Class personType
{
Public:
Void print () const;
.
.
Void setName (string first, string last);
.
.
String getFirstName () const;
.
.
String getLastName () const;
.
.
personType (string first = " ", string last= " ");
Private:
String firstName;
String lastName;
};


Example 12-9 defined a class personType to store the name of a person. The member functions that we included merely print the name and set the name of a person. Redefine the class peronType so that, in addition to what the existing class does, you can:

a) Set the first name only

b) Set the last name only

c) Store and set the middle name

d) Check whether a given first name is the same as the first name of this person

e) Check whether a given last name is the same as the name of this person

Write the definition of the member functions to implement the operations for this class. Also, write a program to test various operations on this class.

Reference no: EM13937906

Questions Cloud

Carbonyl compounds to the corresponding alcohol : Eugene Hur, a former undergraduate in our lab has discovered that AKR3A1, a protein from budding yeast, catalyzes the NADPH-dependent reduction of various carbonyl compounds to the corresponding alcohol. At saturating concentrations of the cosubst..
What is process that government goes through to make sure : What is the process that the government goes through to make sure that they adopt a balanced budget as prescribed by the Constitution? What roles do the governor, the Congress, and bureaucracy play in this process? (This is over Texas Govt)
Show how each transaction affects the accounting equation : Show how each transaction affects the accounting equation. Prepare the four basic financial statements for the month of April. (Balance Sheet at April 30, 2009)
Most protection from prepayment risk : What are the promised coupon payments to each of the classes during the first quarter? What is the total interest payment due? If the trustee received a payment of $4,834,796, how would the payment be applied? Assume that for the first year the trust..
Definition of the member functions to implement class : Write the definition of the member functions to implement the operations for this class. Also, write a program to test various operations on this class.
What are the total assets of the company at end of november : What are the total assets of the company at the end of November 2008? Prepare a statement of cash flows for November 2008. What was net income for November 2008?
Implement the data modelling for a database : Implement the data modelling for a database that is based on the following application scenario. The application scenario The online sale company Best Deal needs to implement a database to manage its business data. The company has delegated this t..
Benefits and challenges of integrating the operations : Apply a systems perspective to discuss why it is important to align the supply chain strategy with the design of the electronic business platform, and the benefits and challenges of integrating the operations of the two.
Compare two definitions of advanced practice nursing : Compare and contrast the two definitions of advanced practice nursing as defined by the American Association of Colleges of Nursing (AACN) DNP Essentials, the APRN consensus model, and as defined in your textbook.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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