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

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.

主站蜘蛛池模板: 石城县| 屯昌县| 凌云县| 田阳县| 磐石市| 呼图壁县| 黑龙江省| 垣曲县| 沂水县| 柳江县| 宿迁市| 嘉峪关市| 阜阳市| 马关县| 家居| 临朐县| 罗平县| 博客| 天台县| 台北市| 呼伦贝尔市| 新田县| 阿坝县| 双桥区| 九寨沟县| 彭阳县| 榆林市| 墨竹工卡县| 嘉峪关市| 铁岭市| 平陆县| 滨州市| 临清市| 平泉县| 清原| 宝兴县| 平乐县| 琼中| 新密市| 贡山| 修水县|