圖書描述
For courses in Java programming
This package includes Pearson MyLab Programming.
Unparalleled breadth and depth of object-oriented programming concepts
The Deitels?groundbreaking How to Program series offers unparalleled breadth and depth of programming fundamentals, object-oriented programming concepts and intermediate-level topics for further study. Java How to Program, Early Objects, 11th Edition, presents leading-edge computing technologies using the Deitel signature live-code approach, which demonstrates concepts in hundreds of complete working programs. The 11th Edition presents updated coverage of Java SE 8 and new Java SE 9 capabilities, including JShell, the Java Module System, and other key Java 9 topics. [Java How to Program, Late Objects, 11th Edition also is available.]
This package includes Pearson MyLab?Programming,an online learning system designed to engage students and improve results. Pearson MyLab Programming consists of a set of programming exercises correlated to the programming concepts in this book. Through hundreds of practice problems, the system automatically detects errors in the logic and syntax of their code submissions and offers targeted hints that enable students to figure out what went wrongnd why.
MyLab should only be purchased when required by an instructor. Please be sure you have the correct ISBN and Course ID. Instructors, contact your Pearson rep for more information.
本書特色
This title is a Pearson Global Edition. The Editorial team at Pearson has worked closely with educators around the world to include content which is especially relevant to students outside the United States.
Prepare students to meet Java programming challenges
.Rich coverage of programming fundamentals; real-world examples.
.Friendly early classes and objects presentation.
.Use easily with Java™ SE 8 and/or the new Java™ SE 9.
。Java SE 9 content is in easy-to-include-or-omit sections.
。Perfect for instructors who want to stay in Java SE 8 for a while and ease into Java SE 9.
。Perfect for instructors who want to add JShell (Java 9’s interactive Java) to their Java SE 8 or Java SE 9 courses.
.Signature live-code approach teaches programming by presenting the concepts in the context of complete working programs.
.The text’s modular organization is appropriate for introductory and intermediate programming courses, and helps instructors plan their syllabi.
.Comprehensive coverage of concepts and topics:
。Interactive Java through JShell–Java SE 9’s most exciting new pedagogic feature.
。Java 9 topics: Modularity (online), collection factory methods and other language and API enhancements.
。Lambdas, sequential and parallel streams, functional interfaces, immutability.
。JavaFX GUI, 2D and 3D graphics, animation and video.
。Composition vs. Inheritance, dynamic composition.
。Programming to an interface not an implementation.
。Files, input/output streams and XML serialization.
。Concurrency for optimal multi-core performance.
。Other topics: recursion, searching, sorting, generics, generic collections, data structures, optional Swing GUI, multithreading, database (JDBC ™ and JPA).
.Access to the Companion Website (http://www.pearsonhighered.com/deitel) is available with the purchase of a new textbook and provides extra hands-on experience and study aids, including:
。Extensive VideoNotes allow students to view the problem-solving process outside of the classroom–when they need help the most. In the VideoNotes, co-author Paul Deitel patiently explains most of the programs in the book’s core chapters. Students like viewing the VideoNotes for reinforcement of core concepts and for further insights.
。Additional chapters and appendices for advanced courses.
。Evolving Java SE 9 content
。Source code for the book’s examples (also available at deitel.com/books/jhtp11).
Facilitate Learning with Outstanding Applied Pedagogy
.Programming Wisdom: Hundreds of valuable programming tips facilitate learning. Icons throughout the text identify Software Engineering Observations, Good Programming Practices, Common Programming Errors, Error-Prevention Tips, Portability Tips, Performance Tips, and Look-and-Feel Observations(for GUI design). These represent the best the authors have gleaned from a combined nine decades of programming and teaching experience.
.Hundreds of self-review exercises with answers.
.Hundreds of interesting real-world exercises and projects enable students to apply what they’ve learned in each chapter (Instructor Solutions Manual contains answers for most).
.“Making a Difference” exercises encourage students to use computers and the Internet to research and address significant social problems.
.Most of the programming exercises are titled to help instructors select the most appropriate exercises for homework assignments.
編程思維與軟件設計原理:構建堅實技術基石 引言:跨越代碼錶象,直擊編程核心 在浩瀚的軟件開發領域中,我們常常被各種新興框架、語言特性以及快速迭代的技術潮流所裹挾。然而,優秀的代碼和健壯的係統,其根基往往深植於那些看似“基礎”卻永不過時的原理之中。本書並非聚焦於某一特定語言的語法細節,而是緻力於構建一套全麵的、可遷移的編程思維模型和軟件設計藍圖。它旨在幫助讀者從初學者階段邁嚮能夠獨立設計和實現復雜係統的專業工程師,理解“如何思考”比“如何輸入”更為重要。 本書假定讀者已經具備基本的計算機科學概念,例如數據結構和算法的初步認識。我們的目標是將這些知識點與實際工程實踐相結閤,形成一個連貫的知識體係。我們將探索從最底層的邏輯構造到高層架構決策的完整路徑。 第一部分:思維的基石——邏輯、抽象與精確錶達 第一章:從零開始的計算思維 本章深入探討計算思維(Computational Thinking)的本質。它不僅僅是編寫指令,更是一種係統化的解決問題的方法論。我們將剖析分解(Decomposition)、模式識彆(Pattern Recognition)、抽象(Abstraction)和算法設計(Algorithm Design)這四大核心要素。 邏輯的嚴謹性: 探究布爾代數在程序流程控製中的應用,強調條件判斷和循環結構的精確邊界條件設置。我們將使用大量的邏輯謎題和微型編程挑戰來訓練讀者的邏輯推導能力,確保每一個“如果-那麼-否則”的決策都是無懈可擊的。 狀態與過程管理: 程序本質上是對狀態的轉換。本章將細緻分析程序執行過程中的內存狀態變化,如何通過變量和數據結構來追蹤和管理這些狀態,避免産生不可預知的副作用。我們將討論副作用(Side Effects)的風險,並介紹如何最小化它們。 第二章:抽象的力量與信息隱藏 抽象是人類認知世界和構建復雜係統的最有效工具。本章將重點討論不同層次的抽象:從簡單的數據類型封裝到復雜的模塊化設計。 數據抽象的層次: 不僅僅是定義一個類,而是理解如何將復雜數據結構封裝成一個穩定的、用戶友好的接口。我們將研究抽象數據類型(ADT)的設計原則,以及如何通過定義清晰的契約(Contract)來隱藏實現細節。 接口與實現的分離: 這是所有工程化係統的核心。本章將通過案例分析,展示如何設計鬆耦閤的接口,使係統在內部實現發生變化時,外部依賴不受影響。討論在不同粒度(函數、模塊、服務)上應用這一原則的實踐。 第三章:算法效率的量化分析 對於任何一個規模化係統,效率是不可迴避的考量。本章將超越簡單的代碼實現,專注於算法效率的科學評估。 漸進分析(Asymptotic Analysis): 深入講解大O、大Omega和Theta記號的含義,以及它們如何幫助我們預測代碼在數據規模增長時的錶現。我們將對比分析常見搜索、排序算法的時間復雜度和空間復雜度。 性能的現實考量: 雖然理論復雜度很重要,但本章也會討論實際的常數因子、緩存效應(Cache Effects)以及 I/O 瓶頸對整體性能的影響。引入基準測試(Benchmarking)的基本方法論,教導讀者如何進行有意義的性能度量。 第二部分:構建模塊——結構化與組織化設計 第四章:結構化編程範式的深化 結構化編程是現代軟件的基礎,但其應用需要技巧。本章旨在將結構化概念擴展到大型項目組織中。 控製流的優雅管理: 除瞭順序、選擇、循環,我們將探討如何使用更高級的控製結構(如迭代器、生成器)來替代復雜的嵌套,提高代碼的可讀性和可維護性。重點討論goto語句的現代替代方案,以及如何通過函數式思維來簡化流程控製。 模塊化與內聚性/耦閤度: 介紹軟件設計中衡量模塊質量的關鍵指標——內聚性(Cohesion)和耦閤度(Coupling)。通過清晰的圖示和反例,闡述如何設計高內聚、低耦閤的組件,這是實現並行開發和獨立維護的前提。 第五章:數據結構的選擇與應用藝術 數據結構是數據的組織方式,直接決定瞭算法的效率和係統的錶現。 綫性與非綫性結構的高級應用: 不僅限於數組和鏈錶,我們將深入探討樹(如平衡二叉搜索樹、B-Tree的原理)、圖(Graph)的遍曆算法(BFS/DFS)及其在網絡、路徑規劃中的實際映射。 集閤與映射的底層機製: 詳細解析哈希錶(Hash Table)的衝突解決策略、負載因子管理,以及它們如何在 O(1) 平均時間復雜度下實現高效查找。討論跳躍列錶(Skip List)等替代方案的適用場景。 第六章:錯誤處理與健壯性設計 一個健壯的係統必須能夠優雅地處理意料之外的輸入和運行時的故障。 異常機製的正確使用: 探討異常(Exceptions)作為控製流的一種機製時的利弊。區分“預期性錯誤”和“不可恢復性錯誤”,並確定何時應該使用返迴碼,何時應該拋齣異常。 防禦性編程(Defensive Programming): 強調對所有外部輸入和內部不確定狀態進行驗證。介紹斷言(Assertions)在開發階段捕獲邏輯錯誤的價值,以及如何設計日誌記錄和錯誤報告係統以進行事後分析。 第三部分:麵嚮未來的設計——範式與演進 第七章:函數式編程思想的融入 雖然不局限於某一特定語言,但理解函數式編程(FP)的原則能夠極大地提升代碼的清晰度和可測試性。 純函數與不可變性: 闡述純函數(Pure Functions)的概念,即給定相同的輸入,永遠産生相同的輸齣且無副作用。探討不可變數據結構(Immutability)如何從根本上消除並發編程中的競態條件問題。 高階函數與數據流: 學習如何使用高階函數(如映射、過濾、摺疊)來清晰地錶達數據轉換的流程,將命令式代碼轉化為更具聲明性的數據管道。 第八章:設計模式:解決常見問題的成熟方案 設計模式是前輩工程師在解決重復性架構問題時總結齣的經驗結晶。本章將聚焦於模式背後的“為什麼”,而非僅僅是“怎麼寫”。 創建型模式(Creational Patterns): 深入解析工廠(Factory)、單例(Singleton)模式在資源管理和對象實例化控製中的作用。討論其優缺點及現代替代方案。 結構型模式(Structural Patterns): 探討適配器(Adapter)、裝飾器(Decorator)等如何靈活地組閤對象和類,實現係統功能的擴展而無需修改現有代碼。 行為型模式(Behavioral Patterns): 分析策略(Strategy)、觀察者(Observer)模式如何解耦對象間的依賴關係,使係統行為更具可配置性和響應性。 第九章:係統演化與技術債務管理 軟件係統是活的實體,必須能夠適應不斷變化的需求。 重構的藝術與科學: 介紹如何識彆“壞味道”(Code Smells),並係統性地、小步快跑地進行代碼重構,以保持代碼庫的健康狀態。強調重構必須在測試覆蓋的保護下進行。 技術債務的量化與償還: 討論技術債務的來源(故意或無意),以及如何評估其對未來開發速度的影響。提齣在項目規劃中納入“技術債務償還周期”的建議。 結論:終身學習的實踐路徑 本書的最終目標是培養一種持續學習和批判性思考的習慣。技術領域的發展是不可逆的,掌握瞭底層原理和高級設計哲學,讀者便能迅速吸收新的工具和語言,真正做到“授人以漁”。掌握本書所涵蓋的思維框架,將使您有能力駕馭任何未來的技術挑戰,構建齣清晰、高效、可維護的軟件係統。