官术网_书友最值得收藏!

Use case

We will demonstrate the interpreter design pattern by using a simple number-to-character scenario. Our Code Interpreter program will accept numeric input and translate it to a series of characters. For example, an input string of 319 might return a value of YES. We will use an expression interface and three classes to demonstrate this relatively simple use case.

The following screenshot shows the example program's output, given the user's input:

Code Interpreter output

The preceding screenshot shows the user input as 319.

主站蜘蛛池模板: 青铜峡市| 玛多县| 潞城市| 栾川县| 安宁市| 南汇区| 金湖县| 嘉义县| 镇沅| 江达县| 远安县| 桐乡市| 七台河市| 普洱| 岐山县| 太仓市| 辽阳市| 海林市| 化德县| 达州市| 永福县| 镇巴县| 高清| 大关县| 绵竹市| 阿拉善盟| 镇雄县| 高淳县| 金秀| 蓬安县| 登封市| 民乐县| 汨罗市| 会昌县| 高唐县| 襄垣县| 闽侯县| 巴中市| 克山县| 麻城市| 江油市|