Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
16 NOVEMBER 2016
NAME:
MATRIC NO.:
Note that nowhere in our main function do we try to access the data
variables hour, second, minute, and meridian which were defined in the Clock class. In fact,
we could not do so because these data members were placed in the private section of the class
which means that only members of the class can access them. Thus we could not incorporate
the following statements in the main function:
//This is an invalid member access
myClock.hour = 2;