𝔖 Scriptorium
✦   LIBER   ✦

📁

Java How to Program: Early Objects

✍ Scribed by Deitel, Harvey;Deitel, Paul


Publisher
Pearson
Year
2014
Tongue
English
Leaves
1241
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Intended for use in the Java programming courseThe Deitels’ groundbreakingHow to Programseries offers unparalleled breadth and depth of object-oriented programming concepts and intermediate-level topics for further study.Java How to Program (Early Objects),Tenth Edition,teaches programming by presenting the concepts in the context of full working programs and takes an early-objects approachMyProgrammingLab forJava How to Program (Early Objects)is a total learning package. MyProgrammingLab is an online homework, tutorial, and assessment program that truly engages students in learning. It helps students better prepare for class, quizzes, and exams–resulting in better performance in the course–and provides educators a dynamic set of tools for gauging individual and class progress.Teaching and Learning ExperienceThis program presents a better teaching and learning experience–for you and your students.Personalize Learning with MyProgrammingLab:Through the power of practice and immediate personalized feedback, MyProgrammingLab helps students fully grasp the logic, semantics, and syntax of programming.Teach Programming with the Deitels’ Signature Live Code Approach:Java language features are introduced with thousands of lines of code in hundreds of complete working programs.Introduce Objects Early:Presenting objects and classes early gets students “thinking about objects” immediately and mastering these concepts more thoroughly.Keep Your Course Current:This edition can be used with Java SE 7 or Java SE 8, and is up-to-date with the latest technologies and advancements.Facilitate Learning with Outstanding Applied Pedagogy:Making a Difference exercise sets, projects, and hundreds of valuable programming tips help students apply concepts.Support Instructors and Students:Student and instructor resources are available to expand on the topics presented in the text.

✦ Table of Contents


Cover......Page 1
Half title......Page 2
Series Page......Page 3
Title Page......Page 4
Copyright......Page 5
Dedication Page......Page 6
Contents......Page 8
Foreword......Page 24
Preface......Page 26
Before You Begin......Page 40
Ch. 1_Introduction to Computers, the Internet and Java......Page 44
1.1 Introduction......Page 45
1.2 Hardware and Software......Page 47
1.3 Data Hierarchy......Page 49
1.4 Machine Languages, Assembly Languages and High-Level Languages......Page 52
1.5 Introduction to Object Technology......Page 53
1.6 Operating Systems......Page 56
1.7 Programming Languages......Page 58
1.9 A Typical Java Development Environment......Page 60
1.10 Test-Driving a Java Application......Page 64
1.11 Internet and World Wide Web......Page 68
1.12 Software Technologies......Page 71
Self-Review Exercises......Page 73
Exercises......Page 74
Making a Difference......Page 75
Ch. 2_Introduction to Java Applications; Input/Output and Operators......Page 77
2.2 Your First Program in Java: Printing a Line of Text......Page 78
2.3 Modifying Your First Java Program......Page 84
2.4 Displaying Text with printf......Page 86
2.5 Another Application: Adding Integers......Page 88
2.6 Memory Concepts......Page 93
2.7 Arithmetic......Page 94
2.8 Decision Making: Equality and Relational Operators......Page 97
2.9 Wrap-Up......Page 101
Summary......Page 102
Self-Review Exercises......Page 104
Answers to Self-Review Exercises......Page 105
Exercises......Page 107
Making a Difference......Page 110
Ch. 3_Introduction to Classes, Objects, Methods and Strings......Page 112
3.1 Introduction......Page 113
3.2 Instance Variables, set Methods and get Methods......Page 114
3.3 Primitive Types vs. Reference Types......Page 123
3.4 Account Class: Initializing Objects with Constructors......Page 124
3.5 Account Class with a Balance; Floating-Point Numbers......Page 127
3.6 (Optional) GUI and Graphics Case Study: Using Dialog Boxes......Page 133
Summary......Page 136
Self-Review Exercises......Page 139
Answers to Self-Review Exercises......Page 140
Exercises......Page 141
Making a Difference......Page 142
Ch. 4_Control Statements: Part 1; Assignment, ++ and -- Operators......Page 144
4.2 Algorithms......Page 145
4.4 Control Structures......Page 146
4.5 if Single-Selection Statement......Page 148
4.6 if…else Double-Selection Statement......Page 149
4.7 Student Class: Nested if…else Statements......Page 154
4.8 while Repetition Statement......Page 156
4.9 Formulating Algorithms: Counter-Controlled Repetition......Page 158
4.10 Formulating Algorithms: Sentinel-Controlled Repetition......Page 162
4.11 Formulating Algorithms: Nested Control Statements......Page 169
4.13 Increment and Decrement Operators......Page 174
4.14 Primitive Types......Page 177
4.15 (Optional) GUI and Graphics Case Study: Creating Simple Drawings......Page 178
4.16 Wrap-Up......Page 182
Summary......Page 183
Self-Review Exercises......Page 186
Answers to Self-Review Exercises......Page 187
Exercises......Page 188
Making a Difference......Page 194
Ch. 5_Control Statements: Part 2; Logical Operators......Page 195
5.2 Essentials of Counter-Controlled Repetition......Page 196
5.3 for Repetition Statement......Page 198
5.4 Examples Using the for Statement......Page 202
5.5 do…while Repetition Statement......Page 206
5.6 switch Multiple-Selection Statement......Page 208
5.7 Class AutoPolicy Case Study: Strings in switch Statements......Page 214
5.8 break and continue Statements......Page 217
5.9 Logical Operators......Page 219
5.10 Structured Programming Summary......Page 225
5.11 (Optional) GUI and Graphics Case Study: Drawing Rectangles and Ovals......Page 230
Summary......Page 233
Self-Review Exercises......Page 236
Answers to Self-Review Exercises......Page 237
Exercises......Page 238
Making a Difference......Page 242
Ch. 6_Methods: A Deeper Look......Page 243
6.2 Program Modules in Java......Page 244
6.3 static Methods, static Fields and Class Math......Page 246
6.4 Declaring Methods with Multiple Parameters......Page 248
6.5 Notes on Declaring and Using Methods......Page 251
6.6 Method-Call Stack and Stack Frames......Page 252
6.7 Argument Promotion and Casting......Page 253
6.8 Java API Packages......Page 254
6.9 Case Study: Secure Random-Number Generation......Page 256
6.10 Case Study: A Game of Chance; Introducing enum Types......Page 261
6.11 Scope of Declarations......Page 265
6.12 Method Overloading......Page 268
6.13 (Optional) GUI and Graphics Case Study: Colors and Filled Shapes......Page 270
6.14 Wrap-Up......Page 273
Summary......Page 274
Self-Review Exercises......Page 277
Answers to Self-Review Exercises......Page 278
Exercises......Page 280
Making a Difference......Page 284
Ch. 7_Arrays and Array Lists......Page 286
7.1 Introduction......Page 287
7.2 Arrays......Page 288
7.3 Declaring and Creating Arrays......Page 289
7.4 Examples Using Arrays......Page 290
7.5 Exception Handling: Processing the Incorrect Response......Page 299
7.6 Case Study: Card Shuffling and Dealing Simulation......Page 300
7.7 Enhanced for Statement......Page 305
7.8 Passing Arrays to Methods......Page 306
7.9 Pass-By-Value vs. Pass-By-Reference......Page 308
7.10 Case Study: Class GradeBook Using an Array to Store Grades......Page 309
7.11 Multidimensional Arrays......Page 315
7.12 Case Study: Class GradeBook Using a Two-Dimensional Array......Page 318
7.13 Variable-Length Argument Lists......Page 324
7.14 Using Command-Line Arguments......Page 326
7.15 Class Arrays......Page 328
7.16 Introduction to Collections and Class ArrayList......Page 330
7.17 (Optional) GUI and Graphics Case Study: Drawing Arcs......Page 334
Summary......Page 337
Self-Review Exercises......Page 340
Answers to Self-Review Exercises......Page 341
Exercises......Page 342
Special Section: Building Your Own Computer......Page 351
Making a Difference......Page 357
Ch. 8_Classes and Objects: A Deeper Look......Page 358
8.2 Time Class Case Study......Page 359
8.3 Controlling Access to Members......Page 364
8.4 Referring to the Current Object’s Members with the this Reference......Page 365
8.5 Time Class Case Study: Overloaded Constructors......Page 367
8.7 Notes on Set and Get Methods......Page 373
8.8 Composition......Page 375
8.9 enum Types......Page 378
8.11 static Class Members......Page 381
8.12 static Import......Page 385
8.13 final Instance Variables......Page 386
8.14 Package Access......Page 387
8.15 Using BigDecimal for Precise Monetary Calculations......Page 388
8.16 (Optional) GUI and Graphics Case Study: Using Objects with Graphics......Page 391
Summary......Page 395
Answers to Self-Review Exercise......Page 398
Exercises......Page 399
Making a Difference......Page 401
Ch. 9_Object-Oriented Programming: Inheritance......Page 403
9.1 Introduction......Page 404
9.2 Superclasses and Subclasses......Page 405
9.3 protected Members......Page 407
9.4 Relationship Between Superclasses and Subclasses......Page 408
9.6 Class Object......Page 430
9.7 (Optional) GUI and Graphics Case Study: Displaying Text and Images Using Labels......Page 431
Summary......Page 434
Self-Review Exercises......Page 435
Answers to Self-Review Exercises......Page 436
Ch. 10_Object-Oriented Programming: Polymorphism and Interfaces......Page 438
10.1 Introduction......Page 439
10.2 Polymorphism Examples......Page 441
10.3 Demonstrating Polymorphic Behavior......Page 442
10.4 Abstract Classes and Methods......Page 444
10.5 Case Study: Payroll System Using Polymorphism......Page 447
10.7 final Methods and Classes......Page 462
10.8 A Deeper Explanation of Issues with Calling Methods from Constructors......Page 463
10.9 Creating and Using Interfaces......Page 464
10.10 Java SE 8 Interface Enhancements......Page 475
10.11 (Optional) GUI and Graphics Case Study: Drawing with Polymorphism......Page 476
Summary......Page 479
Self-Review Exercises......Page 481
Exercises......Page 482
Making a Difference......Page 483
Ch. 11_Exception Handling: A Deeper Look......Page 484
11.1 Introduction......Page 485
11.2 Example: Divide by Zero without Exception Handling......Page 486
11.3 Example: Handling ArithmeticExceptions and InputMismatchExceptions......Page 488
11.5 Java Exception Hierarchy......Page 494
11.6 finally Block......Page 497
11.7 Stack Unwinding and Obtaining Information from an Exception Object......Page 502
11.8 Chained Exceptions......Page 504
11.9 Declaring New Exception Types......Page 507
11.11 Assertions......Page 508
11.13 Wrap-Up......Page 510
Summary......Page 511
Answers to Self-Review Exercises......Page 514
Exercises......Page 515
Ch. 12_GUI Components: Part 1......Page 516
12.1 Introduction......Page 517
12.2 Java’s Nimbus Look-and-Feel......Page 518
12.3 Simple GUI-Based Input/Output with JOptionPane......Page 519
12.4 Overview of Swing Components......Page 522
12.5 Displaying Text and Images in a Window......Page 524
12.6 Text Fields and an Introduction to Event Handling with Nested Classes......Page 528
12.7 Common GUI Event Types and Listener Interfaces......Page 534
12.8 How Event Handling Works......Page 536
12.9 JButton......Page 538
12.10 Buttons That Maintain State......Page 541
12.11 JComboBox; Using an Anonymous Inner Class for Event Handling......Page 547
12.12 JList......Page 551
12.13 Multiple-Selection Lists......Page 554
12.14 Mouse Event Handling......Page 556
12.15 Adapter Classes......Page 561
12.16 JPanel Subclass for Drawing with the Mouse......Page 565
12.17 Key Event Handling......Page 568
12.18 Introduction to Layout Managers......Page 571
12.19 Using Panels to Manage More Complex Layouts......Page 581
12.20 JTextArea......Page 582
12.21 Wrap-Up......Page 585
Summary......Page 586
Self-Review Exercises......Page 591
Exercises......Page 592
Making a Difference......Page 596
Ch. 13_Graphics and Java 2D......Page 598
13.1 Introduction......Page 599
13.2 Graphics Contexts and Graphics Objects......Page 601
13.3 Color Control......Page 602
13.4 Manipulating Fonts......Page 609
13.5 Drawing Lines, Rectangles and Ovals......Page 614
13.6 Drawing Arcs......Page 618
13.7 Drawing Polygons and Polylines......Page 621
13.8 Java 2D API......Page 624
Summary......Page 631
Self-Review Exercises......Page 633
Exercises......Page 634
Making a Difference......Page 638
Ch. 14_Strings, Characters and Regular Expressions......Page 639
14.2 Fundamentals of Characters and Strings......Page 640
14.3 Class String......Page 641
14.4 Class StringBuilder......Page 654
14.5 Class Character......Page 661
14.6 Tokenizing Strings......Page 666
14.7 Regular Expressions, Class Pattern and Class Matcher......Page 667
Summary......Page 676
Exercises......Page 679
Special Section: Advanced String-Manipulation Exercises......Page 681
Special Section: Challenging String-Manipulation Projects......Page 684
Ch. 15_Files, Streams and Object Serialization......Page 687
15.2 Files and Streams......Page 688
15.3 Using NIO Classes and Interfaces to Get File and Directory Information......Page 690
15.4 Sequential-Access Text Files......Page 694
15.5 Object Serialization......Page 705
15.6 Opening Files with JFileChooser......Page 713
15.7 (Optional) Additional java.io Classes......Page 716
Summary......Page 719
Self-Review Exercises......Page 722
Exercises......Page 723
Making a Difference......Page 726
Ch. 16_Generic Collections......Page 727
16.2 Collections Overview......Page 728
16.5 Interface Collection and Class Collections......Page 730
16.6 Lists......Page 731
16.7 Collections Methods......Page 739
16.8 Stack Class of Package java.util......Page 751
16.9 Class PriorityQueue and Interface Queue......Page 753
16.10 Sets......Page 754
16.11 Maps......Page 757
16.12 Properties Class......Page 761
16.14 Unmodifiable Collections......Page 764
16.16 Wrap-Up......Page 765
Summary......Page 766
Self-Review Exercises......Page 768
Execises......Page 769
Ch. 17_Java SE 8 Lambdas and Streams......Page 772
17.1 Introduction......Page 773
17.2 Functional Programming Technologies Overview......Page 774
17.3 IntStream Operations......Page 779
17.4 Stream Manipulations......Page 786
17.5 Stream Manipulations......Page 789
17.6 Stream Manipulations......Page 791
17.7 Creating a Stream from a File......Page 801
17.8 Generating Streams of Random Values......Page 804
17.10 Additional Notes on Java SE 8 Interfaces......Page 806
17.12 Wrap-Up......Page 807
Summary......Page 808
Self-Review Exercises......Page 814
Exercises......Page 815
Ch. 18_Recursion......Page 819
18.1 Introduction......Page 820
18.2 Recursion Concepts......Page 821
18.3 Example Using Recursion: Factorials......Page 822
18.4 Reimplementing Class FactorialCalculator Using Class BigInteger......Page 824
18.5 Example Using Recursion: Fibonacci Series......Page 826
18.6 Recursion and the Method-Call Stack......Page 829
18.7 Recursion vs. Iteration......Page 830
18.8 Towers of Hanoi......Page 832
18.9 Fractals......Page 834
18.10 Recursive Backtracking......Page 844
Summary......Page 845
Self-Review Exercises......Page 847
Exercises......Page 848
Ch. 19_Searching, Sorting and Big O......Page 853
19.1 Introduction......Page 854
19.2 Linear Search......Page 855
19.3 Big O Notation......Page 857
19.4 Binary Search......Page 859
19.5 Sorting Algorithms......Page 863
19.6 Selection Sort......Page 864
19.7 Insertion Sort......Page 867
19.8 Merge Sort......Page 870
19.9 Big O Summary for This Chapter’s Searching and Sorting Algorithms......Page 876
Summary......Page 877
Self-Review Exercises......Page 878
Exercises......Page 879
Ch. 20_Generic Classes and Methods......Page 882
20.2 Motivation for Generic Methods......Page 883
20.3 Generic Methods: Implementation and Compile-Time Translation......Page 885
20.4 Additional Compile-Time Translation Issues: Methods That Use a Type Parameter as the Return Type......Page 888
20.5 Overloading Generic Methods......Page 891
20.6 Generic Classes......Page 892
20.8 Wildcards in Methods That Accept Type Parameters......Page 903
Summary......Page 908
Exercises......Page 910
Ch. 21_Custom Generic Data Structures......Page 912
21.1 Introduction......Page 913
21.3 Dynamic Memory Allocation......Page 914
21.4 Linked Lists......Page 915
21.5 Stacks......Page 929
21.6 Queues......Page 933
21.7 Trees......Page 936
Summary......Page 943
Self-Review Exercises......Page 945
Exercises......Page 947
Special Section: Building Your Own Compiler......Page 953
Ch. 22_GUI Components: Part 2......Page 954
22.2 JSlider......Page 955
22.3 Understanding Windows in Java......Page 959
22.4 Using Menus with Frames......Page 960
22.5 JPopupMenu......Page 968
22.6 Pluggable Look-and-Feel......Page 971
22.7 JDesktopPane and JInternalFrame......Page 976
22.8 JTabbedPane......Page 979
22.9 BoxLayout Layout Manager......Page 981
22.10 GridBagLayout Layout Manager......Page 985
Summary......Page 995
Answers to Self-Review Exercises......Page 997
Exercises......Page 998
Ch. 23_Concurrency......Page 1000
23.1 Introduction......Page 1001
23.2 Thread States and Life Cycle......Page 1003
23.3 Creating and Executing Threads with the Executor Framework......Page 1006
23.4 Thread Synchronization......Page 1010
23.5 Producer/Consumer Relationship without Synchronization......Page 1019
23.6 Producer/Consumer Relationship: ArrayBlockingQueue......Page 1027
23.7 (Advanced) Producer/Consumer Relationship with synchronized, wait, notify and notifyAll......Page 1030
23.8 (Advanced) Producer/Consumer Relationship: Bounded Buffers......Page 1037
23.9 (Advanced) Producer/Consumer Relationship: The Lock and Condition Interfaces......Page 1045
23.10 Concurrent Collections......Page 1052
23.11 Multithreading with GUI: SwingWorker......Page 1054
23.12 sort/parallelSort Timings with the Java SE 8 Date/Time API......Page 1068
23.13 Java SE 8: Sequential vs. Parallel Streams......Page 1070
23.14 (Advanced) Interfaces Callable and Future......Page 1073
23.16 Wrap-Up......Page 1077
Summary......Page 1078
Self-Review Exercises......Page 1084
Answers to Self-Review Exercises......Page 1085
Exercises......Page 1086
Ch. 24_Accessing Databases with JDBC......Page 1088
24.1 Introduction......Page 1089
24.2 Relational Databases......Page 1090
24.3 A books Database......Page 1091
24.4 SQL......Page 1095
24.5 Setting up a Java DB Database......Page 1103
24.6 Manipulating Databases with JDBC......Page 1106
24.7 RowSet Interface......Page 1123
24.8 PreparedStatements......Page 1125
24.10 Transaction Processing......Page 1141
Summary......Page 1142
Exercises......Page 1147
Ch. 25_JavaFX GUI: Part 1......Page 1150
25.1 Introduction......Page 1151
25.2 JavaFX Scene Builder and the NetBeans IDE......Page 1152
25.3 JavaFX App Window Structure......Page 1153
25.4 Welcome App—Displaying Text and an Image......Page 1154
25.5 Tip Calculator App—Introduction to Event Handling......Page 1161
25.6 Features Covered in the Online JavaFX Chapters......Page 1176
Summary......Page 1177
Answers to Self-Review Exercises......Page 1181
Making a Difference......Page 1182
Chapters on the Web......Page 1184
A_Operator Precedence Chart......Page 1186
B_ASCII Character Set......Page 1188
C_Keywords and Reserved Words......Page 1189
D_Primitive Types......Page 1190
E_Using the Debugger......Page 1191
E.2 Breakpoints and the run, stop, cont and print Commands......Page 1192
E.3 The print and set Commands......Page 1196
E.4 Controlling Execution Using the step, step up and next Commands......Page 1198
E.5 The watch Command......Page 1201
E.6 The clear Command......Page 1203
E.7 Wrap-Up......Page 1205
Appendices on the Web......Page 1208
Index......Page 1210


📜 SIMILAR VOLUMES


Java How to Program, Early Objects
✍ Paul Deitel; Harvey Deitel 📂 Library 📅 2017 🏛 Pearson 🌐 English

For courses in Java 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 s

Java How to Program, Early Objects
✍ Paul J. Deitel, Harvey Deitel 📂 Library 📅 2017 🏛 Pearson 🌐 English

<p style="margin:0px;"> <i>For courses in Java programming</i> </p> <p style="margin:0px;"> <i> </i> </p> <p style="margin:0px;"> </p> <p style="margin:0px;"> <b>Unparalleled breadth and depth of object-oriented programming concepts</b> </p> <p style="margin:0px;"> </p> <p style="margin:0px;"> </p>

Java How to Program (Early Objects)
✍ Deitel, Harvey M.; Deitel, Paul J 📂 Library 📅 2014;2015 🏛 Pearson 🌐 English

"Java How to Program (Early Objects), " Tenth Edition" is intended for use in the Java programming course. It also serves as a useful reference and self-study tutorial to Java programming." The Deitels' groundbreaking "How to Program" series offers unparalleled breadth and depth of object-oriented p