Java Foundations: Pearson New Internati... | WHSmith Books
Java Foundations: Pearson New International Edition (3rd edition)

Java Foundations: Pearson New International Edition (3rd edition)

By: John Lewis (author), Joe Chase (author), Peter DePasquale (author)Paperback

Up to 2 WeeksUsually despatched within 2 weeks

Description

Inspired by the success of their best-selling introductory programming text, Java Software Solutions, authors Lewis, DePasquale, and Chase now release Java Foundations, Third Edition. This text is a comprehensive resource for instructors who want a two-or three-semester introduction to programming textbook that includes detail on data structures topics. Java Foundations introduces a Software Methodology early on and revisits it throughout to ensure students develop sound program development skills from the beginning. Control structures are covered before writing classes, providing a solid foundation of fundamental concepts and sophisticated topics.

Contents

Preface viiChapter 1 Introduction 11.1 The Java Programming Language 2A Java Program 3Comments 5Identifiers and Reserved Words 7White Space 91.2 Program Development 11Programming Language Levels 11Editors, Compilers, and Interpreters 13Development Environments 15Syntax and Semantics 16Errors 171.3 Problem Solving 181.4 Software Development Activities 201.5 Object-Oriented Programming 21Object-Oriented Software Principles 22 Chapter 2 Data and Expressions 332.1 Character Strings 34The print and println Methods 34String Concatenation 36Escape Sequences 402.2 Variables and Assignment 41Variables 41The Assignment Statement 44Constants 462.3 Primitive Data Types 47Integers and Floating Points 47Characters 48Booleans 502.4 Expressions 51Arithmetic Operators 51Operator Precedence 52Increment and Decrement Operators 56Assignment Operators 572.5 Data Conversion 58Conversion Techniques 602.6 Reading Input Data 61The Scanner Class 61 Chapter 3 Using Classes and Objects 753.1 Creating Objects 76Aliases 783.2 The String Class 803.3 Packages 83The import Declaration 843.4 The Random Class 863.5 The Math Class 893.6 Formatting Output 92The NumberFormat Class 92The DecimalFormat Class 94The printf Method 963.7 Enumerated Types 973.8 Wrapper Classes 100Autoboxing 102Chapter 4 Conditionals and Loops 1114.1 Boolean Expressions 112Equality and Relational Operators 113Logical Operators 1144.2 The if Statement 116The if-else Statement 119Using Block Statements 121The Conditional Operator 124Nested if Statements 1254.3 Comparing Data 127Comparing Floats 127Comparing Characters 127Comparing Objects 1284.4 The switch Statement 1304.5 The while Statement 134Infinite Loops 140Nested Loops 141Other Loop Controls 1444.6 Iterators 145Reading Text Files 1464.7 The do Statement 1484.8 The for Statement 151Iterators and for Loops 156Comparing Loops 157 Chapter 5 Writing Classes 1695.1 Classes and Objects Revisited 170Identifying Classes and Objects 171Assigning Responsibilities 1735.2 Anatomy of a Class 173Instance Data 178UML Class Diagrams 1795.3 Encapsulation 181Visibility Modifiers 182Accessors and Mutators 1835.4 Anatomy of a Method 188The return Statement 194Parameters 196Local Data 197Constructors Revisited 1985.5 Static Class Members 199Static Variables 199Static Methods 2005.6 Class Relationships 203Dependency 203Dependencies among Objects of the Same Class 204Aggregation 206The this Reference 2115.7 Method Design 212Method Decomposition 213Method Parameters Revisited 2185.8 Method Overloading 2235.9 Testing 224Reviews 225Defect Testing 226Unit Testing 227Integration Testing 228System Testing 228Test-Driven Development 2285.10 Debugging 229Simple Debugging with print Statements 230Debugging Concepts 230Chapter 6 Graphical User Interfaces 2456.1 GUI Elements 246Frames and Panels 247Buttons and Action Events 251Determining Event Sources 2536.2 More Components 256Text Fields 257Check Boxes 260Radio Buttons 263Sliders 267Combo Boxes 272Timers 2776.3 Layout Managers 282Flow Layout 285Border Layout 288Grid Layout 291Box Layout 293Containment Hierarchies 2966.4 Mouse and Key Events 297Mouse Events 297Key Events 305Extending Adapter Classes 3106.5 Dialog Boxes 311File Choosers 314Color Choosers 3166.6 Some Important Details 317Borders 317Tool Tips and Mnemonics 3216.7 GUI Design 328Chapter 7 Arrays 3397.1 Array Elements 340Overview of Arrays 3417.2 Declaring and Using Arrays 341Bounds Checking 344Alternative Array Syntax 349Initializer Lists 350Arrays as Parameters 3517.3 Arrays of Objects 3517.4 Command-Line Arguments 3617.5 Variable-Length Parameter Lists 3637.6 Two-Dimensional Arrays 367Multidimensional Arrays 370 Chapter 8 Inheritance 3798.1 C reating Subclasses 380The protected Modifier 385The super Reference 386Multiple Inheritance 3908.2 Overriding Methods 391Shadowing Variables 3948.3 C lass Hierarchies 394The Object Class 395Abstract Classes 3978.4 Visibility 3998.5 Designing for Inheritance 401Restricting Inheritance 402 Chapter 9 Polymorphism 4119.1 Dynamic Binding 4129.2 Polymorphism via Inheritance 4139.3 Interfaces 425Interface Hierarchies 430The Comparable Interface 431The Iterator Interface 4319.4 Polymorphism via Interfaces 432Event Processing 434 Chapter 10 Exceptions 44110.1 Exception Handling 44210.2 Uncaught Exceptions 44310.3 The try-catch Statement 444The finally Clause 44710.4 Exception Propagation 44810.5 The Exception Class Hierarchy 451Checked and Unchecked Exceptions 45510.6 I/O Exceptions 455 Chapter 11 Analysis of Algorithms 46511.1 Algorithm Efficiency 46611.2 Growth Functions and Big-Oh Notation 46711.3 Comparing Growth Functions 46911.4 Determining Time Complexity 471Analyzing Loop Execution 471Nested Loops 472Method Calls 473 Chapter 12 Introduction to Collections-Stacks 47912.1 Collections 480Abstract Data Types 481The Java Collections API 48312.2 A Stack Collection 48312.3 C rucial OO Concepts 485Inheritance and Polymorphism 486Generics 48712.4 Using Stacks: Evaluating Postfix Expressions 488Javadoc 49612.5 Exceptions 49712.6 A Stack ADT 49812.7 Implementing a Stack: With Arrays 501Managing Capacity 50212.8 The ArrayStack Class 503The Constructors 504The push Operation 506The pop Operation 508The peek Operation 509Other Operations 509The EmptyCollectionException Class 510Other Implementations 511 Chapter 13 Linked Structures-Stacks 51913.1 References as Links 52013.2 Managing Linked Lists 522Accessing Elements 522Inserting Nodes 523Deleting Nodes 52413.3 Elements without Links 525Doubly Linked Lists 52513.4 Stacks in the Java API 52613.5 Using Stacks: Traversing a Maze 52713.6 Implementing a Stack: With Links 536The LinkedStack Class 536The push Operation 540The pop Operation 542Other Operations 543 Chapter 14 Queues 54914.1 A Conceptual Queue 55014.2 Queues in the Java API 55114.3 Using Queues: Code Keys 55214.4 Using Queues: Ticket Counter Simulation 55614.5 A Queue ADT 56114.6 A Linked Implementation of a Queue 562The enqueue Operation 564The dequeue Operation 566Other Operations 56714.7 Implementing Queues: With Arrays 568The enqueue Operation 572The dequeue Operation 574Other Operations 57514.8 Double-Ended Queues (Deque) 575 Chapter 15 Lists 58115.1 A List Collection 58215.2 Lists in the Java Collections API 58415.3 Using Unordered Lists: Program of Study 58515.4 Using Indexed Lists: Josephus 59515.5 A List ADT 597Adding Elements to a List 59815.6 Implementing Lists with Arrays 603The remove Operation 605The contains Operation 607The add Operation for an Ordered List 608Operations Particular to Unordered Lists 609The addAfter Operation for anUnordered List 60915.7 Implementing Lists with Links 610The remove Operation 611 Chapter 16 Iterators 61916.1 What's an Iterator? 620Other Iterator Issues 62216.2 Using Iterators: Program of Study Revisited 622Printing Certain Courses 626Removing Courses 62716.3 Implementing Iterators: With Arrays 62916.4 Implementing Iterators: With Links 631 Chapter 17 Recursion 63717.1 Recursive Thinking 638Infinite Recursion 638Recursion in Math 63917.2 Recursive Programming 640Recursion versus Iteration 643Direct versus Indirect Recursion 64317.3 Using Recursion 644Traversing a Maze 644The Towers of Hanoi 65217.4 Analyzing Recursive Algorithms 657 Chapter 18 Searching and Sorting 66518.1 Searching 666Static Methods 667Generic Methods 667Linear Search 668Binary Search 670Comparing Search Algorithms 67218.2 Sorting 673Selection Sort 676Insertion Sort 678Bubble Sort 680Quick Sort 682Merge Sort 68618.3 Radix Sort 689 Chapter 19 Trees 69919.1 Trees 700Tree Classifications 70119.2 Strategies for Implementing Trees 703Computational Strategy for ArrayImplementation of Trees 703Simulated Link Strategy for ArrayImplementation of Trees 703Analysis of Trees19.3 Tree Traversals 706Preorder Traversal 706Inorder Traversal 707Postorder Traversal 707Level-Order Traversal 70819.4 A Binary Tree ADT 70919.5 Using Binary Trees: Expression Trees 71319.6 A Backpain Analyzer 72519.7 Implementing Binary Trees with Links 729The find Method 734The iteratorInOrder Method 736 Chapter 20 Binary Search Trees 74320.1 A Binary Search Tree 74420.2 Implementing Binary Search Trees: With Links 746The addElement Operation 747The removeElement Operation 750The removeAllOccurrences Operation 753The removeMin Operation 754Implementing Binary Search Trees: With Arrays 75620.3 Using Binary Search Trees: ImplementingOrdered Lists 756Analysis of the BinarySearchTreeListImplementation 75920.4 Balanced Binary Search Trees 760Right Rotation 761Left Rotation 762Rightleft Rotation 763Leftright Rotation 76320.5 Implementing Binary Search Trees: AVL Trees 764Right Rotation in an AVL Tree 765Left Rotation in an AVL Tree 765Rightleft Rotation in an AVL Tree 765Leftright Rotation in an AVL Tree 76720.6 Implementing Binary Search Trees: Red/Black Trees 767Insertion into a Red/Black Tree 768Element Removal from a Red/Black Tree 771 Chapter 21 Heaps and Priority Queues 78121.1 A Heap 782The addElement Operation 784The removeMin Operation 785The findMin Operation 78621.2 Using Heaps: Priority Queues 786The addElement Operation 790The removeMin Operation 794The findMin Operation 79721.4 Implementing Heaps: With Arrays 797The addElement Operation 799The removeMin Operation 800The findMin Operation 80221.5 Using Heaps: Heap Sort 802 Chapter 22 Sets and Maps 80922.1 Set and Map Collections 81022.2 Sets and Maps in the Java API 81022.3 Using Sets: Domain Blocker 81322.4 Using Maps: Product Sales 81622.5 Using Maps: User Management 82022.6 Implementing Sets and Maps Using Trees 82522.7 Implementing Sets and Maps Using Hashing 825 Chapter 23 Multi-way Search Trees 83323.1 Combining Tree Concepts 83423.2 2-3 Trees 834Inserting Elements into a 2-3 Tree 835Removing Elements from a 2-3 Tree 83723.3 2-4 Trees 84023.4 B-Trees 842B*-Trees 843B+-Trees 843Analysis of B-Trees 84423.5 Implementation Strategies for B-Trees 844 Chapter 24 Graphs 124.1 Undirected Graphs 224.2 Directed Graphs 324.3 Networks 524.4 Common Graph Algorithms 6Traversals 6Testing for Connectivity 10Minimum Spanning Trees 12Determining the Shortest Path 1524.5 Strategies for Implementing Graphs 15Adjacency Lists 16Adjacency Matrices 1624.6 Implementing Undirected Graphs with anAdjacency Matrix 17The addEdge Method 22The addVertex Method 22The expandCapacity Method 23Other Methods 24 Chapter 25 Databases 78125.1 Introduction to Databases 78225.2 Establishing a Connection to a Database 784Obtaining a Database Driver 78425.3 Creating and Altering Database Tables 787Create Table 787Alter Table 788Drop Column 78925.4 Querying the Database 789Show Columns 79025.5 Inserting, Viewing, and Updating Data 792Insert 793SELECT . . . FROM 793Update 79825.6 Deleting Data and Database Tables 799Deleting Data 799Deleting Database Tables 800 Appendix A Glossary 905Appendix B Number Systems 939Place Value 940Bases Higher Than 10 941Conversions 942Shortcut Conversions 945Appendix C The Unicode Character Set 951Appendix D Java Operators 955Java Bitwise Operators 957Appendix E Java Modifiers 961Java Visibility Modifiers 962A Visibility Example 962Other Java Modifiers 963Appendix F Java Graphics 965Coordinate Systems 966Representing Color 966Drawing Shapes 967Polygons and Polylines 976The Polygon Class 980Appendix G Java Applets 985Embedding Applets in HTML 988More Applet Methods 988GUIs in Applets 993Appendix H Regular Expressions 1003Appendix I Hashing 1005I.1 A Hashing 1006I.2 Hashing Functions 1007The Division Method 1008The Folding Method 1008The Mid-Square Method 1009The Radix Transformation Method 1009The Digit Analysis Method 1009The Length-Dependent Method 1010Hashing Functions in the Java Language 1010I.3 Resolving Collisions 1010Chaining 1011Open Addressing 1012I.4 Deleting Elements from a Hash Table 1015Deleting from a Chained Implementation 1015Deleting from an Open AddressingImplementation 1016I.5 Hash Tables in the Java Collections API 1017The Hashtable Class 1017The HashSet Class 1019The HashMap Class 1019The IdentityHashMap Class 1020I.6 The WeakHashMap Class 1021LinkedHashSet and LinkedHashMap 1022Appendix J Java Syntax 1029Index 1043

Product Details

  • ISBN13: 9781292025483
  • Format: Paperback
  • Number Of Pages: 1040
  • ID: 9781292025483
  • weight: 2172
  • ISBN10: 1292025484
  • edition: 3rd edition

Delivery Information

  • Saver Delivery: Yes
  • 1st Class Delivery: Yes
  • Courier Delivery: Yes
  • Store Delivery: Yes

Prices are for internet purchases only. Prices and availability in WHSmith Stores may vary significantly

Close