Scanner
|
Outline |
Code Versions: |
There are two key concepts being presented in this example are:
The following table gives you some idea of the instance structure
of the classes in this example:
CA |
int id String n |
||
CB |
int id String n |
double da int za |
|
CC |
int id String n |
double da int za |
boolean bb int zb |
CD |
int id String n |
double da int za |
boolean bd double dd String sd int zd |
CE |
int id String n |
ArrayList <Double>
aLe |
|
CF |
int id String n |
ArrayList <Double> aLe | ArrayList <String>
aLf |
CG |
int id String n |
ArrayList <Double> aLe | int [] zg |
The sequence I used for developing this code.
This is the output of the writeStuff operation, the readStuff is
very similar.
Here we have the unsorted and the sorted versions of the stuff
ArrayList.
stuff:
g 717 15.38365 28.17976
2.80658 2.54967 18.31233 12.87867
: 66 222 31
37 137 240 179 397 117
97
e 809 13.28916 19.89148
14.07111 5.69699 28.54088 33.61740 :
g 503 29.15754 10.17436
2.62909 18.48133 26.48449 7.18132
: 193 167 228 83
141 61 122 3 252
285
b 961 746 2605.766
d 313 1577 4328.921 22
true 348.16708 Bjoiekhijn
g 701 14.39071 0.20667
29.97506 25.60834 0.54222 16.26749
: 31 334 263 396
378 25 37 55
84 332
e 297 25.73191 35.52947
11.73526 30.06353 1.73089 23.95225 :
a 535
c 556 1420 2461.106 27 false
b 474 1741 5535.299
d 468 751 2338.075 131
true 238.00327 Vthxwnanny
e 824 6.34942 29.10032
6.43827 5.24937 2.75068 27.92549 :
g 476 35.25088 25.37527
36.95420 27.90710 5.02629 1.32536
: 24 205 161
98 94 331 154 33
270 270
d 69 727 9138.710
13 true 238.10920 Ekfkhgnaot
c 288 572 5487.581 34
false
b 332 1886 4980.749
a 92
c 388 1279 8696.436 155 true
f 681 36.12881 33.97121
34.06929 11.29526 5.56375 6.27562
: Niq Qqp Zna Soy Uax Wxs *
a 564
---- SORTED stuff:
a 535
a 92
a 564
b 961 746 2605.766
b 474 1741 5535.299
b 332 1886 4980.749
c 556 1420 2461.106 27 false
c 288 572 5487.581 34
false
c 388 1279 8696.436 155 true
d 313 1577 4328.921 22
true 348.16708 Bjoiekhijn
d 468 751 2338.075 131
true 238.00327 Vthxwnanny
d 69 727 9138.710
13 true 238.10920 Ekfkhgnaot
e 809 13.28916 19.89148
14.07111 5.69699 28.54088 33.61740 :
e 297 25.73191 35.52947
11.73526 30.06353 1.73089 23.95225 :
e 824 6.34942 29.10032
6.43827 5.24937 2.75068 27.92549 :
f 681 36.12881 33.97121
34.06929 11.29526 5.56375 6.27562
: Niq Qqp Zna Soy Uax Wxs *
g 717 15.38365 28.17976
2.80658 2.54967 18.31233 12.87867
: 66 222 31
37 137 240 179 397 117
97
g 503 29.15754 10.17436
2.62909 18.48133 26.48449 7.18132
: 193 167 228 83
141 61 122 3 252
285
g 701 14.39071 0.20667
29.97506 25.60834 0.54222 16.26749
: 31 334 263 396
378 25 37 55
84 332
g 476 35.25088 25.37527
36.95420 27.90710 5.02629 1.32536
: 24 205 161
98 94 331 154 33
270 270
---- Bye ----