当前位置:首页 > 工业技术
Java面向对象程序设计  第2版  英文
Java面向对象程序设计  第2版  英文

Java面向对象程序设计 第2版 英文PDF电子书下载

工业技术

  • 电子书积分:23 积分如何计算积分?
  • 作 者:C. Thomas Wu
  • 出 版 社:北京:清华大学出版社
  • 出版年份:2001
  • ISBN:7302042209
  • 页数:871 页
图书介绍:
《Java面向对象程序设计 第2版 英文》目录

0 Introduction to Computers and Programming Languages 1

0.1 A History of Computers 2

0.2 Computer Architecture 5

0.3 Programming Languages 11

0.4 Java 13

0.5 Exercises 14

1 Introduction to Object-Oriented Programming and Software Development 15

1.1 Classes and Objects 16

1.2 Messages and Methods 18

1.3 Class and Instance Data Values 23

1.4 Inheritance 26

1.5 Software Engineering and Software Life Cycle 29

1.6 Having Fun with Java 31

1.7 Exercises 34

2 Java Programming Basics 37

2.1 The First Java Application 38

2.2 Program Components 48

2.3 Edit-Compile-Run Cycle 59

2.4 The javabook Package 61

2.5 Sample Program:Displaying Messages 62

2.6 The First Java Applet 66

2.7 Exercises 77

3 Numerical Data 83

3.1 Variables 84

3.2 Arithmetic Expressions 92

3.3 Constants 98

3.4 The Math Class 100

3.5 InputBox 103

3.6 OutputBox 106

3.7 Sample Program:Loan Calculator 113

3.8 Numerical Representation(Optional) 124

3.9 Exercises 128

4 Defining Instantiable Classes 139

4.1 Defining Instantiable Classes 140

4.2 Instantiable Classes and Constructors 152

4.3 Visibility Modifiers:public and private 157

4.4 Local Variables,Return Values,and Parameter Passing 162

4.5 Loan Calculator Program with an Instantiable Class 167

4.6 Exercises 181

5 Processing Input with Applets 191

5.1 Placing GUI Objects on Applets 192

5.2 Adding ActionListener to an Event Source 199

5.3 Absolute Positioning of GUI Objects 206

5.4 The Button Class 208

5.5 Converting Text to a Numerical Value 210

5.6 Sample Program:Finding Body Mass Index(BMI) 213

5.7 Running an Applet as an Application 223

5.8 Exercises 224

6 Selection Statements 229

6.1 The if Statement 230

6.2 Boolean Expressions and Variables 238

6.3 Nested-if Statements 242

6.4 ListBox 249

6.5 The switch Statement 252

6.6 Sample Program:Drawing Shapes 258

6.7 Exercises 280

7 Repetition Statements 289

7.1 The while Statement 290

7.2 Pitfalls in Writing Repetition Statements 294

7.3 The do-while Statement 299

7.4 ResponseBox 303

7.5 The for Statement 308

7.6 Nested-for Statements 312

7.7 The Format Class 316

7.8 Loan Tables 322

7.9 Sample Program:Hi-Lo Game 325

7.10 Recursive Methods(Optional) 338

7.11 Exercises 343

8 Characters and Strings 355

8.1 Characters 356

8.2 Strings 359

8.3 Primitive versus Reference Types 370

8.4 StringBuffer 379

8.5 Passing Objects as Parameters 384

8.6 Returning an Object from Methods 389

8.7 Sample Program:Word Play 392

8.8 Exercises 404

9 Arrays 411

9.1 Array Basics 412

9.2 Arrays of Objects 421

9.3 Passing Arrays to Methods 431

9.4 MultilnputBox 436

9.5 Self-Referencing Pointer 439

9.6 Sample Development:The Address Book 446

9.7 Two-Dimensional Arrays 463

9.8 Vectors 470

9.9 Exercises 476

10 Sorting and Searching 481

10.1 Searching 482

10.2 Sorting 488

10.3 Heapsort 495

10.4 Sample Program:Sorting an AddressBook 509

10.5 Exercises 515

11 File Input and Output 519

11.1 File and FileDialog Objects 520

11.2 Low-Level File I/O 525

11.3 High-Level File I/O 532

11.4 Handling Exceptions 539

11.5 Object I/O 544

11.6 Sample Class:Saving an AddressBook Object 548

11.7 Exercises 556

12 Reusable Classes and Packages 559

12.1 Object Categories 560

12.2 Method Overriding and Overloaded Methods 562

12.3 Sample Classes:Reusable EggyPeggy and HiLo 569

12.4 Package Organization 595

12.5 Exercises 597

13 GUI Objects and Event-Driven Programming 603

13.1 Placing Buttons on a Frame 605

13.2 Handling Events 611

13.3 Placing TextField Objects on a Frame 618

13.4 Menus 620

13.5 Handling Mouse Events 626

13.6 Other GUI Objects 634

13.7 Sample Program:A Simple Calculator 639

13.8 Exercises 652

14 Inheritance and Polymorphism 657

14.1 Defining Classes with Inheritance 658

14.2 Using Classes Effectively with Polymorphism 662

14.3 Inheritance and Member Accessibility 666

14.4 Inheritance and Constructors 672

14.5 Abstract Superclasses and Abstract Methods 676

14.6 When and When Not to Use Inheritance 682

14.7 Sample Program:Computing Course Grades 684

14.8 Exercises 704

15 Class Roster Maintenance Program 709

15.1 Method Call Sequence Diagram 710

15.2 Problem Statement 711

15.3 Overall Planning 712

15.4 Step 1 Development:Program Shell with Menus 716

15.5 Step 2 Development:Create a New Roster 722

15.6 Step 3 Development:Add Students 729

15.7 Step 4 Development:Delete Students 737

15.8 Step 5 Development:Edit Student Names 740

15.9 Step 6 Development:Edit Test Scores and Compute Grades 746

15.10 Step 7 Development:Display Student Information 753

15.11 Step 8 Development:Storing Grade Rosters 765

15.12 Step 9 Development:Finalize and Improve 775

15.13 The StudentNameDialog Class 776

15.14 The TestScoreDialog Class 786

15.15 Exercises 791

16 Recursive Algorithms 797

16.1 Basic Elements of Recursion 798

16.2 Directory Listing 799

16.3 Anagram 801

16.4 Towers of Hanoi 805

16.5 Quicksort 809

16.6 When Not to Use Recursion 815

16.7 Exercises 817

A The javabook Package 819

相关图书
作者其它书籍
返回顶部