Amazing Books
Temporary Blank

Wednesday, January 4, 2012

Cobol Programmers Swing With Java






E. REED DOKE
Southwest Missouri State University
BILL C. HARDGRAVE
University of Arkansas
RICHARD A. JOHNSON
Southwest Missouri State University

Contents
Preface xiii
Introduction 1
Chapter 1
Why You Should Learn Java 3
Objectives 3
History and Overview of Java 4
The Popularity of Java 6
What Makes Java Different? 8
Java Is Simple 8
Java Is Object-Oriented 9
Java Is Portable 10
Will Java Replace COBOL? 12
How to Use This Book 16
Summary of Key Points in Chapter 1 18
Bibliography 19
Chapter 2
An Introduction to Object-Oriented Programming 21
Objectives 21
The Community National Bank 22
History of OO 22
Objects 24
Classes 25
Diagramming Classes and Objects 26
Class Relationships 28
Inheritance 29
Aggregation 32
Association 34
Object Communication 35
Polymorphism 37
Dynamic Binding 38
Summary of Key Points in Chapter 2 39
Bibliography 40
Chapter 3
Java Structure 41
Objectives 41
A Class Program 42
Listing 3.1: Customer.java 44
Java Column Restrictions 47
Writing Comments in Java 47
Naming Rules and Conventions 49
Creating Objects 50
Listing 3.2: Customer.java 53
Invoking Methods 54
Listing 3.3: CustomerProcessor.java 56
Working with Subclasses 58
Listing 3.4: Account.java 58
Listing 3.5: CheckingAccount.java 60
Listing 3.6: AccountProcessor.java 62
Summary of Key Points in Chapter 3 64
Chapter 4
Defining Data 66
Objectives 66
COBOL Picture Clause 67
Defining Java Variables 68
Writing Java Literals 70
The Scope of Variables 71
Defining Java Constants 72
String Variables 72
Listing 4.1: StringDemo.java 74
Changing Variable Types 76
Listing 4.2: CastDemo.java 77
Variables for Community National Bank 79
Summary of Key Points in Chapter 4 80
Chapter 5
Computation 82
Objectives 82
Exceptions 83
Listing 5.1: try-catchStructure 85
Listing 5.2:
ArithmeticExceptionDemo.java 86
Custom Exception Classes 87
Listing 5.3: CheckingAccount.javawith
NSFException 89
Listing 5.4: AccountProcessor.javawith
try-catch 91
A Review of Primitive Data Types 92
Wrapper Classes 93
Listing 5.5: WrapperDemo.java 96
Arithmetic Operators 98
The MathClass 99
Listing 5.6: MathClassDemo.java 103
The NumberFormatClass 104
Listing 5.7: NumberFormatDemo.java 105
Summary of Key Points in Chapter 5 107
Chapter 6
Decision Making 108
Objectives 108
Service Charges at Community National Bank 109
The ifStatement 109
Using the elseClause 112
Nested ifStatements 114
Writing Compound Conditions 115
Java’s Conditional Operator 116
Condition Names 117
Computing the Service Charge with ifStatements 118
Listing 6.1: COBOL Service Charge Computation
Using IFStatements 119
Listing 6.2: ComputeServiceCharge method Using
ifStatements 120
Case Structure: COBOL EVALUATEand Java switch 121
Computing the Service Charge Using switch 123
Listing 6.3: COBOL Service Charge Computation
Using EVALUATE 123
Listing 6.4: Java Service Charge Computation
Using switch 125
Summary of Key Points in Chapter 6 126
Chapter 7
Loops 129
Objectives 129
Loop Structure 130
The COBOL PERFORMStatement 130
The Java whileStatement 132
Listing 7.1: WhileLoopDemo.java 135
The Java doStatement 137
Listing 7.2: DoLoopDemo.java 139
The Java forStatement 140
Listing 7.3: ForLoopDemo.java 142
Nested Loops 143
Java breakand continueStatements 145
Producing a Loan Amortization Schedule 146
Listing 7.4: Amortizer.java 147
Summary of Key Points in Chapter 7 149
Chapter 8
Arrays 151
Objectives 151
Declaring One-Dimensional Arrays 152
Populating One-Dimensional Arrays 155
Creating String Arrays 157
Listing 8.1: OneDimArrayDemo.java 158
Declaring Two-Dimensional Arrays 160
Populating Two-Dimensional Arrays 162
Listing 8.2: TwoDimArrayDemo.java 163
Passing Arrays as Arguments 166
Searching Arrays 167
Listing 8.3: FindZipCode.java 168
Listing 8.4: ZipCodeProcessor.java 169
Summary of Key Points in Chapter 8 171
Chapter 9
Data Access 173
Objectives 173
Java’s I-O Class Library (java.io) 174
Object Persistence 175
Sequential File I-O 175
Listing 9.1: SequentialFileDemo.java 179
Database Access 181
Listing 9.2: COBOL SQL Example 182
Listing 9.3: DatabaseDemo.java 188
Object Serialization 189
Listing 9.4:
ObjectSerializationDemo.java 193
Network Access 195
Summary of Key Points in Chapter 9 195
Chapter 10
Graphical User Interfaces 197
Objectives 197
Java’s Swing Components 198
Event-Driven Programming 199
JFrame: Displaying and Closing a Window 201
Listing 10.1—CustomerGUIOne.java 201
JLabel: Adding Labels to a Window 203
Listing 10.2: CustomerGUITwo.java 203
JTextField: Adding Text Fields to a Window 205
Listing 10.3—CustomerGUIThree.java 206
JButton: Adding Buttons to a Window 209
Listing 10.4—CustomerGUIFour.java 209
How Java Handles Events 213
Improving the Window Layout 214
Listing 10.5: CustomerGUIFive.java 215
Creating Drop-Down Menus 220
Listing 10.6—CustomerGUISix.java 220
Writing Applets 225
Summary of Key Points in Chapter 10 227
Chapter 11
Object-Oriented Development Issues 229
Objectives 229
Developing Object-Oriented Systems 230
OO Methodologies 231
OO Analysis 232
OO Design 233
Three-Tier Design 235
Architecture Issues 246
Performance Issues 247
Summary of Key Points in Chapter 11 248
Bibliography 249
Glossary 251
Index 260

Another Java Books
Download

No comments:

Post a Comment

Related Posts with Thumbnails
There was an error in this gadget

Put Your Ads Here!
There was an error in this gadget