Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * VPetApp.cpp
- *
- * Created on: Aug 10, 2011
- * Author: Derek
- */
- #include "VPet.h"
- using namespace std;
- int main()
- {
- VPet bob(150, false);
- bob.feedPet(25);
- VPet sam;
- sam.feedPet(10);
- cout << "Bob weighs: " << bob.getWeight() << endl;
- cout << "Sam weighs: " << sam.getWeight() << endl;
- if(bob.getHungry())
- {
- cout << "Bob is hungry." << endl;
- }
- else
- {
- cout << "Bob is not hungry." << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment