- 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.
推薦閱讀
- MySQL數(shù)據(jù)庫進(jìn)階實(shí)戰(zhàn)
- SQL Server 2016 數(shù)據(jù)庫教程(第4版)
- SQL Server 2012數(shù)據(jù)庫技術(shù)與應(yīng)用(微課版)
- Visual Studio 2015 Cookbook(Second Edition)
- 深入淺出數(shù)字孿生
- 深度剖析Hadoop HDFS
- Python金融實(shí)戰(zhàn)
- 大數(shù)據(jù)治理與安全:從理論到開源實(shí)踐
- 達(dá)夢數(shù)據(jù)庫運(yùn)維實(shí)戰(zhàn)
- 編寫有效用例
- 數(shù)據(jù)庫技術(shù)及應(yīng)用
- Spring MVC Beginner’s Guide
- 數(shù)據(jù)庫應(yīng)用系統(tǒng)技術(shù)
- Deep Learning with R for Beginners
- Rust High Performance