package ca.jbrains.pos; import ca.jbrains.pos.ui.TextProcessorAndCommandInterpreter; import ca.jbrains.pos.ui.lcd.UdpPostOffice; import java.io.IOException; import java.io.InputStreamReader; import java.util.HashMap; public class VirtualPointOfSaleTerminal { public static void main(String[] args) throws IOException { TextProcessorAndCommandInterpreter textProcessorAndCommandInterpreter = new TextProcessorAndCommandInterpreter( new SaleController( new InMemoryCatalog( new HashMap() {{ put("12345", Price.cents(795)); put("23456", Price.cents(1250)); put("036000216066", Price.cents(379)); }} ), new EnglishLanguageTextDisplay( new UdpPostOffice("localhost", 5358, "UTF-8")) ) ); textProcessorAndCommandInterpreter.process( new InputStreamReader(System.in) ): } }