Description
A Slot is an encapsulation of a slot in a CD/DVD multi-disc
changer. A Slot can either be empty or full. When it is
full, it must store the ID (an integer that is greater than 0)
of the disc it is holding. (When it is empty it must have an ID of 0.)
Methods
This class must contain the following public methods. It may contain other methods as well.
Default Constructor:
Slot to empty
and the ID of the disc in the Slot to 0.
The clear Method:
clear
that has no parameters and does not return anything.
It must "empty" the Slot.
The getID Method:
getID
that is passed an int by reference and
does not return anything. This method must set the value of the
int parameter to the ID of the disc that
is currently in this Slot. (When a Slot
is empty, this method must set the int it is passed to
0.)
The isEmpty Method:
isEmpty
that has no parameters and returns a bool
indicating whether the Slot is empty or not.
The setID Method:
setID
that is passed an int by value and
does not return anything. This method must store the
int it is passed in an attribute.
Copyright 2010