Learn to Program with Java
Whether you are brand new to programming in general or coming to Java from another language,John Smiley'sLearn to Program with Javaoffers a truly approachable tutorial designed with the beginner in mind. Covering Java syntax and essential programming concepts, this text can be used at home to simulate a semester's worth of Java study.Like Smiley's previous titles, the salient feature of this text is the author's scenario-based presentation style. Instead of addressing the reader directly, Smiley simulates the experience of about 18 first-semester programming students facing Java for the first time. As the students develop a grade calculation project in Java (and improve it with object-oriented features later on), basic questions are raised and answered with the reader "overhearing" the author's consistently clear and patient explanation of key programming concepts.While this approach is certainly not for those in a hurry, it can do the trick for the programming newbie. With an extensive Q&A; for each step, Smiley covers most every conceivable obstacle and confusion. (The questions presented here are drawn from his extensive real-world teaching experience.)After covering the basics of today's iterative software development cycle (a reminder to plan before you write any code), the book implements a grade-averaging program used for several departments at a hypothetical college. Smiley rehearses the discussions of the potential users of this application, as well as the students who then build it. The simple program is a good one as it allows the author to introduce basic Java syntax, as well as fundamental programming concepts (like variables and loops), without getting too bogged down in complexity.Once the basic program has been built, Smiley introduces using objects to solve the same problem. His guide to basic object-oriented design, as well as how to code basic objects in Java, is once again clear and sensible. If the "big picture" behind using objects has eluded you, the practical presentation offered here may well help things click. By the end of the book, the final version of the program gets enhanced with support for arrays, plus a basic graphical user interface built with simple Swing components.Most introductory programming texts try to cover everything at once, a temptation that's especially great with the rich (and complex) Java platform. The streamlined set of lessons here help make this title a good choice for Java newbies who want a patient and really approachable beginner's tutorial.--Richard DraganTopics covered:Introductory Java-based programming tutorial, the basics of the software design process, the System Development Life Cycle (SDLC): from analysis and design to development, implementation and maintenance; a first Java program, variables and constants, basic data types and operators, flow control and loops, custom methods, using objects (constructors, class variables and finalizers) access specifiers and instance variables, getters and setters, inheritance fundamentals, using arrays, error handling with exceptions, basic user interface design with Swing controls, event handling with listeners, adapters and events; and a case study for a grade-calculation program.