Post date: Apr 02, 2018 6:44:33 AM
/!\ Quiz 2 is on the first class
/!\ Assignment 2.2 is available! (See JUC's BlackBoard)
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.
Circumference = 2 • π • radius | Circle Area = π • r² | Sphere Volume = 4/3 • π • r³