
144 ◾ Software Essentials
Whenever an item is removed from the queue, the queue may be empty.
It is unnecessary to describe what functions do. Programmers should be
aware of the eect of class methods. Aer a constructor res, an object has
been instantiated and placed in an initial state. Aer a mutator executes,
an object has likely been updated and so forth.
Class invariants provide an overview of the type dened, its use, and
expectations. Table 5.9 describes the characteristics of our priority queue,
along with design details that aect use, such as the avoidance of star-
vation and overow. Class invariants oen appear as a common subset ...