CPSC 221H-200: Data Structures & Algorithms
Lab Exercise #4
Spring 2009
- Create a class called Point with two private data members (x,y), a public print function, and constructors.
- Create an array of 10 Points on the stack, initialize them with non-zero data, and print them.
- Create an array of 10 Points on the heap, initialize them with non-zero data, and print them.
- Loop through the array on the heap using Pointer Arithmetic and print them.