« Patrons de conception/Commande » : différence entre les versions

Contenu supprimé Contenu ajouté
Ligne 28 :
 
<source lang="java">
/*the InvokerInvocateur class*/
public class Switch
{
Ligne 51 :
}
 
/*Receiver classRécepteur */
public class Light
{
Ligne 67 :
}
 
/*the CommandCommande interface*/
public interface Command
{
Ligne 74 :
 
 
/* Commande concrète pour allumer la lumière */
/*the Command for turning on the light*/
public class TurnOnCommand implements Command
{
Ligne 90 :
}
 
/* Commande concrète pour éteindre la lumière */
/*the Command for turning off the light*/
public class TurnOffCommand implements Command
{
Ligne 106 :
}
 
/*The Classe de test class*/
public class TestCommand
{