The illustration shows a code segment with the lines numbered from 1 through 41 and the annotations are as follows:
"//Implementation file dtime.cpp (your system may require some
//suffix other than .cpp): This is the IMPLEMENTATION of the ADT DigitalTime.
//The interface for the class DigitalTime is in the header file dtime.h.
#include <iostream>
#include <cctype>
#include <cstdlib>
#include "dtime.h"
using namespace std;"
" namespace" annotated as "One grouping for the unnamed namespace"
"{
//These function declarations are for use in the definition of
//the overloaded input operator >>:
void readHour(istream& ins, int& theHour);
//Precondition: Next input in the stream ins is a time in 24-hour notation,
//like 9:45 or 14:45.
//Postcondition: theHour has been set to the hour part of the time.
//The colon has been discarded and the next input to be read is the minute.
void readMinute(istream& ins, int& theMinute);
//Reads the minute from the stream ins after readHour has read the hour.
int digitToInt(char c);
//Precondition: c is one of the digits '0' through '9'.
//Returns the integer for the digit; for example, digitToInt('3')
//returns 3.
}//unnamed namespace"
" namespace dtimesavitch" annotated as "One grouping for the namespace dtimesavitch. Another grouping is in the file dtime.h."
" {
bool operator ==(const DigitalTime& time1, const DigitalTime& time2)
<The rest of the definition of == is the same as in Display 12.2.>
DigitalTime::DigitalTime( )
<The rest of the definition of this constructor is the same as in Display 12.2.>
DigitalTime::DigitalTime(int theHour, int theMinute)
<The rest of the definition of this constructor is the same as in Display 12.2.>
void DigitalTime::advance(int minutesAdded)
<The rest of the definition of this advance function is the same as in Display 12.2.>
void DigitalTime::advance(int hoursAdded, int minutesAdded)
<The rest of the definition of this advance function is the same as in Display 12.2.>"