Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 398 Weeks Ago, 6 Days Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Computer Science Posted 14 Sep 2017 My Price 8.00

domesticated animal

C++ programing problem

Project 2: Pet

The class Pet represents a domesticated animal. As you'll from its class diagram, it is a concrete (instantiatable) class which might represent a household animal. The class Dog is a much more specific kind of Pet that identifies an animal of canine variety. Following the diagrams show below, create the classes Pet and Dog. A sample driver has been provided to guide your efforts. IN ORDER TO RECEIVE FULL CREDIT, YOUR SUBCLASS MUST CALL ITS PARENT CONSTRUCTOR AS WELL AS REUSE ITS PARENT'S PROTECTED MEMBERS.

Pet Class Hierarchy

Pet    Dog

Pet( );
Pet( std::string name, std::string variety, std::string says );

std::string getName( ) const;
std::string getVariety( ) const;
virtual std::string speak( );

 

Dog( );
Dog( std::string name );

virtual std::string speak( );

// THESE ARE PROTECTED!!!
std::string myName;
std::string myVariety;
std::string howIspeak;

 

// BY DEFAULT, DOG'S ARE
// THE VARIETY "Canine" AND
// SPEAK BY SAYING "Bark"

Driver Code

Pet * p = new Pet( "Sunset", "Cat", "meow..." );
Dog * d = new Dog( "Muffin" );

cout << "The " << p->getVariety( ) << " " << p->getName( ) << " speaks by saying " << p->speak( ) << endl;

cout << "The " << d->getVariety( ) << " " << d->getName( ) << " speaks by saying " << d->speak( ) << endl;

Sample Output
The Cat Sunset speaks by saying meow...
The Canine Muffin speaks by saying Bark

 

Answers

(5)
Status NEW Posted 14 Sep 2017 07:09 PM My Price 8.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll

Not Rated(0)