Lifespan that returns a string with the value

Assignment Help Business Law and Ethics
Reference no: EM132331855

Define a Pet class that stores the pet's name as a C++ string and weight as protected members. Add appropriate constructors, accessor functions, and mutator functions. Also define a function named getLifespan that returns a string with the value "unknown lifespan."

string getLifespan(); Next, define a Dog class that is derived from Pet. The Dog class should have a private member variable named breed that stores the breed of the dog as a C++ string. Add appropriate constructors, mutator functions, and accessor functions for the breed variable. Redefine the getLifespan function to return "Approximately 7 years" if the dog's weight is over 100 pounds and "Approximately 13 years" if the dog's weight is under 100 pounds.

In the driver,

  • need Pet object and Dog pointer.
  • Ask the user for the information to set the data members for a Pet object.
  • Print the lifespan of a Pet.
  • Ask the user for the number of dogs.
  • need dynamic array of Dog objects.
  • Ask the user for the information to set the data members for each Dog object.
  • Print the lifespan for all the dogs.
  • Don't forget to delete your Dogs!

Reference no: EM132331855

Questions Cloud

Please explain how network address translation works : Please explain how Network address translation works. How important it is? How it is used in the office?
Advantages and disadvantages for peer-to-peer : What are some more advantages and disadvantages for peer-to-peer?
What some academics call the trial penalty : In the courtroom and during plea negotiations, the impact of stricter laws is exerted through what some academics call the "trial penalty."
Increased prevalence of social media : Given the increased prevalence of social media, how has your personal perspective of multiculturalism and diversity been impacted?
Lifespan that returns a string with the value : Add appropriate constructors, accessor functions, and mutator functions. Also define a function named getLifespan that returns a string with the value "unknown
Research and develop a plan of work including budget : H/601/6849 -Business Practice in Art and Design-BH027165 – Edexcel BTEC Levels 4 and 5 Higher Nationals specification in Art and Design.
What types of drugs overdosed on : Choose another case where an individual overdosed on drugs (it does not have to be a celebrity) and list what types of drugs they overdosed on.
Iphone or android phone a single : A toaster is a single-function device, but a computer can be programmed to carry out different tasks. Is an iphone or android phone a single-function device
Difference between being hiv positive and having aids : BIOL 2402-What is the difference between being HIV positive and having AIDS? AIDS can be divided in the acute and chronic phases. Describe each.

Reviews

Write a Review

Business Law and Ethics Questions & Answers

  Legal environment of business caselet

The assignment in Law deals with the topic "Legal Environment of Business". A case study about Mary, a newly joined employee who is working in the USA and Europe. She faces few issues at her work place in Europe and tries to talk to her manager who s..

  Business ethics & legal issues caselet

This assignment is about the concept of Business Ethics & Legal Issues. The laws relating to these can be found in Antitrust laws. These laws are concerned with those large corporations which have a majority of market share, mergers and acquisitions.

  Questions on business law and ethics

Examples of securities that are exempted from the registration provisions of the 1933 Act and involving misstatement of material facts in a prospectus.

  Discuss the doctrine of ratification of pre-incorporation

With the aid of a decided cases, discuss the doctrine of ratification of pre-incorporation contract.

  Discuss the extent of phoenixing activity

It has been estimated that about 6,000 phoenix companies operate in Australia, costing government and the community hundreds of millions of dollars per year and impacting on individuals.

  Application of law to facts

Company Law, Application of Law to Facts and Conclusion.

  Question on business law and ethics

This assignment related to business law.

  Questions on business law

Answer all the questions under business law.

  Iidentify the issue raised by the facts

Iidentify the issue(s) raised by the facts, identify the relevant legal principles, apply the relevant legal principles to the facts, reach a conclusion.

  Evaluation of software development

Prepare a report and present an evaluation of the subsequent methodologies for software development in terms of cost, resources and time.

  Business value and ethics

Business value and ethics,  Bart agrees to put Sam's Super Bowl champion-ship autographed football in his sports store to sell for $1,500. Sam agrees to pay Bart a 15% commission for selling the ball. If Joe comes in the sports store and offers Bart ..

  Explain what is meant by income by ordinary concepts

Advise what tax consequences arise in respect of the payments.

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