Exercises


  • Create a Nacho class. Store data members in it to represent your favorite aspects of the nacho, their saltiness, their crispness, their refreshing zing, etc.
  • Create a class which represents your own favorite food, storing any important information about it in private variables with public Set and Get methods.
  • Create a date class which contains a month, day, and year with methods to access the information. Then use that date class as a data member of another Inventory class for your local grocery store to keep information about products, such as expiration date, product name, etc.
  • Create a linked list class with methods to add, delete, and search for nodes in the list.
  • Create a binary tree class with features similar to the linked list class. If you don't know what a binary tree or a linked list is, don't worry about it.


Table of Contents

Classes | More Class Basics | Class Methods | Public and Private
Using Public and Private | Classes and Pointers | Exercises