New Lab 6
New Lab 6
Statement
Exercise 1
Knowing that class A is installed in the dir1 assembly, itself installed in the dir assembly, what is the full
name to give to A ?
Exercise 2
Consider the following two classes: Switch and Lamp, such that when the switch is turned on, the lamp
lights up immediately. Create in a pseudo-object code the small program allowing this interaction.
Exercise 3
Exercise 4
Consider the two classes Mouse and Window, such that when the mouse clicks on a specific point in
the window, it closes. Create pseudo-object code allowing this interaction. We will favor a
“dependency” type relationship between the objects concerned.
Exercise 5
Write code for a class that sends a message to itself, first when that message involves only one object,
then when that message involves two.