Design a class named pet

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

Design a class named Pet, which should have the following fields:

  • Name - The name field holds the name of a pet.
  • Type - The type field holds the type of animal that is the pet. Example values are "Dog", "Cat", and "Bird".
  • Age - The age field holds the pet's age.

The Pet class should also have the following methods:

  • setName - The setName method stores a value in the name field.
  • setType - The setType method stores a value in the type field.
  • setAge - The setAge method stores a value in the age field.
  • getName - The getName method returns the value of the name field.
  • getType - The getType method returns the value of the type field.
  • getAge - The getAge method returns the value of the age field.

Once you have designed the class, design a program that creates an object of the class and prompts the user to enter the name, type, and age of his pet. This data should be stored in the object. Use the object's accessor methods to retrieve the pet's name, type, and age and display this data on the screen.

You are to submit the following for the assignment:

  • RAPTOR file with the flowchart of  your working program.  Make sure you run it to make sure it is error free and does what it is supposed to do.
  • Use the generate dropdown to create example C++ code based on your working logical flow chart.   Also attached the code in a Microsoft Word file or a text file.

Reference no: EM13807348

Questions Cloud

Theories and concepts of the marketing function : Identifying the key theories and concepts of the marketing function - Identifying the role that manager's play in the marketing function of an organisation.
Refining the target valuation based on new information : Refining the target valuation based on new information uncovered during due diligence is most likely to affect which of the following:
Explain fascism and corporatism are interchangeable : Explain Michael Ruppert's statement, Fascism & Corporatism are interchangeable. Do you agree/disagree
After developing a prospect base-targets are screened : After developing a prospect base, targets are screened (or organized) for contact prioritization. Which of the following can be used for screening criteria? All of the following statements are true about Letters of Intent, except for: The final price..
Design a class named pet : Design a class named Pet, which should have the following fields: Name - The name field holds the name of a pet. and Type - The type field holds the type of animal that is the pet. Example values are "Dog", "Cat", and "Bird"
Acquiring firm assumes all liabilities of the target firm : In a merger, the acquiring firm assumes all liabilities of the target firm. All of the following are true of buyer due diligence except for: Closing is included in which of the following phases of the acquisition process? Integration planning is unde..
Find the future values of an annuity : Find the future values of the following ordinary annuities: FV of $800 paid each 6 months for 5 years at a nominal rate of 6% compounded semiannually.
Present value for various discounting periods : Find the present value of $600 due in the future under each of these conditions: 16% nominal rate, semi annual compounding, discounted back 4 years. 16% nominal rate, monthly compounding, discounted back 1 year.
Future value for various compounding periods : Find the amount to which $500 will grow under each of these conditions: 12% compounded annually for 5 years. 12% compounded quarterly for 5 years.

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