- 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.
推薦閱讀
- 漫話大數據
- 企業數字化創新引擎:企業級PaaS平臺HZERO
- SQL查詢:從入門到實踐(第4版)
- Creating Dynamic UIs with Android Fragments(Second Edition)
- Mastering Machine Learning with R(Second Edition)
- 數亦有道:Python數據科學指南
- Oracle PL/SQL實例精解(原書第5版)
- 大數據架構商業之路:從業務需求到技術方案
- 大數據分析:數據倉庫項目實戰
- 數據挖掘競賽實戰:方法與案例
- Oracle 11g數據庫管理員指南
- Kubernetes快速進階與實戰
- 一本書讀懂大數據
- 基于數據發布的隱私保護模型研究
- 數據產品經理寶典:大數據時代如何創造卓越產品