Java Programming: From Problem Analysis to Program Design, Second Edition
, by Malik, D. S.Note: Supplemental materials are not guaranteed with Rental or Used book purchases.
- ISBN: 9780619216085 | 0619216085
- Cover: Paperback
- Copyright: 2/7/2005
This second edition of Java Programming: From Problem Analysis to Program Design continues to offer readers a truly student-focused approach to the introductory Java course. In addition to extensive examples and exercise sets, this text offers at least one complete Programming Example at the end of each chapter that contains the stages of Input, Output, Problem Analysis and Algorithm Design, and a Complete Program Listing. Utilizing extensive visual diagrams and accurate full-color code, Dr. Malik’s programming texts have proven highly successful for beginning programming students.
D.S. Malik is a Professor of Mathematics and Computer Science at Creighton University P.S. Nair is the Director of Computer Science at Creighton University
Preface | p. xxvii |
An Overview of Computers and Programming Languages | p. 1 |
Introduction | p. 2 |
An Overview of the History of Computers | p. 2 |
Elements of a Computer System | p. 3 |
The Language of a Computer | p. 6 |
The Evolution of Programming Languages | p. 7 |
Processing a Java Program | p. 8 |
Programming with the Problem Analysis-Coding-Execution Cycle | p. 11 |
Programming Methodologies | p. 15 |
Quick Review | p. 17 |
Exercises | p. 18 |
Basic Elements of Java | p. 21 |
The Basics of a Java Program | p. 22 |
Data Types | p. 25 |
Arithmetic Operators and Operator Precedence | p. 30 |
Expressions | p. 33 |
Type Conversion (Casting) | p. 36 |
The class String | p. 37 |
Input | p. 40 |
Increment and Decrement Operators | p. 54 |
Strings and the Operator + | p. 56 |
Output | p. 58 |
Packages, Classes, Methods, and the import Statement | p. 65 |
Creating a Java Application Program | p. 66 |
Programming Style and Form | p. 71 |
More on Assignment Statements | p. 75 |
Programming Example: Convert Length | p. 77 |
Programming Example: Make Change | p. 81 |
Quick Review | p. 85 |
Exercises | p. 88 |
Programming Exercises | p. 95 |
Introduction to Objects and Input/Output | p. 97 |
Objects and Reference Variables | p. 98 |
Using Predefined Classes and Methods in a Program | p. 102 |
The class String | p. 104 |
Input/Output | p. 113 |
File Input/Output | p. 126 |
Programming Example: Movie Ticket Sale and Donation to Charity | p. 130 |
Programming Example: Student Grade | p. 136 |
Quick Review | p. 139 |
Exercises | p. 140 |
Programming Exercises | p. 143 |
Control Structures I | p. 147 |
Control Structures | p. 148 |
Relational Operators | p. 149 |
Relational Operators and Primitive Data Types | p. 151 |
Comparing Strings | p. 152 |
Logical (Boolean) Operators and Logical Expressions | p. 156 |
Order of Precedence | p. 158 |
Selection: if and if...else | p. 164 |
switch Structures | p. 177 |
Programming Example: Cable Company Billing | p. 183 |
Quick Review | p. 189 |
Exercises | p. 190 |
Programming Exercises | p. 196 |
Control Structures II | p. 199 |
Why Is Repetition Needed? | p. 200 |
The while Looping (Repetition) Structure | p. 201 |
Programming Example: Checking Account Balance | p. 215 |
Programming Example: Fibonacci Number | p. 224 |
The for Looping (Repetition) Structure | p. 229 |
Programming Example: Classify Numbers | p. 235 |
The do...while Looping (Repetition) Structure | p. 239 |
break and continue Statements | p. 243 |
Nested Control Structures | p. 245 |
Quick Review | p. 247 |
Exercises | p. 249 |
Programming Exercises | p. 260 |
Graphical User Interface (GUI) and Object-Oriented Design (OOD) | p. 263 |
Graphical User Interface (GUI) Components | p. 264 |
Programming Example: Temperature Conversion | p. 290 |
Object-Oriented Design | p. 298 |
Implementing Classes and Operations | p. 305 |
Quick Review | p. 307 |
Exercises | p. 308 |
Programming Exercises | p. 311 |
User-Defined Methods | p. 313 |
Predefined Methods | p. 314 |
User-Defined Methods | p. 319 |
Programming Example: Palindrome Number | p. 328 |
Flow of Execution | p. 332 |
Programming Example: Largest Number | p. 332 |
Void Methods | p. 334 |
Primitive Data Type Variables as Parameters | p. 341 |
Reference Variables as Parameters | p. 343 |
Scope of an Identifier within a Class | p. 359 |
Method Overloading: An Introduction | p. 361 |
Programming Example: Data Comparison | p. 362 |
Quick Review | p. 374 |
Exercises | p. 376 |
Programming Exercises | p. 385 |
User-Defined Classes and ADTs | p. 393 |
Classes | p. 394 |
The Copy Constructor | p. 418 |
Classes and the Method toString | p. 419 |
Static Members of a Class | p. 421 |
Finalizers | p. 423 |
Creating Your Own Packages | p. 423 |
The Reference this | p. 428 |
Inner Classes | p. 433 |
Abstract Data Types | p. 433 |
Programming Example: Candy Machine | p. 434 |
Quick Review | p. 457 |
Exercises | p. 459 |
Programming Exercises | p. 464 |
Arrays | p. 467 |
Why Do We Need Arrays? | p. 468 |
Arrays | p. 469 |
Parallel Arrays | p. 488 |
Arrays of Objects | p. 489 |
Two-Dimensional Arrays | p. 491 |
Multidimensional Arrays | p. 506 |
Programming Example: Text Processing | p. 508 |
Quick Review | p. 512 |
Exercises | p. 513 |
Programming Exercises | p. 517 |
Applications of Arrays and Strings | p. 523 |
List Processing | p. 524 |
The class Vector | p. 542 |
Programming Example: Election Results | p. 549 |
The class String (Revisited) | p. 565 |
Programming Example: Pig Latin Strings | p. 570 |
Quick Review | p. 576 |
Exercises | p. 576 |
Programming Exercises | p. 579 |
Inheritance and Composition | p. 581 |
Inheritance | p. 582 |
The class Object | p. 602 |
Java Stream Classes | p. 604 |
Objects of Superclasses and Subclasses | p. 605 |
Abstract Methods and Classes | p. 611 |
Interfaces | p. 614 |
Composition | p. 616 |
Programming Example: Grade Report | p. 621 |
Quick Review | p. 657 |
Exercises | p. 658 |
Programming Exercises | p. 664 |
Handling Exceptions and Events | p. 669 |
The Java Exception Hierarchy | p. 670 |
Java's Exception Classes | p. 674 |
Checked and Unchecked Exceptions | p. 677 |
Handling Exceptions within a Program | p. 678 |
The Method printStackTrace | p. 692 |
Exception-Handling Techniques | p. 695 |
Creating Your Own Exception Classes | p. 696 |
Event Handling | p. 698 |
Programming Example: Calculator | p. 704 |
Quick Review | p. 713 |
Exercises | p. 715 |
Programming Exercises | p. 719 |
Advanced GUIs and Graphics | p. 721 |
Applets | p. 725 |
class Font | p. 729 |
class Color | p. 732 |
class Graphics | p. 738 |
Additional GUI Components | p. 748 |
Layout Managers | p. 778 |
Menus | p. 784 |
Key and Mouse Events | p. 786 |
Programming Example: Java Kiosk | p. 797 |
Quick Review | p. 805 |
Exercises | p. 806 |
Programming Exercises | p. 808 |
Recursion | p. 813 |
Recursive Definitions | p. 814 |
Problem Solving Using Recursion | p. 817 |
Recursion or Iteration? | p. 829 |
Programming Example: Converting a Number from Decimal to Binary | p. 830 |
Programming Example: Sierpinski Gasket | p. 834 |
Quick Review | p. 841 |
Exercises | p. 842 |
Programming Exercises | p. 844 |
Java Reserved Words | p. 851 |
Operator Precedence | p. 853 |
Character Sets | p. 855 |
Packages and User-Defined Classes | p. 859 |
Primitive Type Classes | p. 859 |
Java Classes | p. 871 |
Class: Boolean (Package java.lang) | p. 871 |
Class: BorderLayout (Package java.awt) | p. 871 |
Class: BufferedReader (Package java.io) | p. 872 |
Class: Character (Package java.lang) | p. 873 |
Class: Color (Package java.awt) | p. 874 |
Class: Component (Package java.awt) | p. 875 |
Class: Container (Package java.awt) | p. 877 |
Class: DecimalFormat (Package java.text) | p. 878 |
Class: Double (Package java.lang) | p. 879 |
Class: Exception (Package java.lang) | p. 880 |
Class: FileReader (Package java.io) | p. 880 |
Class: FileWriter (Package java.io) | p. 881 |
Class: Float (Package java.lang) | p. 881 |
Class: FlowLayout (Package java.awt) | p. 883 |
Class: Font (Package java.awt) | p. 883 |
Class: Graphics (Package java.awt) | p. 884 |
Class: GridLayout (Package java.awt) | p. 888 |
Class: InputStreamReader (Package java.io) | p. 888 |
Class: Integer (Package java.lang) | p. 889 |
Class: JApplet (Package javax.swing) | p. 890 |
Class: JButton (Package javax.swing) | p. 891 |
Class: JCheckBox (Package javax.swing) | p. 893 |
Class: JComboBox (Package javax.swing) | p. 895 |
Class: JFrame (Package javax.swing) | p. 897 |
Class: JLabel (Package javax.swing) | p. 898 |
Class: JList (Package javax.swing) | p. 900 |
Class: JMenu (Package javax.swing) | p. 901 |
Class: JMenuBar (Package javax.swing) | p. 903 |
Class: JMenuItem (Package javax.swing) | p. 904 |
Class: JRadioButton (Package javax.swing) | p. 904 |
Class: JTextArea (Package javax.swing) | p. 906 |
Class: JTextField (Package javax.swing) | p. 907 |
Class: Long (Package java.lang) | p. 909 |
Class: Math (Package java.lang) | p. 910 |
Class: Point (Package java.awt) | p. 911 |
Class: PrintWriter (Package java.io) | p. 912 |
Class: String (Package java.lang) | p. 914 |
Class: StringBuffer (Package java.lang) | p. 916 |
Class: StringTokenizer (Package java.util) | p. 919 |
Class: Throwable (Package java.lang) | p. 919 |
Class: Vector (Package java.util) | p. 920 |
Answers to Selected Exercises | p. 923 |
Chapter 1 | p. 923 |
Chapter 2 | p. 923 |
Chapter 3 | p. 924 |
Chapter 4 | p. 925 |
Chapter 5 | p. 926 |
Chapter 6 | p. 927 |
Chapter 7 | p. 928 |
Chapter 8 | p. 928 |
Chapter 9 | p. 929 |
Chapter 10 | p. 930 |
Chapter 11 | p. 931 |
Chapter 12 | p. 932 |
Chapter 13 | p. 932 |
Chapter 14 | p. 933 |
Index | p. 935 |
Table of Contents provided by Ingram. All Rights Reserved. |
What is included with this book?
The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.
The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.