Moving an object from one class to another provides a means of changing, during runtime, the responses that are performed for a particular object; for example:
class OccupiedBeds is Bed1 Bed2 Bed3
class VacantBeds is Bed4 Bed5 Bed6 Bed7
response to MoveOut1
delete Bed1 from class OccupiedBeds
add Bed1 to class VacantBeds
If MoveOut1 is selected, Bed1 is deleted from the OccupiedBeds class and added to the VacantBeds class. After this response has been taken, selecting Bed1 no longer invokes the response defined for OccupiedBeds. Instead, it invokes the response defined for VacantBeds. However, any response to Bed1 is still invoked when the key is selected.