Java編程及其套用

Java編程及其套用

《Java編程及其套用》是2014年11月電子工業出版社出版的圖書,作者是Zizhong John Wang(王子中)。

基本介紹

  • 中文名:Java編程及其套用
  • 作者:Zizhong John Wang(王子中)
  • ISBN:9787121245114
  • 頁數:308頁
  • 定價:48元
  • 出版社:電子工業出版社
  • 出版時間:2014年11月
  • 開本:16開
內容簡介,圖書目錄,

內容簡介

本書前六章介紹了Java 程式的基本結構與要素,包括字元串、數值變數、輸入/輸出、選擇(selection)與循環(loops)。第七章至第十一章、第十三章、第十四章引入了Java 程式的複合結構及編程技術,包括數組(arrays)、類(classes)及其方法(methods)、面向對象編程(OOP)及異常處理(exception handling ),其中面向對象編程(OOP)討論了類的繼承(inheritance)與多態(polymorphism)。第十二章、第十五章及第十六章介紹了由Java 實現的數據結構,如表(lists)、鍊表(linked lists)及遞歸(recursion)。本書最後對Java Applets 作了簡單介紹,並給出了幾個套用實例。

圖書目錄

目錄 
Chapter 1 Introduction 1
1.1 What is a Computer 1
1.2 Instruction Execution Cycle 3
1.3 Compilers and Interpreters 3
1.4 Programs and Algorithms 4
1.5 Code Debugging5
1.6 Compiling and Execution 6
1.7 Chapter Exercises 8
Chapter 2 Characters and Strings 9
2.1 Java Program Components 9
2.2 Naming Identifiers 10
2.3 Characters and Strings 12
2.4 Declaration of Variables13
2.5 Assignment Statements 14
2.6 Named Constants15
2.7 Standard Output16
2.8 Standard Input17
2.9 String Concatenation 18
2.10 The Length of a String 19
2.11 The Preprocessor 20
2.12 Chapter Exercises 20
Chapter 3 Numerical Data 23
3.1 Integers and Floating Numbers 23
3.2 Arithmetic Operations 24
3.3 Coercion and Cast 25
3.4 Operations with Mixed Types 26
3.5 Modulo Operations 27
3.6 Increments and Decrements28
3.7 Combined Assignment Operators 28
3.8 Precedence of Operators 29
3.9 Commonly Used Methods of Math Class30
3.10 Section Exercises 31
3.11 Formatting the Floating Numbers 32
3.12 Standard Input for Numerical Data33
3.13 Chapter Exercises 33
Chapter 4 Input/Output and File I/O Operations 35
4.1 More on Input Statements36
4.2 Input for Strings with Spaces 39
4.3 Input for Characters 40
4.4 Skipping Lines41
4.5 Section Exercises 42
4.6 File I/O Operations 45
4.7 Redirection for File I/O48
4.8 Procedure of Software Design49
4.9 Chapter Exercises 50
Chapter 5 Selection Structures53
5.1 The Boolean Data Type 53
5.2 Relational Operators 53
5.3 Logical Operators 54
5.4 Precedence of Operators56
5.5 String Comparisons 57
5.6 Statement Blocks 58
5.7 If Statements 60
5.8 If-Else Statements 60
5.9 Nested If Statements 63
5.10 Section Exercises 65
5.11 More Examples 65
5.12 An Alternative Selection Structure68
5.13 Chapter Exercises 70
Chapter 6 Loops 73
6.1 While Loops 73
6.2 EOF-Controlled Loops 76
6.3 Sentinel-Controlled Loops78
6.4 Do-While Loops 81
6.5 For Loops 82
6.6 Chapter Exercises 85
Chapter 7 Static or Class Methods87
7.1 Value-Returning Methods89
7.2 Void Methods 92
7.3 Local and Global Variables94
7.4 Section Exercises 95
7.5 More Examples 95
7.6 Chapter Exercises 98
Chapter 8 Classes 101
8.1 Definition of a Class 103
8.2 Instance Variables 103
8.3 Constructors 104
8.4 Instance Methods 104
8.5 Chapter Exercises 108
Chapter 9 Arrays 111
9.1 Declaration of an Array 112
9.2 I/O Work for Array’s Components116
9.3 Initialization of an Array 117
9.4 Section Exercises 118
9.5 Aggregate Operations 119
9.6 Chapter Exercises 121
Chapter 10 More on Arrays 123
10.1 The Length of an Array 123
10.2 Arrays Used in Methods 124
10.3 Section Exercises 129
10.4 Parallel Arrays 130
10.5 Section Exercises 131
10.6 Two-Dimensional Arrays 131
10.7 Section Exercises 133
10.8 More on 2-D Arrays 133
10.9 2-D Arrays in Methods135
10.10 Chapter Exercises 136
Chapter 11 More on Classes 139
11.1 Abstract Data Type (ADT) 139
11.2 Definition of a Class 140
11.3 The TimeType Class 143
11.4 Class Objects 145
11.5 Accessing Class Members 145
11.6 Code Example 146
11.7 Section Exercises 148
11.8 Aggregate Operations 149
11.9 Information Hiding 150
11.10 Section Exercises 152
11.11 Class Constructors 152
11.12 Section Exercises 157
11.13 The Fraction Class 158
11.14 The Split Method 160
11.15 Arrays of Objects 161
11.16 Chapter Exercises 163
Chapter 12 Lists 165
12.1 What is a List 165
12.2 Sequential Search 168
12.3 Selection Sort 169
12.4 The List Class 173
12.5 Section Exercises 179
12.6 Sorted Lists180
12.7 Java Generics 188
12.8 Big-O Notation 189
12.9 Using the ArrayList Class 192
12.10 Chapter Exercises 193
Chapter 13 Object-Oriented Programming 197
13.1 OOP Inheritance 198
13.2 Using the toString Method 203
13.3 Section Exercises 208
13.4 OOP Composition 210
13.5 The Line Class 213
13.6 Section Exercises 214
13.7 OOP Polymorphism 216
13.8 Java Interface 218
13.9 Chapter Exercises 220
Chapter 14 Exception Handling 223
14.1 The Try-Catch Structure 223
14.2 Exception Classes 227
14.3 More on Exception Classes 230
14.4 Chapter Exercises 233
Chapter 15 Linked Lists 235
15.1 The ListNode Class 236
15.2 Creating a Linked List 237
15.3 Using the LinkedList Class 243
15.4 More on Java Generics 245
15.5 Chapter Exercises 249
Chapter 16 Recursion 251
16.1 Recursive Methods 251
16.2 Recursion or Repetition 253
16.3 More Examples 254
16.4 Chapter Exercises 254
Chapter 17 Java Applets and Applications 257
17.1 Java Applets 257
17.2 The Graphics Class 259
17.3 The Simulation of Cell Division 261
17.4 The Dynamic Iteration of Triangles 264
Bibliography 269
Appendix A Using Linux for Java 271
A.1 New Users on Linux 271
A.2 User Login 272
A.3 PICO Editor 273
A.4 Using Secure File Transfer 276
Appendix B Installation of Java and TextPad 279
B.1 Installation of Java 279
B.2 Downloading and Installing TextPad 282
B.3 Execution of Java Applications 283
B.4 Execution of Java Applets 285
Index 287

相關詞條

熱門詞條

聯絡我們