Abstract
This chapter starts learning Java with games. Some simple games deal with Strings only. We call them as games in-text. We selected one of such game as our starting point. The game is called GuessInt that is a two persons’ verbal guessing game. One person thinks of an integer between 1 and 100. The other person guesses what the integer would be. From the story of the game to a pseudo code and finally to an implementation, the entire process demonstrates the object-oriented programming principle, discusses several important Java control statements, and touches the try-catch block for exception handling.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer Nature Switzerland AG
About this chapter
Cite this chapter
Xu, Cw. (2018). OO Programming Principle: A Game In-Text GuessInt. In: Learning Java with Games. Springer, Cham. https://doi.org/10.1007/978-3-319-72886-5_3
Download citation
DOI: https://doi.org/10.1007/978-3-319-72886-5_3
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-72885-8
Online ISBN: 978-3-319-72886-5
eBook Packages: Computer ScienceComputer Science (R0)