- Hands-On Design Patterns with Java
- Dr. Edward Lavieri
- 84字
- 2021-06-24 14:58:06
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.
推薦閱讀
- 數(shù)據(jù)產(chǎn)品經(jīng)理高效學(xué)習(xí)手冊:產(chǎn)品設(shè)計、技術(shù)常識與機器學(xué)習(xí)
- PyTorch深度學(xué)習(xí)實戰(zhàn):從新手小白到數(shù)據(jù)科學(xué)家
- 文本數(shù)據(jù)挖掘:基于R語言
- 大數(shù)據(jù)導(dǎo)論
- Access 2016數(shù)據(jù)庫技術(shù)及應(yīng)用
- 數(shù)據(jù)革命:大數(shù)據(jù)價值實現(xiàn)方法、技術(shù)與案例
- 大數(shù)據(jù)Hadoop 3.X分布式處理實戰(zhàn)
- 從0到1:JavaScript 快速上手
- MATLAB Graphics and Data Visualization Cookbook
- Hadoop集群與安全
- 大數(shù)據(jù)時代系列(套裝9冊)
- Arquillian Testing Guide
- Access 2010數(shù)據(jù)庫應(yīng)用技術(shù)教程(第二版)
- Creating Mobile Apps with Appcelerator Titanium
- 大學(xué)計算機:理解和運用計算思維