Team LiB
Previous Section Next Section

Index

C

C#
as part of .NET Framework, 5
basics, 7
case sensitivity, 16
code blocks, 37
collection classes, 474
compiling and running programs, 424
source code files, 425
entering programs into file, 786
escape sequences, 42
event model, 716
exception handling, 452
explicit casting, 22
expressions, 16
evaluating and operator precedence, 20
logical operators, 21
messages, 105
flow control, 24
do statements, 35
for statements, 30
if statements, 24
jump statements, 36
switch statements, 27
while statements, 33
foreach loop, 496
implicit type conversions, 22
inheritance, 517
keywords, complete list, 793
OOP and, 6
predefined types, 11
strings, 15
variables, 12
programming environment, 424
recommendations for learning, 764
SDK, 548
simple program, 8
class declarations, 10
comments, 9
Main method, 10
specifying namespaces used, 8
strongly typed, 11
style, 43
braces, 48
comments, 46
indentation, 43
variables, 50
suitability as teaching language, 772
syntax, 3
teaching approaches, 771
recommendations, 773
terminology, 422
tips to get C# working properly, 784
Path environment variable, setting, 785
variables, 12
scope, 37
CalculateGPA method
Student class, 486
Camel case, 13, 76
when to use, 125
candidate class lists
use cases revisited, 335
Capacity property
ArrayList class, 480
case keyword, 793
case sensitivity, 16
case studies
Blue Skies airline reservation system, 781
conference room reservation system, 777
prescription tracking system, 775
CASE tools
advantages of using, 302
drawbacks, 304
casting
collections and, 486
object identities, 536
catch blocks, 453
sequential evaluation of, 458
catch keyword, 793
cd command, 427
char keyword, 793
char type, 12
checked keyword, 793
class declarations, 10
class diagrams, 343
association classes, 369
Student Registration System example, 372, 405, 548
class hierarchies, 178
ancestor classes, 178
cascading changes through, 181
descendant classes, 178
nodes, 178
parent classes, 178
root node, 178
terminal class, 178
class keyword, 10, 793
classes, 58, 74
abstract, 248
accessing features from methods, 122
association classes, 333
associations, 160
determining, 338
attributes, accessing from within class's own methods, 148
boundary, 397
candidate class lists
use cases revisited, 335
compared to objects, 77
composite, 86, 230
contracts, 124
determining class object belongs to, 537
domain classes, 331
features and members, 76
fully qualified names, 438
helper, 426
identifying appropriate objects for model, 322
identifying attributes, 343
implementation classes, 331
implementation requirements, enforcing, 255
inheritance, 168
instantiation, 76
interfaces, 256
implementing several, 264
naming conventions, 76
avoiding names that imply roles, 327
overloading methods, 188
relationships between, 347
rules for deriving, 181
what not to do, 186
sharing information across, 713
simple names, 438
static attributes, 271
static methods, 277
static properties, 275
subclasses of abstract classes, 254
testing if worthy of implementation, 330
UML notation of, 343
classification, 57
Clear method
Array class, 476
ArrayList class, 482
Hashtable class, 485
ListBox.ObjectCollections class, 706
Click event
Button class, 723, 746
client code
accessing properties from, 136
clients, objects as, 116
CLR (common language runtime), 5
Coad, Peter, 297
code blocks, 37
Coleman, Derek, 297
collaboration diagrams, 395, 404
collections, 201
Array class, 556
ArrayList class, 556
arrays as, 205
as method return types, 97, 227
as object references, 203
casting and, 486
common features, 204
composite classes, 230
defined by classes, 204
dictionaries, 219
encapsulation, 205, 625
extending, 222
Hashtable class, 556
implemented as objects, 202
initializing with data from ASCII files, 621
instantiation, 202
iterating through, 211
keys, 219
land mines, 211
of handles, 220
of supertypes, 228
ordered lists, 216
populating, 620
recycling reference variables, 209
referring to objects in, 210
sets, 218
sorted ordered lists, 217
stepping through with enumeration objects, 489
types of, 215
user-defined types, 221
approaches, 221
wrapper classes, 223
CollectionWrapper class, 625
initializeObjects method, 626
ParseData method, 627, 629
ParseData2 method, 627, 629
Command Prompt window
cd command, 427
command-line arguments
as control flags, 504
Main method, 502
reading, 502
command-line driven applications
developing, 501
keyboard input, 505
command-line prompts
file names and, 790
problems, 789
comments, 9
using wisely, 46
common language runtime, 5
Common Type System. See CTS
compiler-mandated exception handling, 465
compiling
conventional compilation, 435
MSIL, 436
simple example, 427
compiling multi-class applications, 428
applications with multiple Main methods, 433
combining .cs and .dll files, 431
compiling from .cs to .dll, 430
compiling from .cs to .exe files, 429
different paths from source to executable, 432
naming resultant executable, 433
components
GUIs, 668
objects, 167
relationship with containers and objects, 670
composite classes, 86
collections as data type, 230
Computer Aided Software Engineering. See CASE tools
concept of operations document, 677
building GUIs, 676
conceptual objects, 70
concrete classes, 250
concrete methods, 252
Conference Room Reservation System
abstraction, 68
background, 777
goals for system, 779
ConfirmSeatAvailability method
Section class, 580
Console class
methods
ReadLine method, 505, 507
Write method, 41, 506-508, 618
WriteLine method, 39, 283, 473, 507, 618
System namespace, 283, 551
const keyword, 794
declaring constants, 285
constructors, 151, 510
default, 151
inheriting, 522
overloading, 511
passing arguments to, 153
replacing default parameterless constructor, 512
reusing constructor code within a class, 515
this keyword, 515
writing, 152
containers, 670
Contains method
ArrayList class, 482, 556
ContainsKey method
Hashtable class, 485
ContainsValue method
Hashtable class, 485
continue keyword, 794
continue statements, 36
contracts, 124
Control class
Left property, 698
Top property, 698
control flags
command-line arguments, 504
controllers, 673
Controls property
Form class, 700, 704
Controls.ControlCollection class
Add method, 700
Convert class
System namespace, 633
ToDouble method, 633
CopyTo method
ICollection interface, 494
Count property
ArrayList class, 480
Hashtable class, 484
Course class, 568
methods
GetPrerequisites method, 570
HasPrerequisites method, 569
ScheduleSection method, 570
modifications, 643
services, 584
CourseCatalog class
constructor, 631
methods
AddCourse method, 632
Display method, 631
FindCourse method, 634
ParseData method, 632
ParseData2 method, 634
Student Registration System example, 626, 630
testing, 636
CourseCatalog.dat
Student Registration System example, 621
CTS (Common Type System), 12
Current property
IEnumerator interface, 491

Team LiB
Previous Section Next Section