This question's due date has already passed. You may post a tutorial, but there's no guarantee that the original asker will purchase the tutorial. But other people might!

Question

$1.00 Create a C++ program

Asked by :
wwwfff
wwwfff Not confirmed
Rating :No Rating
Questions Asked: 1
Tutorials Posted: 0
 
 
Q:

Create a C++ program that uses the following major concepts that we have learned so far in this course:

classes, data abstraction, inheritance, composition, pointers, operator overloading, and exception handling

Here is the topic of the program:

"My dog, named Buddy, lives in the backyard. He barks at night when he sees a cat or a squirrel that has come to visit.  If he sees a frog, and he is hungry, he eats it.  If he sees a frog and he isn't hungry, he plays with it.   If he has eaten 2 frogs already, and is still hungry, he will let it go.  If he sees a coyote, he crys for help.  Sometime his friend Spot stops by, and they chase each other.  If he sees any other animal, he simply watches it.

Write one test program and a set of classes that keeps track of all of the backyard activity and stores the results into a file for a given night.  I would expect that you would have an animal class, and a cat, dog, squirrel, coyote class that inherits from the animal class.  You would need to keep track of how many frogs he has eaten, how many animals of each type has come and visited, how often he has played and other such details.  "

You will also need to write a test program that will read the file that was generated from the other test program, and print out how many animals of each type that he has seen, what he has done with them on a particular day.  The user will need to enter in the date, and the information from the file for that date will be read in, and displayed. 

Add in any other capability to the program that you need so it covers all of the required programming concepts listed.  Be creative with this assignment.

Make sure you make good use of comments in your code to help with the maintenance of this program."

 

Available Tutorials to this Question
 
$15.00
buddy: source code and snapshot of output
  • This tutorial hasn't been purchased yet.
  • Posted on May 13, 2012 at 9:56:18PM
Posted by :
DitDede
DitDede Not confirmed
Rating (301):A+
Questions Asked: 2
Tutorials Posted: 1686,
Blog Posts: 1,
Earned: $5,126.28
 
A:
Preview: ... attached file ...

The full tutorial is about 12 words long plus attachments.

attachmentlogo

Attachments:
buddy.zip (51K) 

 Untitled.jpg
 Buddy.h
 Animal.h
 AnimalMain.cpp
 ]