public class DvdCommandNameStarsOn extends CommandAbstract { private DvdName dvdName; public DvdCommandNameStarsOn(DvdName dvdNameIn) { this.dvdName = dvdNameIn; } public void execute() { this.dvdName.setNameStarsOn(); } }
The DvdCommand class is a command for the DvdName class. The DvdName class implements the DvdNameInterface class. The DvdCommandNameStarsOn class is a subclass of the CommandAbstract class. The execute method calls the setNameStarsOn method.