Prev | Current Page 201 | Next

Carl Reynolds and Paul Tymann

"Schaum's Outline of Principles of Computer Science"

out.println( "Twelve drummers drumming" );
case 11: System.out.println( "Eleven pipers piping" );
case 10: System.out.println( "Ten lords a-leaping" );
case 9: System.out.println( "Nine ladies dancing" );
case 8: System.out.println( "Eight maids a-milking" );
case 7: System.out.println( "Seven swans a-swimming" );
case 6: System.out.println( "Six geese a-laying" );
case 5: System.out.println( "Five golden rings" );
case 4: System.out.println( "Four calling birds" );
case 3: System.out.println( "Three French hens" );
case 2: System.out.println( "Two turtle doves" );
System.out.println(
"And a partridge in a pear tree \n" );
break;
default: System.out.println( "?Day = " + dayOfChristmas );
}//switch
}//else
dayOfChristmas++;
}//while
System.out.println("The End" );
}//main
}//class
OBJECT-ORIENTED PROGRAMMING
Java is an object-oriented language, which means that Java facilitates the writing of object-oriented
programs. Object orientation is more a matter of how one thinks about programming than it is a particular
programming technique. When one writes object-oriented code, one thinks of software ???things??? that are analogous
to things in the outside world.
For instance, if our job is to write software for the State Thruway Authority for automated toll collection,
we would think about the job differently depending upon whether we take the older ???procedural??? approach or
the newer object-oriented (OO) approach.


Pages:
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213
sufit podwieszany praca w holandii Okulary mieszkania dieta light