Post date: Nov 17, 2015 4:5:27 AM
Quiz 2 (covering up to week 11) during the Theoretical class
Defining Classes 1
4.2 Information Hiding and Encapsulation
Recommended Self-Test Exercises:
p 231: Ex. 10-12.
p 249-250: Ex. 17-19.
Programming Exercises:
p 285: Ex. 3.
Class Rectangle (below) and its test program (see sample output):
Make sure the values entered for both length and width are positive numbers.
Class Circle (below) and its test program (similar to the previous example):
Make sure the values entered for radius are positive numbers.