Holt Software Books [Graphical Version] | [Printer Friendly Version]
![[Cover of Book]](img/dont_panic_java.gif) |
Don't Panic Guide to Programming in Java
|
| Title: |
Don't Panic Guide to Programming in Java |
| Authors: |
Graham Smyth and Chris Stephenson |
| ISBN: |
0-921598-41-6 |
| Publisher: |
Holt Software Associates Inc. |
| Binding: |
Softcover |
| Pages: |
110 pgs |
| Price: |
Bookstores & Schools: $17.50 Retail: $21.90 |
| Ordering Information: |
For bookstores and schools, click here for
ordering information. For individuals click
here for ordering information. |
| Program Examples: |
Available [Click here for
information on obtaining program examples found in Holt Software
publications.] |
| Solutions Manual: |
Not Available |
Created as a workbook-like resource for introducing programming to
students using the Java language, the "Don't Panic" Guide to Programming
in Java is an accessible learning tool which introduces students to problem
solving and computer programming. By reading the text and completing the
exercises, students learn the various parts that make up a computer system,
how computers are used to solve problems, what a problem solving model is,
and how to input instructions into the computer to create real programs
of their own.
The "Don't Panic" Guide to Programming in Java makes use of
Ready to Program, an easy-to-use Java development environment that allows
students to start writing Java programs quickly without wasting time learning
the intricacies of a professional development environment. It uses a helper
Console class to get students writing programs quickly.
We believe that this workbook-based resource provides a unique solution
for all teachers who need to address the new core computer outcomes.
Introduction to The Don't Panic Guide to Programming
This document is an introduction to problem solving and computer programming
in Java. It is intended to help you learn the basics.
By reading the text and completing the exercises, you will learn the various
parts that make up a computer system, how computers are used to solve
problems, what a problem solving model is, and how to input instructions
into the computer to create real programs of your own.
In order to communicate with a computer, you need to use a programming
language. This Don't Panic Guide to Programming in Java uses a complete
and easy to use integrated development environment for Java called Ready
to Program with JavaTM Technology. Unlike many Java environments,
Ready is both powerful and easy to learn. It also contains
many features for creating Java applets which can run over the
Internet. This guide will help you learn to use the Ready environment
to enter and run your programs.
Have fun!
Symbols in this Document
Here are a few symbols that will help you understand how this document is
organized and how you can find particular kinds of information.
![[information symbol]](img/info_icon.gif) |
This symbol means that the box to the right of it contains definitions,
explanations for important technical terms or helpful hints. |
![[Panic Symbol]](img/panic_icon.gif) |
This icon indicates a possible error that you might make and
describes how to get back on track. |
Table of Contents of The Don't Panic Guide to Programming
Introduction to this Document 1
Symbols in this Document 1
Section 1 - What is a Computer 3
Hardware 3
Operating Systems 5
Software 5
Programming Environments 5
Assignment 1 6
Section 2 - Using Computers to Solve Problems 7
What Do We Mean by Problem Solving 7
Writing Computer Programs to Solve Problems 8
Assignment 1 10
Programming Paradigms 10
Procedure-Oriented Programming 10
Object-Oriented Programming 11
Java Applets and Applications 13
Assignment 2 14
Section 3 - Getting Started 15
Good Programming Style 15
Documenting 16
The Ready Java Environment 16
Starting the Ready Environment 17
Exiting the Ready Environment 18
Creating a New File (Class) 18
Opening an Existing File 20
Saving a File 21
Saving a File with a New Name 21
Saving Part of a File 22
Printing a File 22
Printing the Program Output 24
Throwing Changes Away 24
Running a Program 24
Navigating Text in the Ready Window 25
The Caret 25
Entering Text from the Keyboard 26
Selecting Text 26
Searching for Text in a File 27
Jumping to a Line in a File 28
Finding a Matching Brace in a File 28
Cutting, Copying and Pasting 28
Undoing a Change 29
Replacing Text in a File 29
Indenting a File 29
Ready Boilerplate 30
HSA Console Application Boilerplate 31
Syntax Colouring 34
Assignment 3 35
Section 4 - Output Using the IPO Model 37
c.print () and c.println (); 37
Simple Output 38
Specifying a Field Width 40
Specifying Number of Decimal Places 43
Arithmetic 46
Variables 48
Graphics 51
Drawing Methods 51
drawLine 52
drawRect 54
drawOval 55
drawString 56
drawMapleLeaf 57
More Graphics Methods in the Console Class 58
Assignment 4 60
Section 5 - Input Using the IPO Model 61
c.readInt (), c.readDouble, and c.readLine () 61
c.readInt () 61
c.readDouble() 63
c.readLine() 65
Assignment 5 69
Section 6 - Repetition Using the IPO Model 71
Looping 71
Counted Loops (for) 71
Conditional Loops (while and do) 78
Endless Loops (for) 85
Assignment 6 86
Section 7 - Decisions Using the IPO Model 87
Decision Structure 87
Decisions Involving User Input 87
Decisions that Compare Strings 90
Boolean Decisions 93
Three-way Selection 96
Decisions Using Break Statements 98
Assignment 7 101
Section 8 - Putting It All Together 103
Output Using c.print () and c.println () 103
c.print () 103
c.println () 103
Input Using c.readInt (), c.readDouble, and c.readLine () 104
c.readInt (); 104
c.readDouble (); 104
c.readLine (); 104
Processing 105
Calculations 105
Counted Loops 106
Conditional Loops Using While 106
Conditional Loops Using Do 107
Decisions Using If 107
Common Programming Errors 109
Suggested Final Projects 110
[ Holt Software Home ] *
[ Books (Graphical) ] *
[ Books (Text) ] *
[ Top of Page ] *
[ Feedback ]