April 2019
Intermediate to advanced
360 pages
9h 17m
English
The Driver class is created to test the functionality of the state design pattern implementation:
public class Driver { public static void main(String[] args) { PrinterOffLine initialPrinterState = new PrinterOffLine(); Printer printer = new Printer(initialPrinterState); System.out.println("\n"); printer.pushPrint(); printer.pushPrint(); printer.pushPrint(); System.out.println("\n\n"); }}
The Driver class contains a main() method that drives the application's execution.
Read now
Unlock full access