O'Reilly logo

Java Gently, Third Edition by Judith Bishop

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Controlling the flow

Controlling the flow

5.1 Properties of a good program

5.2 Conditional loops with while- and do-statements

5.3 User-defined exceptions

5.4 The type char

5.5 The switch-statement

5.6 Case Study 2: Rock–scissors–paper game

Properties of a good program

The structure of a program indicates how its parts are connected together, and how sound those connections are. One can think of the structure of a bridge: each strut and rivet plays its role, and the whole performs a defined function efficiently. Bridges can even look pleasing. So it is with programs. When we create them we aim to achieve a structure that in the first instance achieves the required ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required