Project 7 Sample Program

Project 7 Sample Program - Spring 2009 CS 31 Project 7...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Spring 2009 CS 31 Project 7 Warmup P Virtual Pets To help ease you into the world of classes you'll need for Project 7, we've designed these warmup exercises. (You will not turn in any of the code you write because of these warmups.) Did you have a Tamagotchi or Gigapet when you were young? Here's your chance to implement a very simple one. This program compiles and runs, but does not produce the output it should, because the implementations of the member functions are incomplete or incorrect. Fix them so that the program produces the desired output. The places to make a change are denoted by TODO comments. You must make no changes whatsoever to the reportStatus , careFor , or main functions. There are a few features used here we haven't talked about yet, but Chapter 6 discusses them, and we'll talk about them in discussion and in class. After you get everything working, try the each of the following experiments to test your understanding of some of concepts: Try declaring the health member function private instead of public, and make sure you understand the resulting compilation error....
View Full Document

Page1 / 5

Project 7 Sample Program - Spring 2009 CS 31 Project 7...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online