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

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.

主站蜘蛛池模板: 惠水县| 龙口市| 黔西县| 武定县| 湖口县| 彰化市| 萝北县| 巩义市| 岫岩| 五家渠市| 绥江县| 连平县| 西盟| 衡水市| 台山市| 镇远县| 思茅市| 荥经县| 田林县| 无锡市| 杭锦后旗| 昭苏县| 嵩明县| 山西省| 尚义县| 灵武市| 射洪县| 鸡东县| 九龙城区| 静宁县| 全州县| 农安县| 布拖县| 大庆市| 郴州市| 阜平县| 灵川县| 田阳县| 阿克苏市| 双峰县| 保定市|