Tải bản đầy đủ (.pdf) (3,693 trang)

Visual c sharp 2005 how to program, 2nd edition (2005)

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (30.98 MB, 3,693 trang )




Tableof

Contents
• Index

VisualC#®2005:HowtoProgram,Second
Edition
ByH.M.Deitel-Deitel&Associates,Inc.,
P.J.Deitel-Deitel&Associates,Inc.
Publisher :PrenticeHall
PubDate :December15,2005
PrintISBN-10 :0-13-152523-9
PrintISBN-13 :978-0-13-152523-8
eTextISBN-10 :0-13-133214-7
eTextISBN-13 :978-0-13-133214-0
Pages :1648


LearnhowtobuildwinningC#applications,starttofinish,using
theDeitels'provenmethodologyandsignatureLive-Code(tm)
Approach!ThisneweditionincludesextensiveuseofVisual
Studio2005'snewvisualprogrammingtoolsthattremendously
reducetheamountofcodeprogrammersneedtowritein
ADO.NETandASP.NETapplications.Withthesenewtools,
programmerscandeveloppowerfulADO.NETandASP.NET
applicationsquicklyandeasily





VisualC#®2005:HowtoProgram,Second
Edition
ByH.M.Deitel-Deitel&Associates,Inc.,
P.J.Deitel-Deitel&Associates,Inc.
Publisher :PrenticeHall
PubDate :December15,2005

PrintISBN-10 :0-13-152523-9
Tableof PrintISBN-13 :978-0-13-152523-8

Contents eTextISBN-10 :0-13-133214-7
• Index
eTextISBN-13 :978-0-13-133214-0
Pages :1648







































Copyright
Deitel®SeriesPage
Preface
BeforeYouBegin
FeaturesinVisualC#2005HowtoProgram,2/e
TeachingApproach

ATouroftheOptionalCaseStudyonObject-OrientedDesignwiththeUML
TeachingResourcesforVisualC#2005HowtoProgram,2/e
DEITEL®BuzzOnlineFreeE-mailNewsletter
Acknowledgments
AbouttheAuthors
AboutDeitel&Associates,Inc
Chapter1.IntroductiontoComputers,theInternetandVisualC#
Section1.1.Introduction
Section1.2.WhatIsaComputer?
Section1.3.ComputerOrganization
Section1.4.EarlyOperatingSystems
Section1.5.PersonalComputing,DistributedComputingandClient/Server
Computing
Section1.6.HardwareTrends

ii
xxiii
xxiv
xxv
xxix
xxxii
xxxiv
xxxiv
xxxiv
xxxvii
xxxvii
1
2
3
3

4
5
6











































































Section1.7.Microsoft'sWindows®OperatingSystem
Section1.8.MachineLanguages,AssemblyLanguagesandHigh-Level
Languages
Section1.9.C#
Section1.10.C,C++,JavaandVisualBasic
Section1.11.OtherHigh-LevelLanguages
Section1.12.TheInternetandtheWorldWideWeb
Section1.13.ExtensibleMarkupLanguage(XML)
Section1.14.Microsoft's.NET
Section1.15.The.NETFrameworkandtheCommonLanguageRuntime
Section1.16.Test-DrivingaC#Application
Section1.17.(OnlyRequiredSectionoftheCaseStudy)Software
EngineeringCaseStudy:IntroductiontoObjectTechnologyandtheUML
Section1.18.Wrap-Up

Section1.19.WebResources
Summary
Terminology
Self-ReviewExercises
AnswerstoSelf-ReviewExercises
Exercises
Chapter2.IntroductiontotheVisualC#2005ExpressEditionIDE
Section2.1.Introduction
Section2.2.OverviewoftheVisualStudio2005IDE
Section2.3.MenuBarandToolbar
Section2.4.NavigatingtheVisualStudio2005IDE
Section2.5.UsingHelp
Section2.6.UsingVisualProgrammingtoCreateaSimpleProgram
DisplayingTextandanImage
Section2.7.Wrap-Up
Section2.8.WebResources
Summary
Terminology
Self-ReviewExercises
AnswerstoSelf-ReviewExercises
Exercises
Chapter3.IntroductiontoC#Applications
Section3.1.Introduction
Section3.2.ASimpleC#Application:DisplayingaLineofText
Section3.3.CreatingYourSimpleApplicationinVisualC#Express

6
7
9
10

11
12
13
13
14
15
18
24
24
26
30
32
32
33
35
36
36
42
45
51
53
66
67
67
69
70
71
71
76
77

77
83





































































Section3.4.ModifyingYourSimpleC#Application
Section3.5.FormattingTextwithConsole.WriteandConsole.WriteLine
Section3.6.AnotherC#Application:AddingIntegers
Section3.7.MemoryConcepts
Section3.8.Arithmetic
Section3.9.DecisionMaking:EqualityandRelationalOperators
Section3.10.(Optional)SoftwareEngineeringCaseStudy:Examiningthe
ATMRequirementsDocument
Section3.11.Wrap-Up
Summary
Terminology
Self-ReviewExercises
AnswerstoSelf-ReviewExercises
Exercises
Chapter4.IntroductiontoClassesandObjects
Section4.1.Introduction
Section4.2.Classes,Objects,Methods,PropertiesandInstanceVariables
Section4.3.DeclaringaClasswithaMethodandInstantiatinganObjectof
aClass
Section4.4.DeclaringaMethodwithaParameter
Section4.5.InstanceVariablesandProperties

Section4.6.UMLClassDiagramwithaProperty
Section4.7.SoftwareEngineeringwithPropertiesandsetandget
Accessors
Section4.8.ValueTypesvs.ReferenceTypes
Section4.9.InitializingObjectswithConstructors
Section4.10.Floating-PointNumbersandTypedecimal
Section4.11.(Optional)SoftwareEngineeringCaseStudy:Identifyingthe
ClassesintheATMRequirementsDocument
Section4.12.Wrap-Up
Summary
Terminology
Self-ReviewExercises
AnswerstoSelf-ReviewExercises
Exercises
Chapter5.ControlStatements:Part1
Section5.1.Introduction
Section5.2.Algorithms
Section5.3.Pseudocode

90
93
94
98
99
102
106
116
117
119
121

122
123
128
129
129
131
135
138
143
144
145
146
149
156
163
164
167
168
169
170
171
172
172
173















































































Section5.4.ControlStructures
Section5.5.ifSingle-SelectionStatement
Section5.6.if...elseDouble-SelectionStatement
Section5.7.whileRepetitionStatement
Section5.8.FormulatingAlgorithms:Counter-ControlledRepetition
Section5.9.FormulatingAlgorithms:Sentinel-ControlledRepetition
Section5.10.FormulatingAlgorithms:NestedControlStatements
Section5.11.CompoundAssignmentOperators
Section5.12.IncrementandDecrementOperators
Section5.13.SimpleTypes
Section5.14.(Optional)SoftwareEngineeringCaseStudy:Identifying
ClassAttributesintheATMSystem
Section5.15.Wrap-Up
Summary
Terminology
Self-ReviewExercises
AnswerstoSelf-ReviewExercises
Exercises
Chapter6.ControlStatements:Part2
Section6.1.Introduction

Section6.2.EssentialsofCounter-ControlledRepetition
Section6.3.forRepetitionStatement
Section6.4.ExamplesUsingtheforStatement
Section6.5.do...whileRepetitionStatement
Section6.6.switchMultiple-SelectionStatement
Section6.7.breakandcontinueStatements
Section6.8.LogicalOperators
Section6.9.StructuredProgrammingSummary
Section6.10.(Optional)SoftwareEngineeringCaseStudy:Identifying
Objects'StatesandActivitiesintheATMSystem
Section6.11.Wrap-Up
Summary
Terminology
Self-ReviewExercises
AnswerstoSelf-ReviewExercises
Exercises
Chapter7.Methods:ADeeperLook
Section7.1.Introduction
Section7.2.PackagingCodeinC#

173
176
177
182
183
188
196
200
202
204

205
210
210
213
214
215
216
223
224
224
226
230
235
237
244
246
250
258
263
263
265
266
267
268
272
273
274













































































Section7.3.staticMethods,staticVariablesandClassMath
Section7.4.DeclaringMethodswithMultipleParameters
Section7.5.NotesonDeclaringandUsingMethods
Section7.6.MethodCallStackandActivationRecords
Section7.7.ArgumentPromotionandCasting
Section7.8.TheFrameworkClassLibrary
Section7.9.CaseStudy:Random-NumberGeneration
Section7.10.CaseStudy:AGameofChance(IntroducingEnumerations)
Section7.11.ScopeofDeclarations
Section7.12.MethodOverloading
Section7.13.Recursion
Section7.14.PassingArguments:Pass-by-Valuevs.Pass-by-Reference
Section7.15.(Optional)SoftwareEngineeringCaseStudy:Identifying
ClassOperationsintheATMSystem
Section7.16.Wrap-Up
Summary
Terminology
Self-ReviewExercises
AnswerstoSelf-ReviewExercises

Exercises
Chapter8.Arrays
Section8.1.Introduction
Section8.2.Arrays
Section8.3.DeclaringandCreatingArrays
Section8.4.ExamplesUsingArrays
Section8.5.CaseStudy:CardShufflingandDealingSimulation
Section8.6.foreachStatement
Section8.7.PassingArraysandArrayElementstoMethods
Section8.8.PassingArraysbyValueandbyReference
Section8.9.CaseStudy:ClassGradeBookUsinganArraytoStoreGrades
Section8.10.MultidimensionalArrays
Section8.11.CaseStudy:ClassGradeBookUsingaRectangularArray
Section8.12.Variable-LengthArgumentLists
Section8.13.UsingCommand-LineArguments
Section8.14.(Optional)SoftwareEngineeringCaseStudy:Collaboration
AmongObjectsintheATMSystem
Section8.15.Wrap-Up
Summary
Terminology

275
278
282
283
284
286
287
293
298

301
304
307
310
318
318
322
323
325
327
335
336
336
338
339
347
351
353
355
359
363
369
375
377
379
386
387
389














































































Self-ReviewExercises
AnswerstoSelf-ReviewExercises
Exercises
SpecialSection:BuildingYourOwnComputer
Chapter9.ClassesandObjects:ADeeperLook
Section9.1.Introduction
Section9.2.TimeClassCaseStudy
Section9.3.ControllingAccesstoMembers
Section9.4.ReferringtotheCurrentObject'sMemberswiththethis
Reference
Section9.5.Indexers
Section9.6.TimeClassCaseStudy:OverloadedConstructors
Section9.7.DefaultandParameterlessConstructors
Section9.8.Composition
Section9.9.GarbageCollectionandDestructors
Section9.10.staticClassMembers
Section9.11.readonlyInstanceVariables

Section9.12.SoftwareReusability
Section9.13.DataAbstractionandEncapsulation
Section9.14.TimeClassCaseStudy:CreatingClassLibraries
Section9.15.internalAccess
Section9.16.ClassViewandObjectBrowser
Section9.17.(Optional)SoftwareEngineeringCaseStudy:Startingto
ProgramtheClassesoftheATMSystem
Section9.18.Wrap-Up
Summary
Terminology
Self-ReviewExercises
AnswerstoSelf-ReviewExercises
Exercises
Chapter10.Object-OrientedProgramming:Inheritance
Section10.1.Introduction
Section10.2.BaseClassesandDerivedClasses
Section10.3.protectedMembers
Section10.4.RelationshipbetweenBaseClassesandDerivedClasses
Section10.5.ConstructorsinDerivedClasses
Section10.6.SoftwareEngineeringwithInheritance
Section10.7.Classobject
Section10.8.Wrap-Up

390
391
392
401
408
409
410

413
414
417
420
425
426
430
431
436
438
439
441
445
447
448
455
455
459
459
460
460
464
465
466
468
469
494
498
500
502













































































Summary
Terminology
Self-ReviewExercises
AnswerstoSelf-ReviewExercises
Exercises
Chapter11.Polymorphism,Interfaces&OperatorOverloading
Section11.1.Introduction
Section11.2.PolymorphismExamples
Section11.3.DemonstratingPolymorphicBehavior
Section11.4.AbstractClassesandMethods
Section11.5.CaseStudy:PayrollSystemUsingPolymorphism
Section11.6.sealedMethodsandClasses
Section11.7.CaseStudy:CreatingandUsingInterfaces
Section11.8.OperatorOverloading
Section11.9.(Optional)SoftwareEngineeringCaseStudy:Incorporating
InheritanceandPolymorphismintotheATMSystem

Section11.10.Wrap-Up
Summary
Terminology
Self-ReviewExercises
AnswerstoSelf-ReviewExercises
Exercises
Chapter12.ExceptionHandling
Section12.1.Introduction
Section12.2.ExceptionHandlingOverview
Section12.3.Example:DividebyZeroWithoutExceptionHandling
Section12.4.Example:HandlingDivideByZeroExceptionsand
FormatExceptions
Section12.5..NETExceptionHierarchy
Section12.6.finallyBlock
Section12.7.ExceptionProperties
Section12.8.User-DefinedExceptionClasses
Section12.9.Wrap-Up
Summary
Terminology
Self-ReviewExercises
AnswerstoSelf-ReviewExercises
Exercises
Chapter13.GraphicalUserInterfaceConcepts:Part1

502
504
505
505
506
508

509
511
512
515
517
532
533
543
548
556
557
559
559
560
560
562
563
564
564
567
573
574
582
587
590
591
593
593
594
594

596


















































































Section13.1.Introduction
Section13.2.WindowsForms
Section13.3.EventHandling
Section13.4.ControlPropertiesandLayout
Section13.5.Labels,TextBoxesandButtons
Section13.6.GroupBoxesandPanels
Section13.7.CheckBoxesandRadioButtons
Section13.8.PictureBoxes
Section13.9.ToolTips

Section13.10.NumericUpDownControl
Section13.11.Mouse-EventHandling
Section13.12.Keyboard-EventHandling
Section13.13.Wrap-Up
Summary
Terminology
Self-ReviewExercises
AnswersToSelf-ReviewExercises
Exercises
Chapter14.GraphicalUserInterfaceConcepts:Part2
Section14.1.Introduction
Section14.2.Menus
Section14.3.MonthCalendarControl
Section14.4.DateTimePickerControl
Section14.5.LinkLabelControl
Section14.6.ListBoxControl
Section14.7.CheckedListBoxControl
Section14.8.ComboBoxControl
Section14.9.TreeViewControl
Section14.10.ListViewControl
Section14.11.TabControlControl
Section14.12.MultipleDocumentInterface(MDI)Windows
Section14.13.VisualInheritance
Section14.14.User-DefinedControls
Section14.15.Wrap-Up
Summary
Terminology
Self-ReviewExercises
AnswerstoSelf-ReviewExercises
Exercises


597
599
601
608
612
615
618
626
628
631
633
636
639
639
644
645
646
646
648
649
649
659
659
663
667
671
674
678
684

690
695
703
706
709
711
714
716
716
716












































































Chapter15.Multithreading

719

Section15.1.Introduction
Section15.2.ThreadStates:LifeCycleofaThread

Section15.3.ThreadPrioritiesandThreadScheduling
Section15.4.CreatingandExecutingThreads
Section15.5.ThreadSynchronizationandClassMonitor
Section15.6.Producer/ConsumerRelationshipwithoutThread
Synchronization
Section15.7.Producer/ConsumerRelationshipwithThread
Synchronization
Section15.8.Producer/ConsumerRelationship:CircularBuffer
Section15.9.MultithreadingwithGUIs
Section15.10.Wrap-Up
Summary
Terminology
Self-ReviewExercises
AnswerstoSelf-ReviewExercises
Exercises
Chapter16.Strings,CharactersandRegularExpressions
Section16.1.Introduction
Section16.2.FundamentalsofCharactersandStrings
Section16.3.stringConstructors
Section16.4.stringIndexer,LengthPropertyandCopyToMethod
Section16.5.Comparingstrings
Section16.6.LocatingCharactersandSubstringsinstrings
Section16.7.ExtractingSubstringsfromstrings
Section16.8.Concatenatingstrings
Section16.9.MiscellaneousstringMethods
Section16.10.ClassStringBuilder
Section16.11.LengthandCapacityProperties,EnsureCapacityMethod
andIndexerofClassStringBuilder
Section16.12.AppendandAppendFormatMethodsofClassStringBuilder
Section16.13.Insert,RemoveandReplaceMethodsofClassStringBuilder

Section16.14.CharMethods
Section16.15.CardShufflingandDealingSimulation
Section16.16.RegularExpressionsandClassRegex
Section16.17.Wrap-Up
Summary
Terminology

720
721
723
725
728
730
737
745
753
758
758
762
763
764
764
765
766
767
768
769
771
774
776

777
777
779
781
783
785
788
790
794
804
804
807















































































Self-ReviewExercises

AnswerstoSelf-ReviewExercises
Exercises
Chapter17.GraphicsandMultimedia
Section17.1.Introduction
Section17.2.DrawingClassesandtheCoordinateSystem
Section17.3.GraphicsContextsandGraphicsObjects
Section17.4.ColorControl
Section17.5.FontControl
Section17.6.DrawingLines,RectanglesandOvals
Section17.7.DrawingArcs
Section17.8.DrawingPolygonsandPolylines
Section17.9.AdvancedGraphicsCapabilities
Section17.10.IntroductiontoMultimedia
Section17.11.Loading,DisplayingandScalingImages
Section17.12.AnimatingaSeriesofImages
Section17.13.WindowsMediaPlayer
Section17.14.MicrosoftAgent
Section17.15.Wrap-Up
Summary
Terminology
Self-ReviewExercises
AnswerstoSelf-ReviewExercises
Exercises
Chapter18.FilesandStreams
Section18.1.Introduction
Section18.2.DataHierarchy
Section18.3.FilesandStreams
Section18.4.ClassesFileandDirectory
Section18.5.CreatingaSequential-AccessTextFile
Section18.6.ReadingDatafromaSequential-AccessTextFile

Section18.7.Serialization
Section18.8.CreatingaSequential-AccessFileUsingObjectSerialization
Section18.9.ReadingandDeserializingDatafromaSequential-Access
TextFile
Section18.10.Wrap-Up
Summary
Terminology
Self-ReviewExercises

808
808
809
810
811
811
813
814
821
826
829
832
835
840
841
843
854
855
869
869
874

876
876
877
878
879
879
881
882
891
902
912
913
919
923
923
926
927















































































AnswerstoSelf-ReviewExercises
Exercises
Chapter19.ExtensibleMarkupLanguage(XML)
Section19.1.Introduction
Section19.2.XMLBasics
Section19.3.StructuringData
Section19.4.XMLNamespaces
Section19.5.DocumentTypeDefinitions(DTDs)
Section19.6.W3CXMLSchemaDocuments
Section19.7.(Optional)ExtensibleStylesheetLanguageandXSL
Transformations
Section19.8.(Optional)DocumentObjectModel(DOM)
Section19.9.(Optional)SchemaValidationwithClassXmlReader
Section19.10.(Optional)XSLTwithClassXslCompiledTransform
Section19.11.Wrap-Up
Section19.12.WebResources
Summary
Terminology
Self-ReviewExercises
AnswerstoSelf-ReviewExercises
Exercises
Chapter20.Database,SQLandADO.NET
Section20.1.Introduction
Section20.2.RelationalDatabases
Section20.3.RelationalDatabaseOverview:BooksDatabase
Section20.4.SQL
Section20.5.ADO.NETObjectModel

Section20.6.ProgrammingwithADO.NET:ExtractingInformationfroma
Database
Section20.7.QueryingtheBooksDatabase
Section20.8.ProgrammingwithADO.NET:AddressBookCaseStudy
Section20.9.UsingaDataSettoReadandWriteXML
Section20.10.Wrap-Up
Section20.11.WebResources
Summary
Terminology
Self-ReviewExercises
AnswerstoSelf-ReviewExercises
Exercises

928
928
930
931
931
934
941
944
947
954
963
977
980
983
983
985
988

990
991
992
993
994
995
996
1000
1009
1010
1022
1031
1039
1042
1042
1043
1047
1048
1049
1049
















































































Chapter21.ASP.NET2.0,WebFormsandWebControls

1050

Section21.1.Introduction
Section21.2.SimpleHTTPTransactions
Section21.3.MultitierApplicationArchitecture
Section21.4.CreatingandRunningaSimpleWeb-FormExample
Section21.5.WebControls
Section21.6.SessionTracking
Section21.7.CaseStudy:ConnectingtoaDatabaseinASP.NET
Section21.8.CaseStudy:SecureBooksDatabaseApplication
Section21.9.Wrap-Up
Section21.10.WebResources
Summary
Terminology
Self-ReviewExercises
AnswerstoSelf-ReviewExercises
Exercises
Chapter22.WebServices
Section22.1.Introduction
Section22.2..NETWebServicesBasics
Section22.3.SimpleObjectAccessProtocol(SOAP)

Section22.4.PublishingandConsumingWebServices
Section22.5.SessionTrackinginWebServices
Section22.6.UsingWebFormsandWebServices
Section22.7.User-DefinedTypesinWebServices
Section22.8.Wrap-Up
Section22.9.WebResources
Summary
Terminology
Self-ReviewExercises
AnswerstoSelf-ReviewExercises
Exercises
Chapter23.Networking:Streams-BasedSocketsandDatagrams
Section23.1.Introduction
Section23.2.Connection-Orientedvs.ConnectionlessCommunication
Section23.3.ProtocolsforTransportingData
Section23.4.EstablishingaSimpleTCPServer(UsingStreamSockets)
Section23.5.EstablishingaSimpleTCPClient(UsingStreamSockets)
Section23.6.Client/ServerInteractionwithStream-SocketConnections

1051
1052
1054
1055
1070
1092
1110
1122
1151
1152
1153

1159
1161
1162
1162
1163
1164
1165
1172
1174
1190
1204
1212
1222
1222
1223
1228
1228
1229
1229
1231
1232
1233
1233
1234
1236
1236





Section23.7.ConnectionlessClient/ServerInteractionwithDatagrams

1247



Section23.8.Client/ServerTic-Tac-ToeUsingaMultithreadedServer

1252










































































Section23.9.WebBrowserControl
Section23.10..NETRemoting
Section23.11.Wrap-Up
Summary
Terminology
Self-ReviewExercises
AnswerstoSelf-ReviewExercises
Exercises
Chapter24.SearchingandSorting

Section24.1.Introduction
Section24.2.SearchingAlgorithms
Section24.3.SortingAlgorithms
Section24.4.Wrap-Up
Summary
Terminology
Self-ReviewExercises
AnswerstoSelf-ReviewExercises
Exercises
Chapter25.DataStructures
Section25.1.Introduction
Section25.2.Simple-Typestructs,BoxingandUnboxing
Section25.3.Self-ReferentialClasses
Section25.4.LinkedLists
Section25.5.Stacks
Section25.6.Queues
Section25.7.Trees
Section25.8.Wrap-Up
Summary
Terminology
Self-ReviewExercises
AnswerstoSelf-ReviewExercises
Exercises
Chapter26.Generics
Section26.1.Introduction
Section26.2.MotivationforGenericMethods
Section26.3.GenericMethodImplementation

1267
1270

1282
1282
1285
1286
1287
1287
1289
1290
1291
1300
1315
1316
1317
1317
1318
1318
1321
1322
1322
1323
1325
1337
1341
1345
1359
1360
1361
1362
1363
1363

1367
1368
1369
1371




Section26.4.TypeConstraints

1373




Section26.5.OverloadingGenericMethods
Section26.6.GenericClasses

1376
1377






































































Section26.7.NotesonGenericsandInheritance
Section26.8.Wrap-Up

Summary
Terminology
Self-ReviewExercises
AnswerstoSelf-ReviewExercises
Exercises
Chapter27.Collections
Section27.1.Introduction
Section27.2.CollectionsOverview
Section27.3.ClassArrayandEnumerators
Section27.4.Non-GenericCollections
Section27.5.GenericCollections
Section27.6.SynchronizedCollections
Section27.7.Wrap-Up
Summary
Terminology
Self-ReviewExercises
AnswerstoSelf-ReviewExercises
Exercises
AppendixA.OperatorPrecedenceChart
AppendixB.NumberSystems
SectionB.1.Introduction
SectionB.2.AbbreviatingBinaryNumbersasOctalandHexadecimal
Numbers
SectionB.3.ConvertingOctalandHexadecimalNumberstoBinary
Numbers
SectionB.4.ConvertingfromBinary,OctalorHexadecimaltoDecimal
SectionB.5.ConvertingfromDecimaltoBinary,OctalorHexadecimal
SectionB.6.NegativeBinaryNumbers:Two'sComplementNotation
Summary
Terminology

Self-ReviewExercises
AnswerstoSelf-ReviewExercises
Exercises
AppendixC.UsingtheVisualStudio2005Debugger

1386
1386
1387
1389
1389
1390
1390
1392
1393
1394
1396
1400
1411
1418
1419
1419
1421
1422
1423
1423
1425
1427
1428
1431
1432

1432
1433
1435
1436
1437
1437
1438
1439
1440




SectionC.1.Introduction

1441



SectionC.2.BreakpointsandtheContinueCommand

1441



SectionC.3.TheLocalsandWatchWindows

1446







































































SectionC.4.ControllingExecutionUsingtheStepInto,StepOver,Step
OutandContinueCommands
SectionC.5.OtherFeatures
SectionC.6.Wrap-Up
Summary
Terminology
Self-ReviewExercises
AnswerstoSelf-ReviewExercises
AppendixD.ASCIICharacterSet
AppendixE.Unicode®
SectionE.1.Introduction
SectionE.2.UnicodeTransformationFormats
SectionE.3.CharactersandGlyphs
SectionE.4.Advantages/DisadvantagesofUnicode
SectionE.5.UsingUnicode
SectionE.6.CharacterRanges
Summary
Terminology
Self-ReviewExercises
AnswerstoSelf-Reviewexercises
Exercises
AppendixF.IntroductiontoXHTML:Part1
SectionF.1.Introduction
SectionF.2.EditingXHTML

SectionF.3.FirstXHTMLExample
SectionF.4.W3CXHTMLValidationService
SectionF.5.Headers
SectionF.6.Linking
SectionF.7.Images
SectionF.8.SpecialCharactersandMoreLineBreaks
SectionF.9.UnorderedLists
SectionF.10.NestedandOrderedLists
SectionF.11.WebResources
AppendixG.IntroductiontoXHTML:Part2
SectionG.1.Introduction

1449
1452
1456
1457
1458
1458
1458
1459
1460
1461
1462
1463
1463
1464
1466
1467
1469
1469

1470
1470
1471
1472
1472
1473
1476
1477
1479
1481
1485
1487
1489
1491
1492
1493




SectionG.2.BasicXHTMLTables

1493



SectionG.3.IntermediateXHTMLTablesandFormatting

1496





SectionG.4.BasicXHTMLForms
SectionG.5.MoreComplexXHTMLForms

1498
1501

SectionG.6.InternalLinking
SectionG.7.CreatingandUsingImageMaps
SectionG.8.metaElements
SectionG.9.framesetElement
SectionG.10.Nestedframesets
SectionG.11.WebResources
AppendixH.HTML/XHTMLSpecialCharacters
AppendixI.HTML/XHTMLColors
AppendixJ.ATMCaseStudyCode
SectionJ.1.ATMCaseStudyImplementation
SectionJ.2.ClassATM
SectionJ.3.ClassScreen
SectionJ.4.ClassKeypad
SectionJ.5.ClassCashDispenser
SectionJ.6.ClassDepositSlot
SectionJ.7.ClassAccount
SectionJ.8.ClassBankDatabase
SectionJ.9.ClassTransaction
SectionJ.10.ClassBalanceInquiry
SectionJ.11.ClassWithdrawal
SectionJ.12.ClassDeposit

SectionJ.13.ClassATMCaseStudy
SectionJ.14.Wrap-Up
AppendixK.UML2:AdditionalDiagramTypes
SectionK.1.Introduction
SectionK.2.AdditionalDiagramTypes
AppendixL.SimpleTypes
AdditionalSimpleTypeInformation
Index

1508
1511
1514
1516
1520
1522
1523
1524
1527
1527
1528
1534
1535
1535
1537
1537
1540
1542
1544
1545
1549

1552
1552
1554
1554
1554
1556
1556



























































Copyright
[Pageiv]
LibraryofCongressCataloging-in-PublicationDataOnfile
VicePresidentandEditorialDirector,ECS:MarciaJ.
Horton
AssociateEditor:JenniferCappello
AssistantEditor:CaroleSnyder
ExecutiveManagingEditor:VinceO'Brien
ManagingEditor:BobEngelhardt
ProductionEditors:DonnaM.Crilly,MartaSamsel
DirectorofCreativeServices:PaulBelfanti
A/VProductionEditor:XiaohongZhu
ArtStudio:Artworks,York,PA
CreativeDirector:JuanLópez
ArtDirector:KristineCarney
CoverDesign:AbbeyS.Deitel,HarveyM.Deitel,Bob
Depew,KristineCarney


InteriorDesign:HarveyM.Deitel,KristineCarney
ManufacturingManager:AlexisHeydt-Long
ManufacturingBuyer:LisaMcDowell
ExecutiveMarketingManager:RobinO'Brien
MarketingAssistant:BarrieReinhold
©2006byPearsonEducation,Inc.
UpperSaddleRiver,NewJersey07458

Theauthorsandpublisherofthisbookhaveusedtheirbest
effortsinpreparingthisbook.Theseeffortsincludethe
development,research,andtestingofthetheoriesand
programstodeterminetheireffectiveness.Theauthorsand
publishermakenowarrantyofanykind,expressedorimplied,
withregardtotheseprogramsortothedocumentation
containedinthisbook.Theauthorsandpublishershallnotbe
liableinanyeventforincidentalorconsequentialdamagesin
connectionwith,orarisingoutof,thefurnishing,performance,
oruseoftheseprograms.
Manyofthedesignationsusedbymanufacturersandsellersto
distinguishtheirproductsareclaimedastrademarksand
registeredtrademarks.Wherethosedesignationsappearinthis
book,andPrenticeHallandtheauthorswereawareofa
trademarkclaim,thedesignationshavebeenprintedininitial
capsorallcaps.Allproductnamesmentionedremain
trademarksorregisteredtrademarksoftheirrespectiveowners.
Allrightsreserved.Nopartofthisbookmaybereproduced,in
anyformorbyanymeans,withoutpermissioninwritingfrom
thepublisher.


PrintedintheUnitedStatesofAmerica
10987654321
PearsonEducationLtd.,London
PearsonEducationAustraliaPty.Ltd.,Sydney
PearsonEducationSingapore,Pte.Ltd.
PearsonEducationNorthAsiaLtd.,HongKong
PearsonEducationCanada,Inc.,Toronto
PearsonEducaciondeMexico,S.A.deC.V.

PearsonEducationJapan,Tokyo
PearsonEducationMalaysia,Pte.Ltd.
PearsonEducation,Inc.,UpperSaddleRiver,NewJersey

[Pagevi]
Trademarks
Microsoft®VisualStudio®2005areeitherregistered
trademarksortrademarksofMicrosoftCorporationintheUnited
Statesand/orothercountries.
ObjectManagementGroup™,OMG™,UnifiedModeling
Languag™eandUML™aretrademarksofObjectManagement
Group,Inc.

[Pagevii]

Dedication
ToJoséAntonioGonzálezSeco:It'saprivilegeforusto
workwithsuchanextraordinaryandunselfishreviewer.
Extraordinarywithregardtothedepthandbreadthof
yourC#knowledgeandunselfishwithregardtothe
remarkableamountoftimeyoudevotedtohelpingus"get


itright."
HarveyM.DeitelandPaulJ.Deitel


[Pageii]



Deitel®SeriesPage
HowToProgramSeries
AdvancedJava™2PlatformHowtoProgram
CHowtoProgram,4/e
C++HowtoProgram,5/eIncludingCyberClassroom
e-Businessande-CommerceHowtoProgram
InternetandWorldWideWebHowtoProgram,3/e
Java™HowtoProgram,6/eIncludingCyberClassroom
PerlHowtoProgram
PythonHowtoProgram
SmallC++HowtoProgram,5/eIncludingCyberClassroom
SmallJava™HowtoProgram,6/eIncludingCyberClassroom
VisualC++®.NETHowtoProgram
VisualC#®2005HowtoProgram,2/e
VisualBasic®2005HowtoProgram,3/e
WirelessInternet&MobileBusinessHowtoProgram
XMLHowtoProgram

[Pageiii]


SimplySeries
SimplyC++:AnApplication-DrivenTutorialApproach
SimplyC#:AnApplication-DrivenTutorialApproach
SimplyJava™Programming:AnApplication-DrivenTutorial
Approach
SimplyVisualBasic®.NET:AnApplication-DrivenTutorial
Approach(VisualStudio.NET2002Edition)
SimplyVisualBasic®.NET2003:AnApplication-DrivenTutorial
Approach

ComputerScienceSeries
OperatingSystems,3/e
AlsoAvailable
SafariXWebBookswww.SafariX.com
TofollowtheDeitelpublishingprogram,pleaseregisterat:
www.deitel.com/newsletter/subscribe.html
forthefreeDeitel®BuzzOnlinee-mailnewsletter.
Tocommunicatewiththeauthors,sende-mailto:

Forinformationoncorporateon-siteseminarsofferedbyDeitel
&Associates,Inc.worldwide,visit:
www.deitel.com
orwriteto



ForcontinuingupdatesonPrenticeHall/Deitelpublicationsvisit:
www.deitel.com,
www.prenhall.com/deitelor
www.InformIT.com/deitel


×