1 Introduction to Java in the Context of Software Engineering 1
1.1 Getting Acquainted 1
1.2 What Is Java Programming? 1
1.2.1 What is Software Engineering? 2
1.3 Learning Objectives 6
1.3.1 Learning Layout 7
1.3.2 Learning Connections 8
1.4 Executive Summary 9
1.5 Learning Modules 10
1.5.1 Concepts 10
1.5.2 Unified Process-Based Methodology Overview 12
1.5.3 Position in Process 14
1.5.4 Domain Model 17
1.5.5 Scenarios 17
1.5.6 The Unified Modeling Language 21
1.6 The Java Programming Language 21
1.6.1 Historical Perspective on Java 21
1.6.2 Java Basics 23
1.7 Relationships 28
1.7.1 Caveats and Complexities 30
1.8 Example:The Voting Program 30
1.8.1 Project(System)Vision 31
1.8.2 Project Description 31
1.8.3 Stakeholder Analysis 32
1.8.4 Customer Profile 32
1.8.5 Market Analysis 32
1.8.6 Risk Analysis 33
1.8.7 Business Use Case Model and Use Cases 33
1.8.8 Competitive Analysis 36
1.8.9 Distribution Plan 41
1.8.10 Financial Plan 42
1.8.11 High-Level Project Plan 43
1.8.12 Recommendations 43
1.9 Ongoing Case Study 43
1.9.1 Introduction 43
1.9.2 Initial Concept 44
1.9.3 Business Justification 45
1.9.4 Stakeholder Analysis 46
1.9.5 Case Assignments 46
1.10 Resources:Connections·People·Companies 46
1.11 Summary and Recommendations 47
1.12 Review Questions 47
1.13 Glossary-Terminology-Concepts 48
1.14 Exercises 50
1.15 Setting up a Java Development Environment 50
1.15.1 Versions of Java 51
1.15.2 Class and Classpath Setup 51
1.16 Java Programming Exercises 51
2 Experimenting with Classes and Objects 52
2.1 Learning Objectives 54
2.1.1 Learning Layout 55
2.1.2 Learning Connections 56
2.2 Executive Summary 57
2.3 Learning Modules 58
2.3.1 Concepts 58
2.3.2 Position in Process 73
2.4 The Purpose of Object Orientation in Software Engineering 74
2.5 Problems with Procedural Programming 75
2.6 How O-O Solves Software Development Problems 76
2.7 Understanding Object Orientation 77
2.8 Object-Orientation in Java 79
2.8.1 Java Classes and Objects 79
2.9 Architecture and Class Hierarchy 82
2.10 Economies of Reuse 82
2.10.1 Quality 83
2.10.2 Consistency 83
2.10.3 Implement Once 83
2.10.4 Flexibility 83
2.11 Use Case Models and Classes 84
2.12 "Real-Life"Variations 85
2.13 Translating Generic Class Descriptions into Java Classes 85
2.14 Unified Modeling Language Perspective 86
2.15 A Simple Java Program:The Voting Program Prototype 86
2.16 Relationships 87
2.16.1 Caveats and Complexities 87
2.17 Example:The Voting Program 88
2.17.1 The Domain Model 88
2.17.2 Requirements Specification Outline 89
2.17.3 Deliverables 103
2.17.4 Other Requirements 103
2.18 Ongoing Case Study 104
2.18.1 Market Analysis 104
2.18.2 Risk Management 104
2.18.3 Business Use Case Model and Business Use Cases 105
2.18.4 Competitive Analysis 105
2.18.5 Distribution Plan(Pricing,Packaging,Promotion,Positioning) 105
2.18.6 Financial Plan(Revenue Plan,Budget,Cash Flow Analysis,ROI Analysis) 106
2.18.7 High-Level Project Plan 106
2.18.8 Recommendations 106
2.18.9 Case Assignments 106
2.19 Resources:Connections·People·Companies 107
2.20 Summary and Recommendations 107
2.21 Review Questions 107
2.22 Glossary-Terminology-Concepts 108
2.23 Exercises 108
3 The Structure and Syntax of Java 109
3.1 Learning Objectives 111
3.1.1 Learning Layout 111
3.1.2 Learning Connections 111
3.2 Executive Summary 112
3.3 Learning a Programming Language 114
3.3.1 For the Novice 114
3.3.2 For the Experienced Software Engineer 119
3.3.3 Similarities to Other O-O Programming Languages 120
3.4 Learning Modules 122
3.4.1 Concepts 122
3.5 The Java Family of Classes and Packages 143
3.6 Third-Party Components 144
3.7 Software Quality Assurance 144
3.8 Position in Process 146
3.8.1 Design Model 147
3.8.2 Component Design 147
3.8.3 Class Hierarchy 147
3.8.4 System Architecture 148
3.8.5 Prototyping 150
3.9 Relationships 150
3.9.1 Caveats and Complexities 152
3.10 Example:The Voting Program 152
3.10.1 Component Design 152
3.10.2 Class Hierarchy 153
3.10.3 System Architecture 153
3.10.4 Prototype 153
3.10.5 Design Specification,Quality Assurance Specification,and Configuration Management Plan 153
3.11 Ongoing Case Study 155
3.12 Resources:Connections·People·Companies 158
3.13 Summary and Recommendations 158
3.14 Review Questions 159
3.15 Glossary-Terminology-Concepts 159
3.16 Exercises 159
3.17 Optional Chapter Addendum:LibraryManager,an Application Example 160
3.17.1 Program Code 161
3.17.2 Analysis 179
4 Design and Development of Java Applications 183
4.1 Learning Objectives 185
4.1.1 Software Engineering Methodology 186
4.1.2 Java Syntax and Structure 187
4.1.3 Object Orientation 190
4.1.4 Software Quality Assurance 191
4.1.5 Attitude and Motivation 192
4.1.6 Learning Layout 193
4.1.7 Learning Connections 193
4.2 Executive Summary 193
4.3 Learning Modules 196
4.3.1 Software Engineering History 196
4.3.2 Process Models 205
4.3.3 "Object Thinking" 209
4.3.4 Object Orientation 210
4.3.5 Java Control Structures 214
4.4 Position in Process 227
4.4.1 Design Specification 227
4.4.2 Unit Test Specification 229
4.4.3 Quality Assurance Plan 229
4.4.4 Configuration Management Plan 230
4.4.5 Documentation Plan 230
4.5 Example:The Voting Program 231
4.5.1 Introduction 231
4.5.2 Functional Overview 234
4.5.3 System Architecture 235
4.5.4 Class Hierarchy 236
4.5.5 Component Definition and Design 238
4.5.6 Prototype Description and Evaluation 238
4.5.7 Environment 239
4.5.8 Supporting Disciplines 240
4.6 Ongoing Case Study 245
4.7 Resources:Connections·People·Companies 246
4.8 Summary and Recommendations 247
4.9 Review Questions 247
4.10 Glossary-Terminology-Concepts 247
4.11 Exercises 248
4.12 Optional Chapter Addendum:Pattern-Driven Design 248
4.12.1 Pattern Principle 1:High Cohesion 248
4.12.2 Pattern Principle 2:Low Coupling 249
4.12.3 Most Popular Patterns 249
5 Architecture-Driven Component Development 251
5.1 Learning Objectives 251
5.1.1 Revisiting System and Software Architecture 252
5.1.2 Java Component Interaction and Integration 255
5.1.3 Learning Layout 260
5.1.4 Learning Connections 260
5.2 Executive Summary 260
5.3 Learning Modules 262
5.3.1 Concepts 263
5.3.2 Architectural Perspectives 264
5.3.3 Developing Java Components 269
5.3.4 Java Class Interaction 276
5.3.5 Java Objects 278
5.3.6 Methods and Constructors 278
5.3.7 Polymorphism:Method Overloading 279
5.3.8 Polymorphism:Method Overriding 280
5.3.9 Inheritance:Extending Classes 280
5.3.10 Inheritance:Implementing Interfaces 280
5.3.11 User Interface:An Introduction 281
5.3.12 User Input and User Input Validation 282
5.4 Position in Process 283
5.4.1 Component Implementation 284
5.4.2 Unit Testing 284
5.4.3 Build Management 285
5.5 Example:The Voting Program 287
5.5.1 Components 288
5.6 Ongoing Case Study 310
5.6.1 Some Notes on the Model Home Interior Design Business 311
5.7 Resources:Connections·People·Companies 312
5.8 Summary and Recommendations 312
5.9 Review Questions 312
5.10 Glossary-Terminology-Concepts 313
5.11 Exercises 313
6 Introduction to Distributed Computing Concepts 314
6.1 Learning Objectives 315
6.1.1 Creating Value 315
6.1.2 Agile Techniques 318
6.1.3 Learning Layout 319
6.1.4 Learning Connections 319
6.2 Executive Summary 320
6.3 Learning Modules 322
6.3.1 Concepts 322
6.3.2 Agile Methods and Rapid Application Development 324
6.3.3 Distributed Java Applications 325
6.3.4 Methodology,Tools,and Distributed Solutions 327
6.3.5 Information Persistence 331
6.4 Position in Process 333
6.4.1 Class and Object Integration 333
6.4.2 Package Integration 334
6.4.3 Subsystem Integration 335
6.4.4 System Integration 335
6.4.5 Integration Testing 335
6.5 Iterative Improvements 337
6.6 Example:The Voting Program 337
6.6.1 The Voting Program—Updated UserInterfacePresentation Class 338
6.7 On-going Case Study 352
6.8 Resources:Connections·People·Companies 353
6.9 Summary and Recommendations 353
6.10 Review Questions 354
6.11 Glossary-Terminology-Concepts 354
6.12 Exercises 355
7 Interfacing with Users 356
7.1 Learning Objectives 356
7.1.1 User Interface Requirements 357
7.1.2 User Interface Design Best Practices 358
7.1.3 Java Graphical User Interface Programming 359
7.1.4 Learning Layout 359
7.1.5 Learning Connections 359
7.2 Executive Summary 361
7.3 Learning Modules 362
7.3.1 Model-View Controller Design Pattern 362
7.3.2 User Interface Design Principles 362
7.3.3 Java User Interface Components 365
7.3.4 Containers 370
7.3.5 Layout Managers 371
7.3.6 Display Elements 377
7.3.7 Interactive Elements 377
7.3.8 Event Handling 378
7.3.9 Types of Applications 381
7.4 Position in Process 382
7.4.1 Alpha Testing 383
7.4.2 Beta Testing 383
7.4.3 Early Access Testing 383
7.5 Example 384
7.5.1 Example Explanation 384
7.6 Case Study 385
7.7 Resources 386
7.8 Summary and Recommendations 386
7.9 Review Questions 386
7.10 Glossary-Terminology-Concepts 387
7.11 Exercises 388
8 Implementing Java Programs 389
8.1 Learning Objectives 390
8.1.1 Learning Layout 390
8.1.2 Program Structure 392
8.1.3 Multiple Concurrent Tasks 393
8.1.4 Multimedia 393
8.1.5 Learning Connections 394
8.2 Executive Summary 394
8.3 Learning Modules 395
8.3.1 End User Perspective 396
8.3.2 Administrator Perspective 396
8.3.3 Process Perspective 397
8.3.4 Software Engineering Perspective 398
8.3.5 Data Perspective 398
8.3.6 Logic Perspective 399
8.3.7 System Perspective 399
8.3.8 Multitasking—Multiple Threads 400
8.3.9 Animation Using Multithreading 401
8.3.10 Handling Sound 411
8.3.11 Handling Exceptions 414
8.4 Position in Process 416
8.5 Example and Explanation 417
8.6 Case Study 418
8.7 Resources 418
8.7.1 Connections 418
8.7.2 People 418
8.7.3 Companies 419
8.8 Summary and Recommendations 419
8.9 Review Questions 419
8.10 Glossary-Terminology-Concepts 419
8.11 Exercises 421
9 Software Quality Assurance 422
9.1 Learning Objectives 424
9.1.1 Learning Layout 425
9.1.2 Learning Connections 425
9.2 Executive Summary 425
9.3 Learning Modules 429
9.3.1 Software Quality Assurance 430
9.3.2 Java Application Structure 438
9.4 Position in Process 442
9.5 Example 442
9.5.1 Example Explanation 443
9.5.2 Practical Application 444
9.6 Resources 445
9.6.1 Connections 445
9.6.2 Companies 445
9.7 Summary and Recommendations 445
9.8 Review Questions 446
9.9 Glossary-Terminology-Concepts 446
9.10 Exercises 446
10 Information Management in Java 447
10.1 Learning Objectives 448
10.1.1 Learning Layout 449
10.1.2 Learning Connections 449
10.2 Executive Summary 449
10.3 Learning Modules 454
10.3.1 Information Life-cycle 454
10.3.2 Data and File Structures 454
10.3.3 16-Bit Character I/O 456
10.3.4 Persistence and Serialization 461
10.3.5 Example File I/O Programs 462
10.3.6 Database Access 472
10.4 Position in the Process 477
10.5 Example 478
10.5.1 Example Explanation 479
10.5.2 Practical Application 479
10.6 Resources 480
10.6.1 Connections 480
10.6.2 Companies 480
10.7 Summary and Recommendations 480
10.8 Review Questions 480
10.9 Glossary-Terminology-Concepts 481
10.10 Exercises 481
11 Reality Check:Java Programs in the Real World 486
11.1 Learning Objectives 487
11.1.1 Learning Layout 487
11.1.2 Learning Connections 488
11.2 Executive Summary 488
11.3 Learning Modules 490
11.3.1 Standalone Applications 490
11.3.2 Client-Server Applications 499
11.3.3 Web-Centric Distributed Applications 503
11.3.4 Patterns 506
11.4 Position in Process 514
11.5 Example 514
11.5.1 Example Explanation 514
11.5.2 Practical Application 517
11.5.3 Time Boxing 517
11.6 Resources 517
11.7 Summary 517
11.8 Review Questions 517
11.9 Glossary-Terminology-Concepts 518
11.10 Exercises 518
12 Software Integration and Deployment 519
12.1 Learning Objectives 520
12.1.1 Learning Layout 521
12.1.2 Learning Connections 522
12.2 Executive Summary 523
12.3 Learning Modules 524
12.3.1 System Integration 524
12.3.2 Solution Deployment 527
12.3.3 Abstract Data Structures 529
12.4 Position in Process 540
12.5 Data Structure Example Application:Linked List 542
12.6 Resources 545
12.6.1 Connections 545
12.6.2 People 545
12.6.3 Companies 546
12.7 Summary and Recommendations 546
12.8 Review Questions 546
12.9 Glossary-Terminology-Concepts 547
12.10 Exercises 547
13 Java on Various Computer Platforms 548
13.1 Learning Objectives 548
13.1.1 Learning Layout 549
13.1.2 Learning Connections 549
13.2 Executive Summary 549
13.3 Learning Modules 552
13.3.1 Java HotSpotTM Virtual Machines 553
13.3.2 Java on Sun Microsystems Computers 553
13.3.3 Java on IBM Computers 553
13.3.4 Java on Hewlett-Packard Computers 553
13.3.5 Java on Other Platforms 555
13.3.6 Java on Special Devices 555
13.3.7 Java and Microsoft? 556
13.3.8 Java Development Tools 556
13.3.9 UML Development Tools 558
13.3.10 Networking with Java 558
13.4 Example 562
13.4.1 Example Explanation 563
13.4.2 Practical Application 564
13.4.3 Source Code Control,a Subset of Configuration Management 564
13.5 Position in Process 564
13.6 Resources 565
13.6.1 Connections 565
13.6.2 Companies 565
13.7 Summary and Recommendations 565
13.8 Review Questions 566
13.9 Glossary-Terminology-Concepts 566
13.10 Exercises 566
14 Advanced Topics in Java Software Engineering 567
14.1 Learning Objectives 568
14.1.1 Learning Layout 568
14.1.2 Learning Connections 569
14.2 Executive Summary 569
14.3 Learning Modules 570
14.3.1 Mobile Applications 571
14.3.2 Web and Application Services 572
14.4 Summary Comments 574
14.5 Position in Process 575
14.5.1 Documentation 575
14.5.2 Technical Marketing 578
14.6 Example 579
14.6.1 Example Explanation 579
14.6.2 Practical Application 580
14.7 Resources 580
14.7.1 Connections 580
14.7.2 People 580
14.8 Summary 581
14.9 Review Questions 581
14.10 Glossary-Terminology-Concepts 581
14.11 Exercises 581
15 The Unified Modeling Language:A Primer 582
15.1 Learning Objectives 582
15.1.1 Learning Layout 582
15.1.2 Learning Connections 584
15.2 Executive Summary 585
15.3 Learning Modules 587
15.3.1 Class and Object Diagrams 588
15.3.2 Use Case Diagram 592
15.3.3 Activity Diagram 593
15.3.4 Sequence Diagram 595
15.3.5 Communication Diagram 596
15.3.6 State Machine Diagram 599
15.3.7 Deployment Diagram 600
15.4 Resources:Connections·People·Companies 601
15.5 Summary and Recommendations 602
15.6 Review Questions 603
15.7 Glossary-Terminology-Concepts 603
15.8 Exercises 604
Index 606