From COBOL to OOP

All solutions are on the book CD
This appendix contains sample solutions for the tasks from the tutorial sections. To stay within the limits of this book, this chapter contains only selected solutions, mostly in one programming language. The CD to this book includes all solutions, both in Delphi and Java code.
All sample solutions in this chapter are intended to serve as examples, showing how a problem could be solved. There may be other more efficient solutions. The following sample solutions are intended to provide basic concepts, to serve as a reference, and to encourage you to work out different solutions to similar problems.
Delphi
accountNumber: Integer;
accountBalance: Real;
ch: Char;
short: Shortint;
exactValue: Double;
Java
int accountNumber;
float accountBalance;
char ch;
byte short;
double exactValue;
(x < z) and (y < z) and (x < y) or (x >= z) and (x < y) <span class="inlinemediaobject"><img alt="Image from book"> border="0"> height="10"> id="IMG_72"> src="https://images.books24x7.com/bookimages/id_7056/figu300_1.jpg"> title=""> width="20"></span> ((x < z) and (y < z) and (x < y)) or ((x >= z) and (x < y)) <span class="inlinemediaobject"><img alt="Image from book"> border="0"> height="10"> id="IMG_73"> src="https://images.books24x7.com/bookimages/id_7056/figu300_2.jpg"> title=""> width="20"></span> ((y < z) and (x < y)) or ((x >= z) and (x < y)) <span class="inlinemediaobject"><img alt="Image from book"> border="0"> height="10"> id="IMG_74"> src="https://images.books24x7.com/bookimages/id_7056/figu300_3.jpg"> title=""> width="20"></span> (x < y) and ((y < z) or...