Page 172 - DCAP404 _Object Oriented Programming
P. 172

Unit 8: Type Conversion




             The selection structure allows for decisions to be made, explains Messinger. “It has only  Notes
             one entry point, as do all the other structures in computer programming; but after the
             decision, we can proceed in one of two independent directions.”
             Somebody who thinks logically is a nice contrast to the real world, is the ‘Law of Thumb’,
             as one learns in another chapter on ‘compound logic’.

             And yet another  chapter, which discusses loops,  begins with  George Eliot’s thought,
             “Iteration, like friction, is likely to generate heat instead of progress.”
             Hamlet’s words, “Yea, from the table of my memory I’ll wipe away all trivial fond records,”
             introduce readers to `tables’. Tables are contiguous memory locations in RAM that have a
             common name, explains the author. A simple example of a four-dimension table is book,
             he writes, referring to chapter, page, line and column. “A common application of multi-
             dimension tables is the market survey.”

             Procedural programming paradigm is not the only choice, and so the book explains two
             other popular ones, viz. visual  or graphical user interface  programming, and  object-
             oriented programming.
             Easy read, replete with exercises and ‘enrichments’.
             AIMED at ‘empowering productivity for the Java developer’, here is the third edition of
             Beginning J2ME: From Novice to Professional, by Sing Li and Jonathan Knudsen.
             The book is about programming “mobile phones, pagers, PDAs, and other small devices”,
             and MIDP (Mobile Information Device Profile), which is part of the Java 2 Platform.

             J2ME isn’t a specific piece of software or specification, explain the authors. “All it means is
             Java for small devices.”
             The market is expanding rapidly for two reasons: “First, developers can write code and
             have it run on dozens of small devices, without change. Second, Java has important safety
             features for downloadable code.”

             MIDP applications are called MIDlets, rhyming with applets and servlets. “Writing MIDlets
             is  relatively easy  for a  moderately experienced  Java programmer,”  is an enticingly
             reassuring line. Please note that “the  actual development  process, however,  is a  little
             more complicated for MIDlets than it is for J2SE applications,” because of `some additional
             tweaking and packaging’ required.
             To make MIDlets as compact as possible, ‘obfuscator’ is used. This is a tool, “originally
             designed  to foil attempts to reverse engineer  compiled bytecode”; it renames  classes,
             member variables, and methods to more compact name; removes unused classes and so
             on; and inserts illegal or questionable data to confuse decompilers.

             A killer application for the wireless is SMS, says the duo. “The ability to send short text
             messages (up to 160 characters in most cases) between cell-phone users inexpensively is
             compelling enough. The possibility to send messages directly between J2ME applications
             running on cellular phones is even more exciting,” opine the authors.
             A  chapter is  devoted to  ‘Bluetooth and  OBEX’. The  former  is  “a radio  connectivity
             technology designed for creating Personal Area Networks (PANs)” to help you connect
             things that are next to you; and the latter is short for Object Exchange, “a communication
             protocol that enables applications to talk to one another easily over infrared”.
             Bluetooth networks are formed ad hoc and dynamically when Bluetooth-enabled devices
             come into proximity of one another, as Li and Knudsen explain. “Technically, a Bluetooth
                                                                                 Contd...




                                           LOVELY PROFESSIONAL UNIVERSITY                                   165
   167   168   169   170   171   172   173   174   175   176   177