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

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.

主站蜘蛛池模板: 探索| 双江| 廉江市| 神池县| 巨鹿县| 临邑县| 贵德县| 黔江区| 瓦房店市| 通化市| 康定县| 谷城县| 塘沽区| 海口市| 遂平县| 澎湖县| 永福县| 库伦旗| 浠水县| 通海县| 教育| 上杭县| 四会市| 九龙城区| 安徽省| 上蔡县| 红河县| 梁山县| 扶沟县| 建始县| 萨嘎县| 苍南县| 茌平县| 栾城县| 治多县| 垫江县| 武汉市| 昔阳县| 松溪县| 乐亭县| 云南省|