Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are to create a class called Mouse. You should create the definition of the class Mouse in a file mouse.h and the functions for

You are to create a class called Mouse. You should create the definition of the class Mouse in a file mouse.h and the functions for Mouse in mouse.cpp. You will also create a main program to be housed in mousemain.cpp.

A Mouse will have attributes of

  • Breed (string)
  • Weight (float)
  • Name (string)
  • Gender ('m' or 'f')
  • Favorite Food (string)
  • Color description (this could be more than a single word)
  • Other comments (also more than a single word)

A Mouse will have the following methods

  • Accessors for all attributes
  • Mutators for all attributes
  • A default constructor that sets all data elements to 0 or blank text as appropriate
  • A fully specified constructor that allows defining values for all attributes
  • A printinfo method that will display all the info for a mouse in a logical and well formatted way including labels for each of the attribute fields

mousemain.cpp should perform the following actions

  • Allocate a vector to hold 6 Mice
  • Prompt the user for information about each of the six mice and store that information in one of the vector elements
  • Print the information for each Mouse using an iterator

Clean up all allocated space

c++ please. Make sure gender uses bool.

Also the out put shoud be like

Breed :

Name:

Gender: m

...

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

=+5. How are state balanced-budget requirements procyclical?

Answered: 1 week ago