In this exercises we will explore some basic similarities and differences between use of classes in Java/C# and C++. (In the scope of this lecture we will NOT be concerned with class definition details. This belongs to a forthcoming lecture). In particular we will study creation/allocation of objects, and parameter passing of objects to a function/method.
The starting point is the simple Point class in C# and a sample C# client program that creates and operates on points. On purpose, I do not use C# properties - but simple accessor methods (ala Java). Make sure that you familiarize yourself with the correct output of this program. Predict it before you run it.
We provide a similar Point class in C++. The C++ definitions of the Point functions are also provided (but they are not important for this exercise). You are supposed to explore various uses of class Point in C++.
Feel free to do other experiments based on the Point classes that help you understand the similarities and differences between use of C# and C++ classes, pointers, references, and stack allocation of C++ objects.