Create a derived class that represents a specific group

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

Suppose a zoo wants a C++ program to keep track of its animals and to provide information for visitors. Suppose the following class is the base class of an public inheritance hierarchy.

class Animal

{

public:

Animal( string &nme );

private:

string name; // The particular animal's name

};

Animal::Animal( string &nme ) : name( nme ) {}

Create a derived class that represents a specific group or family of animals, and derive from that another class that represents an even more specific family or an individual species. For example, your classes could be Bear and PolarBear, or Cat and Lion. Each of your classes should publicly inherit from the next larger class up the inheritance chain (e.g. PolarBear inherits from Bear and Bear inherits from Animal.) Each of your classes should contain a private staticdata member representing something that is true of all objects of that class. (e.g. for PolarBear, it might be a Boolean isWhite). Post the C++ declaration of your two classes and show the constructor code and the initialization of the static data members.

Reference no: EM13808037

Questions Cloud

Predicting the future of iran : Predicting the Future of Iran
Designing a grocery delivery business : You are designing a grocery delivery business. Via the internet, your company will offer staples and frozen foods in a large metropolitan area and then deliver them within a customer-defined window of time.
Explain which ideas you most agree with from the critiques : Now that you have studied multiple ethical theories, explain which ideas you most agree with from these critiques and which you believe to be weaker than the others.
Plan to transform the organization : Think of an organization you have worked for or one with which you are very familiar.  Diagnose the need for change and present a plan to transform the organization, utilizing Kotter's 8-Step Approach.
Create a derived class that represents a specific group : Create a derived class that represents a specific group or family of animals, and derive from that another class that represents an even more specific family or an individual species
Undermine a project in several ways : Scope Creep is something that can undermine a project in several ways. Can scope creep make it difficult for the contractor to keep costs under control? Why or why not? And, can the schedule suffer due to all of the added work?
Write an toulmin essay on students in public school : Write an Toulmin essay on STUDENTS IN PUBLIC SCHOOL SHOULD WEAR SCHOOL UNIFORMS
Subordinate teams and oversight of subordinate plans : A(n) ____ is the collection of individuals responsible for the overall planning and development of the contingency planning process, including the organization of subordinate teams and oversight of subordinate plans.
Explain how given play illustrates the theme of given poem : Write an essay in which you explain how the play illustrates the theme of the poem. Discuss specifically the different characters and their dreams in relation to the two works

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