Java How To Program

by 11:54 0 comments
books-java-how-to-program

.
Overview

Description

For Computer Science and other courses on programming in Java offered in departments of Computer Science, CIS, MIS, IT, Business, Engineering, and Continuing Education. Also appropriate for upper-level courses where the instructor wants a reference to the Java language.

Written by the authors of the world's best-selling introductory C and C++ texts, this state-of-the-art guide examines one of today's hottest computer languages-Java; the first general-purpose, object-oriented language that is truly platform-independent. The latest Java 2 features are incorporated throughout this edition.

Table of Contents



Preface.


1. Introduction to Computers, the Internet and the Web.
Introduction. What Is a Computer? Computer Organization. Evolution of Operating Systems. Personal, Distributed and Client/Server Computing. Machine Languages, Assembly Languages and High-Level Languages. History of C++. History of Java. Java Class Libraries. Other High-Level Languages. Structured Programming. The Internet and the World Wide Web. Basics of a Typical Java Environment. General Notes about Java and This Book. Thinking About Objects: Introduction to Object Technology and the Unified Modeling Language. Discovering Design Patterns: Introduction. Tour of the Book. (Optional) A Tour of the Case Study on Object-Oriented Design with the UML. (Optional) A Tour of the "Discovering Design Patterns" Sections.


2. Introduction to Java Applications.
Introduction. A First Program in Java: Printing a Line of Text. Modifying Our First Java Program. Displaying Text in a Dialog Box. Another Java Application: Adding Integers. Memory Concepts. Arithmetic. Decision Making: Equality and Relational Operators. (Optional Case Study) Thinking About Objects: Examining the Problem Statement.


3. Introduction to Java Applets.
Introduction. Sample Applets from the Java 2 Software Development Kit. A Simple Java Applet: Drawing a String. Two More Simple Applets: Drawing Strings and Lines. Another Java Applet: Adding Floating-Point Numbers. Viewing Applets in a Web Browser. Java Applet Internet and World Wide Web Resources. (Optional Case Study) Thinking About Objects: Identifying the Classes in a Problem Statement.


4. Control Structures: Part 1.
Introduction. Algorithms. Pseudocode. Control Structures. The if Selection Structure. The if/else Selection Structure. The while Repetition Structure. Formulating Algorithms: Case Study 1 (Counter-Controlled Repetition). Formulating Algorithms with Top-Down, Stepwise Refinement: Case Study 2 (Sentinel-Controlled Repetition). Formulating Algorithms with Top-Down, Stepwise Refinement: Case Study 3 (Nested Control Structures). Assignment Operators. Increment and Decrement Operators. Primitive Data Types. (Optional Case Study) Thinking About Objects: Identifying Class Attributes.


5. Control Structures: Part 2.
Introduction. Essentials of Counter-Controlled Repetition. The for Repetition Structure. Examples Using the for Structure. The switch Multiple-Selection Structure. The do/while Repetition Structure. Statements break and continue. Labeled break and continue Statements. Logical Operators. Structured Programming Summary. (Optional Case Study) Thinking About Objects: Identifying Objects' States and Activities.


6. Methods.
Introduction. Program Modules in Java. Math Class Methods. Methods. Method Definitions. Argument Promotion. Java API Packages. Random-Number Generation. Example: A Game of Chance. Duration of Identifiers. Scope Rules. Recursion. Example Using Recursion: The Fibonacci Series. Recursion vs. Iteration. Method Overloading. Methods of Class Japplet. (Optional Case Study) Thinking About Objects: Identifying Class Operations.


7. Arrays.
Introduction. Arrays. Declaring and Allocating Arrays. Examples Using Arrays. References and Reference Parameters. Passing Arrays to Methods. Sorting Arrays. Searching Arrays: Linear Search and Binary Search. Multiple-Subscripted Arrays. (Optional Case Study) Thinking About Objects: Collaboration Among Objects.


8. Object-Based Programming.
Introduction. Implementing a Time Abstract Data Type with a Class. Class Scope. Controlling Access to Members. Creating Packages. Initializing Class Objects: Constructors. Using Overloaded Constructors. Using Set and Get Methods. Software Reusability. Final Instance Variables. Composition: Objects as Instance Variables of Other Classes. Package Access. Using the this Reference. Finalizers. Static Class Members. Data Abstraction and Encapsulation. (Optional Case Study) Thinking About Objects: Starting to Program the Classes for the Elevator Simulation.


9. Object-Oriented Programming.
Introduction. Superclasses and Subclasses. protected Members. Relationship between Superclass Objects and Subclass Objects. Constructors and Finalizers in Subclasses. Implicit Subclass-Object-to-Superclass-Object Conversion. Software Engineering with Inheritance. Composition vs. Inheritance. Case Study: Point, Circle, Cylinder. Introduction to Polymorphism. Type Fields and switch Statements. Dynamic Method Binding. final Methods and Classes. Abstract Superclasses and Concrete Classes. Polymorphism Examples. Case Study: A Payroll System Using Polymorphism. New Classes and Dynamic Binding. Case Study: Inheriting Interface and Implementation. Case Study: Creating and Using Interfaces. Inner Class Definitions. Notes on Inner Class Definitions. Type-Wrapper Classes for Primitive Types. (Optional Case Study) Thinking About Objects: Incorporating Inheritance into the Elevator Simulation. (Optional) Discovering Design Patterns: Introducing Creational, Structural and Behavioral Design Patterns.


10. Strings and Characters.
Introduction. Fundamentals of Characters and Strings. string Constructors. String Methods length, charAt and getChars. Comparing Strings. String Method hashCode. Locating Characters and Substrings in Strings. Extracting Substrings from Strings. Concatenating Strings. Miscellaneous String Methods. Using String Method valueOf. String Method intern. String8uffer Class. StringBuffer Constructors. StringBuffer Methods length, capacity, setLength and ensureCapacity. StringBuffer Methods charAt, setCharAt, getChars and reverse. StringBuffer append Methods. StringBuffer Insertion and Deletion Methods. Character Class Examples. Class StringTokenizer. Card Shuffling and Dealing Simulation. (Optional Case Study) Thinking About Objects: Event Handling.


11. Graphics and Java2D.
Introduction. Graphics Contexts and Graphics Objects. Color Control. Font Control. Drawing Lines, Rectangles and Ovals. Drawing Arcs. Drawing Polygons and Polylines. The Java2D API. Java2D Shapes. (Optional Case Study) Thinking About Objects: Designing Interfaces with the UML.


12. Graphical User Interface Components: Part 1.
Introduction. Swing Overview. JLabel. Event-Handling Model. JTextField and JPassraordField. JButton. JCheckBox and JRadioButton. JComboBOx. JList. Multiple-Selection Lists. Mouse Event Handling. Adapter Classes. Keyboard Event Handling. Layout Managers. Panels. (Optional Case Study) Thinking About Objects: Use Cases.


13. Graphical User Interface Components: Part 2.
Introduction. JTextArea. Creating a Customized Subclass of JPanel. Creating a Self-Contained Subclass of JPanel. JSlider. Windows. Designing Programs that Execute as Applets or Applications. Using Menus with Frames. Using JPopupMenus. Pluggable Look-and-Feel. Using JDesktopPane and JInternalFrame. Layout Managers. BoxLayout Layout Manager. CardLayout Layout Manager. GridBagLayout Layout Manager. GridBagConstraints Constants RELATIVE and REMAINDER. (Optional Case Study) Thinking About Objects: Model-View-Controller. (Optional) Discovering Design Patterns: Design Patterns Used in Packages java.awt and javax.swing.


14. Exception Handling.
Introduction. When Exception Handling Should Be Used. Other Error-Handling Techniques. Basics of Java Exception Handling. try Blocks. Throwing an Exception. Catching an Exception. Exception-Handling Example: Divide by Zero. Rethrowing an Exception. throws Clause. Constructors, Finalizers and Exception Handling. Exceptions and Inheritance. finally Block. Using printStackTrace and getMessage.


15. Multithreading.
Introduction. Class Thread: An Overview of the Thread Methods. Thread States: Life Cycle of a Thread. Thread Priorities and Thread Scheduling. Thread Synchronization. Producer/Consumer Relationship without Thread Synchronization. Producer/Consumer Relationship with Thread Synchronization. Producer/Consumer Relationship: The Circular Buffer. Daemon Threads. Rufmable Interface. Thread Groups. (Optional Case Study) Thinking About Objects: Multithreading. (Optional) Discovering Design Patterns: Concurrent Design Patterns.


16. Files and Streams.
Introduction. Data Hierarchy. Files and Streams. Creating a Sequential-Access File. Reading Data from a Sequential-Access File. Updating Sequential-Access Files. Random-Access Files. Creating a Random-Access File. Writing Data Randomly to a Random-Access File. Reading Data Sequentially from a Random-Access File. Example: A Transaction-Processing Program. Class File.


17. Networking.
Introduction. Manipulating URIs. Reading a File on a Web Server. Establishing a Simple Server Using Stream Sockets. Establishing a Simple Client Using Stream Sockets. Client/Server Interaction with Stream Socket Connections. Connectionless Client/Server Interaction with Datagrams. Client/Server Tic-Tac-Toe Using a Multithreaded Server. Security and the Network. DeitelMessenger Chat Server and Client. (Optional) Discovering Design Patterns: Design Patterns Used in Packages java.io and java.net.


18. Multimedia: Images, Animation, Audio and Video.
Introduction. Loading, Displaying and Scaling Images. Animating a Series of Images. Customizing LogoAnimator via Applet Parameters. Image Maps. Loading and Playing Audio Clips. Internet and World Wide Web Resources.


19. Data Structures.
Introduction. Self-Referential Classes. Dynamic Memory Allocation. Linked Lists. Stacks. Queues. Trees.


20. Java Utilities Package and Bit Manipulation.
Introduction. vector Class and Enumeration Interface. Stack Class. Dictionary Class. Hashtable Class. properties Class. Random Class. Bit Manipulation and the Bitwise Operators. BitSet Class.


21. Collections.
Introduction. Collections Overview. Class Arrays. Interface Collection and Class Collections. Lists. Algorithms. Sets. Maps. Synchronization Wrappers. Unmodifiable Wrappers. Abstract Implementations. (Optional) Discovering Design Patterns: Design Patterns Used in Package java.util.


22. Java Media Framework and Java Sound (on CD).
Introduction. Playing Media. Formatting and Saving Captured Media. RTP Streaming. Java Sound. Playing Sampled Audio. Musical Instrument Digital Interface (MIDI). Internet and World Wide Web Resources. (Optional Case Study) Thinking About Objects: Animation and Sound in the View.


Appendix A. Demos.
Introduction. The Sites.


Appendix B. Java Resources.
Resources. Products. FAQs. Tutorials. Magazines. Java Applets. Multimedia. Newsgroups.


Appendix C. Operator Precedence Chart.


Appendix D. ASCII Character Set.


Appendix E. Number Systems (on CD).
Introduction. Abbreviating Binary Numbers as Octal Numbers and Hexadecimal Numbers. Converting Octal Numbers and Hexadecimal Numbers to Binary Numbers. Converting from Binary, Octal, or Hexadecimal to Decimal. Converting from Decimal to Binary, Octal, or Hexadecimal. Negative Binary Numbers: Two's Complement Notation.


Appendix F. Creating HTML Documentation with javadoc (on CD).
Introduction. Documentation Comments. Documenting Java Source Code. javadoc. Files Produced by javadoc.


Appendix G. Elevator Events and Listeners (on CD).
Introduction. Events. Listeners. Component Diagrams Revisited.


Appendix H. Elevator Model (on CD).
Introduction. Class ElevatorModel. Classes Location and Floor. Class Door. Class Button. Class ElevatorShaft. Classes Light and Bell. Class Elevator. Class Person. Component Diagrams Revisited. Conclusion.


Appendix I. Elevator View (on CD).
Introduction. Class Objects. Class Constants. Class constructor. Event Handling. Component Diagrams Revisited. Conclusion.


Appendix J. Career Opportunities (on CD).
Introduction. Resources for the Job Seeker. Online Opportunities for Employers. Recruiting Services. Career Sites. Internet and World Wide Web Resources.


Appendix K. Unicode® (on CD).
Introduction. Unicode Transformation Formats. Characters and Glyphs. Advantages/Disadvantages of Unicode. Unicode Consortium's Web Site. Using Unicode. Character Ranges.


Bibliography.


Index.

Features

NEW - Optional case study focusing on object-oriented design and the UML—Illustrates the entire process of object-oriented and design from conception and design, to programming and implementation. The case study is introduced in Chapter 1 and built upon in the next eight chapters.
Introduces students to the UML and key notational schemes that they will encounter in the real world.
NEW - Now in full color—Program listings now include syntax coloring of code.
Helps students better interpret the code.
NEW - Updated throughout.
Includes new and revised discussions on important topics throughout the book.
NEW - Four high-end chapters moved out of Java How to Program, Fourth Edition and into the Deitels' Advanced Java™ 2 Platform How to Program —JDBC, Servlets, RMI and JavaBeans.
Better focuses Java How to Program, Fourth Edition for its student audience.
If you cover these chapters in your course, we are offering them as a bundle with Java How to Program, Fourth Edition. The ISBN for this bundle is 0-13-074367-4 and it is priced at $4 net more than the book alone.
Advanced Java™ 2 Platform How to Program (0-13-089560-1) contains up-to-date and significantly enhanced coverage of these topics.
Introductory chapters emphasize applications rather than applets and problem-solving and programming skills.
Helps to build a stronger foundation in programming skills and provides less rigorous and demanding introductory chapters than in previous editions so students are not overwhelmed.
Signature “Live Code™ Approach”—Language features are presented in the context of a wide variety of complete working programs. Features thousands of lines of code in hundreds of complete working programs.
Enables students to confirm that programs run as expected. Students can also manipulate the code from the CD-ROM in the back of the book or from the book's Companion Website (www.prenhall.com/deitel) or from the author's website (www.deitel.com).
Outstanding, consistent and applied pedagogy—Icons throughout identify Software Engineering Observations; Good Programming Practices; Common Programming Errors; Portability Tips; Performance Tips, Testing and Debugging Tips, and Look-and-Feel Observations.
Provides hundreds of valuable programming tips and facilitates learning.
Extensive set of interesting exercises and substantial projects.
Students can apply what they've learned in each chapter.
CD-ROM with each text.
CD-ROM with every text includes Java™ 2 Software Development Kit, Standard Edition, Version 1.3 for Windows and Linux (Intel x86); Forte™ for Java™, Release 2.0, Community Edition IDE for all platforms; Java™ Plug-In 1.3 HTML Converter Version 1.3; Java™ Media Framework API 2.1.1; source code for all the book's examples; and hyperlinks to Java demos and Internet resources.
Also available with the Multimedia Cyber Classroom —In The Complete Java Training Course, Fourth Edition, Student Edition (CD-ROM version: 0-13-064934-1; Web-based version: 0-13-064938-4).
Provides extra hands-on experience and study aids for a minimal additional cost. Includes many hours of detailed, expert audio walkthroughs of the book's hundreds of live-code examples; post-assessment exams with hundreds of short answer questions (all with answers); hundreds of self-review exercises drawn from the text (half with answers); hundreds of programming exercises from the main text (these exercises don't have answers in the main text, but half of these exercises have answers in The Complete Training Course); hundreds of tips that are marked with icons and show how to write Java code that's portable, reusable, and optimized for performance; and full-text searching and hyperlinking.
Each How to Program text can be ordered as a Complete Training Course package, containing the main text and the corresponding Cyber Classroom—an interactive, multimedia, tutorial version of the book. The Complete Training Courses are a great value, giving students additional hands-on experience and study aids for a minimal additional cost.

Each Complete Training Course is compatible with Windows 95, Windows 98, Windows NT and Windows 2000 and includes the following features:

The full text, illustrations and program listings of its corresponding How to Program book with full-text searching and hyperlinking.
Hours of detailed, expert audio descriptions of thousands of lines of code that help to reinforce concepts.
An abundance of self-assessment material:
Practice exams that offer students hundreds of short answer test questions and answers.
Hundreds of self-review questions that are drawn from the text, all with answers.
Hundreds of programming exercises that are drawn from the text, half with answers (the main text does not provide any answers to these exercises).
Intuitive browser-based interface, designed to be easy and accessible for anyone who's ever used a Web browser.
We offer the Complete Training Courses in either CD-ROM or Web-based format. When professors order the Web-based version of a Complete Training Course, their students receive the corresponding How to Program book packaged with a URL and password that gives then six months of access to the Cyber Classroom software via the Web.

If your customer has already received Java How to Program, Fourth Edition, please sample only the Java Multimedia Cyber Classroom CD-ROM (0-13-064935-X) to show them the advantages they would get with The Complete Training Course. Please do not sample The Complete Training Course as they will receive a duplicate copy of the main text.

New to This Edition

Optional case study focusing on object-oriented design and the UML—Illustrates the entire process of object-oriented and design from conception and design, to programming and implementation. The case study is introduced in Chapter 1 and built upon in the next eight chapters.
Introduces students to the UML and key notational schemes that they will encounter in the real world.

Now in full color—Program listings now include syntax coloring of code.
Helps students better interpret the code.

Updated throughout.
Includes new and revised discussions on important topics throughout the book.

Four high-end chapters moved out of Java How to Program, Fourth Edition and into the Deitels' Advanced Java™ 2 Platform How to Program —JDBC, Servlets, RMI and JavaBeans.
Better focuses Java How to Program, Fourth Edition for its student audience.

If you cover these chapters in your course, we are offering them as a bundle with Java How to Program, Fourth Edition. The ISBN for this bundle is 0-13-074367-4 and it is priced at $4 net more than the book alone.

Advanced Java™ 2 Platform How to Program (0-13-089560-1) contains up-to-date and significantly enhanced coverage of these topics.
.
REFERENCE:
https://www.pearson.com/us/higher-education/product/Deitel-Java-How-to-Program-4th-Edition/9780130341518.html
.
DOWNLOAD:


razi mahmood

Developer

Razi is an IT Lecturer and Training Consultant. His lecture/training includes:
+Software Engineering
+Programming
+Mobile Development
+Database
+Web Portal System
+Adobe Creative Suites
+Microsoft Office Suites
+Certification
Read more about him at About Page