Beruflich Dokumente
Kultur Dokumente
Chapters 2431 and Appendices DG are PDF documents posted online at the books Companion Website (located at www.pearsonhighered.com/deitel/).
xvii xxvii 1
2 2 4 4 4 5 6 6 7 7 8 9 9 10 12 15 15
1
1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1.10 1.11 1.12 1.13 1.14 1.15 1.16 1.17
2
2.1 2.2 2.3 2.4
24
25 25 30 32 34 35 36 37
2.5
Contents Using Visual Programming to Create a Simple Program that Displays Text and an Image Wrap-Up Web Resources
40 51 52
3
3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 3.10
Introduction to C# Applications
Introduction A Simple C# Application: Displaying a Line of Text Creating a Simple Application in Visual C# Express Modifying Your Simple C# Application Formatting Text with Console.Write and Console.WriteLine Another C# Application: Adding Integers Memory Concepts Arithmetic Decision Making: Equality and Relational Operators Wrap-Up
60
61 61 66 74 76 77 81 82 85 90
4
4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10 4.11 4.12
101
102 102 103 107 111 115 116 117 118 119 122 128
5
5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 5.10 5.11
136
137 137 138 138 140 141 146 147 152 160 165
Contents 5.12 5.13 5.14 Increment and Decrement Operators Simple Types Wrap-Up
6
6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9 6.10
183
184 184 186 190 194 196 203 205 211 216
7
7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 7.9 7.10 7.11 7.12 7.13 7.14 7.15 7.16 7.17
226
227 227
229
232 236 237 237 239 241 245 245 246 251 253 256 257 258 261 264
8
8.1 8.2 8.3 8.4 8.5 8.6
Arrays
Introduction Arrays Declaring and Creating Arrays Examples Using Arrays Case Study: Card Shuffling and Dealing Simulation foreach Statement
280
281 281 282 284 293 298
Contents Passing Arrays and Array Elements to Methods Passing Arrays by Value and by Reference Case Study: Class GradeBook Using an Array to Store Grades Multidimensional Arrays Case Study: Class GradeBook Using a Rectangular Array Variable-Length Argument Lists Using Command-Line Arguments Wrap-Up 299 301 305 310 315 321 322 324
9
9.1 9.2 9.3 9.4 9.5 9.6 9.7
10
10.1 10.2 10.3 10.4 10.5 10.6 10.7 10.8 10.9 10.10 10.11 10.12 10.13 10.14
364
365 365 369 370 372 378 379 382 383 386 388 389 391 391
11
11.1 11.2 11.3 11.4
398
399 400 402 403 403 408 414
Contents
CommissionEmployeeBasePlusCommissionEmployee Inheritance Hierarchy Using protected Instance Variables 11.4.5 CommissionEmployeeBasePlusCommissionEmployee Inheritance Hierarchy Using private Instance Variables Constructors in Derived Classes Software Engineering with Inheritance Class object Wrap-Up
xi
11.4.4
12
12.1 12.2 12.3 12.4 12.5
435
436 438 439 442 444 445 448 449 451 452 454 459 460 460 462 463 463 465 466 468 470 471 474
12.6 12.7
12.8 12.9
12.5.6 Polymorphic Processing, Operator is and Downcasting 12.5.7 Summary of the Allowed Assignments Between Base-Class and Derived-Class Variables sealed Methods and Classes Case Study: Creating and Using Interfaces 12.7.1 Developing an IPayable Hierarchy 12.7.2 Declaring Interface IPayable 12.7.3 Creating Class Invoice 12.7.4 Modifying Class Employee to Implement Interface IPayable 12.7.5 Modifying Class SalariedEmployee for Use with IPayable 12.7.6 Using Interface IPayable to Process Invoices and Employees Polymorphically 12.7.7 Common Interfaces of the .NET Framework Class Library Operator Overloading Wrap-Up
13
13.1 13.2 13.3
479
480 480 483 485 486
xii
Contents 13.3.3 Uncaught Exceptions 13.3.4 Termination Model of Exception Handling 13.3.5 Flow of Control When Exceptions Occur .NET Exception Hierarchy 13.4.1 Class SystemException 13.4.2 Determining Which Exceptions a Method Throws finally Block The using Statement Exception Properties User-Defined Exception Classes Wrap-Up 486 487 488 488 488 489 490 496 497 502 505
13.4
14
14.1 14.2 14.3
510
511 512 514 514 516 518 519 519 521 525 528 531 539 541 543 545 548 551
14.4 14.5 14.6 14.7 14.8 14.9 14.10 14.11 14.12 14.13
15
15.1 15.2 15.3 15.4 15.5 15.6 15.7 15.8 15.9
561
562 562 571 572 575 579 583 586 590
Contents 15.10 15.11 15.12 15.13 15.14 15.15 Control Control Multiple Document Interface (MDI) Windows Visual Inheritance User-Defined Controls Wrap-Up
ListView TabControl
16
16.1 16.2 16.3 16.4 16.5 16.6 16.7 16.8 16.9 16.10 16.11 16.12 16.13 16.14 16.15 16.16
630
631 632 633 634 635 638 641 642 643 644 645 647 649 652 654 655
17
17.1 17.2 17.3 17.4 17.5 17.6 17.7 17.8 17.9 17.10 17.11
661
662 662 664 665 674 683 687 693 694 698 700
18
18.1 18.2 18.3 18.4
707
708 709 710 713
xiv 18.5
Contents 714 715 718 722 723 723 725 731 732 733 736 738 739 741 742
Querying a Database with LINQ 18.5.1 Creating LINQ to SQL Classes 18.5.2 Data Bindings Between Controls and the LINQ to SQL Classes 18.6 Dynamically Binding Query Results 18.6.1 Creating the Display Query Results GUI 18.6.2 Coding the Display Query Results Application 18.7 Retrieving Data from Multiple Tables with LINQ 18.8 Creating a Master/Detail View Application 18.8.1 Creating the Master/Detail GUI 18.8.2 Coding the Master/Detail Application 18.9 Address Book Case Study 18.9.1 Creating the Address Book Applications GUI 18.9.2 Coding the Address Book Application 18.10 Tools and Web Resources 18.11 Wrap-Up
19
19.1 19.2 19.3 19.4
748
749 750 751 753 755 764 764 769 775 776
777
Introduction Web Basics Multitier Application Architecture Your First Web Application 19.4.1 Building the WebTime Application 19.4.2 Examining WebTime.aspxs Code-Behind File 19.5 Standard Web Controls: Designing a Form 19.6 Validation Controls 19.7 Session Tracking 19.7.1 Cookies 19.7.2 Session Tracking with HttpSessionState 19.7.3 Options.aspx: Selecting a Programming Language 19.7.4 Recommendations.aspx: Displaying Recommendations Based on Session Values 19.8 Case Study: Database-Driven ASP.NET Guestbook 19.8.1 Building a Web Form that Displays Data from a Database 19.8.2 Modifying the Code-Behind File for the Guestbook Application 19.9 Online Case Study: ASP.NET AJAX 19.10 Online Case Study: Password-Protected Books Database Application 19.11 Wrap-Up
20
20.1 20.2 20.3
799
800 801 801 805 810 810
Contents 20.3.2 Insertion Sort 20.3.3 Merge Sort Summary of the Efficiency of Searching and Sorting Algorithms Wrap-Up
20.4 20.5
21
21.1 21.2 21.3 21.4 21.5 21.6 21.7
Data Structures
Introduction Simple-Type structs, Boxing and Unboxing Self-Referential Classes Linked Lists Stacks Queues Trees 21.7.1 Binary Search Tree of Integer Values 21.7.2 Binary Search Tree of IComparable Objects Wrap-Up
830
831 831 832 833 846 850 853 854 861 866
21.8
22
22.1 22.2 22.3 22.4 22.5 22.6 22.7
Generics
Introduction Motivation for Generic Methods Generic-Method Implementation Type Constraints Overloading Generic Methods Generic Classes Wrap-Up
873
874 875 877 880 882 883 892
23
23.1 23.2 23.3 23.4
Collections
Introduction Collections Overview Class Array and Enumerators Nongeneric Collections 23.4.1 Class ArrayList 23.4.2 Class Stack 23.4.3 Class Hashtable Generic Collections 23.5.1 Generic Class SortedDictionary 23.5.2 Generic Class LinkedList Covariance and Contravariance for Generic Types Wrap-Up
898
899 899 902 905 905 909 912 917 917 919 923 925
23.5
23.6 23.7
932
xvi
Contents
A B C
Chapters 2431 and Appendices DG are PDF documents posted online at the books Companion Website (located at www.pearsonhighered.com/deitel/).
24 25 26 27 28 29 30 31 D E F G
GUI with Windows Presentation Foundation WPF Graphics and Multimedia XML and LINQ to XML Web App Development with ASP.NET: A Deeper Look Windows Communication Foundation (WCF) Web Services Silverlight and Rich Internet Applications ATM Case Study, Part 1: Object-Oriented Design with the UML ATM Case Study, Part 2: Implementing an Object-Oriented Design Number Systems UML 2: Additional Diagram Types Unicode Using the Visual C# 2010 Debugger