| |
| |
Introduction | |
| |
| |
| |
Computers and Computer Programming: Basic Concepts | |
| |
| |
C# Is an Object-Oriented Programming Language | |
| |
| |
Hardware | |
| |
| |
Software | |
| |
| |
Summary | |
| |
| |
Review Questions | |
| |
| |
| |
Your First C# Program | |
| |
| |
Software Development | |
| |
| |
The Software Development Process | |
| |
| |
Algorithms and Pseudocode | |
| |
| |
The Three Different Types of Errors | |
| |
| |
Object-Oriented Programming: A First Encounter | |
| |
| |
Software Reuse | |
| |
| |
The Assembly, the Basic Unit of Code Reuse in .NET | |
| |
| |
The .NET Framework Class Library | |
| |
| |
C#: History and Design Goals | |
| |
| |
C#'s Background | |
| |
| |
C#'s Design Goals | |
| |
| |
What Kind of Programs Can I Write with C#? The Mechanics of Creating a C# Program | |
| |
| |
Before Getting Started | |
| |
| |
Choosing a Text Editor | |
| |
| |
The Seven Steps to Writing a Simple C# Program | |
| |
| |
A Brief Source Code Analysis | |
| |
| |
Note on Syntax Errors and Compilers | |
| |
| |
Summary | |
| |
| |
Review Questions | |
| |
| |
Programming Exercises | |
| |
| |
3 | |
| |
| |
Introduction | |
| |
| |
Abstraction and Encapsulation | |
| |
| |
An Interactive Hello World! Program | |
| |
| |
Summary | |
| |
| |
Review Questions | |
| |
| |
Programming Exercises | |
| |
| |
| |
A Guided Tour through C#: Part II | |
| |
| |
Introduction | |
| |
| |
Essential Elements of SimpleCalculator.cs | |
| |
| |
Simplifying Your Code with Methods | |
| |
| |
Methods as Building Blocks: Encapsulating Your Helper Methods with the private keyword | |
| |
| |
Summary | |
| |
| |
Review Questions | |
| |
| |
Programming Exercises | |
| |
| |
| |
Your First Object-Oriented C# Program | |
| |
| |
Introduction | |
| |
| |
Lexical Structure | |
| |
| |
Some Thoughts on Elevator Simulations | |
| |
| |
Concepts, Goals and Solutions in an Elevator Simulation Program: Collecting Valuable Statistics for Evaluating an Elevator System | |
| |
| |
Object-Oriented Programming: A Practical Example | |
| |
| |
Summary | |
| |
| |
Review Questions | |
| |
| |
Programming Exercises | |
| |
| |
| |
Types Part I: The Simple Types | |
| |
| |
Introduction | |
| |
| |
Types in C#: An Overview | |
| |
| |
Simple Types | |
| |
| |
The Blipos Clock | |
| |
| |
Summary | |
| |
| |
Review Questions | |
| |
| |
Programming Exercises | |
| |
| |
| |
Types Part II: Operators, Enumerators, and Strings | |
| |
| |
Introduction | |
| |
| |
Arithmetic Operators and Numerical Expressions | |
| |
| |
Associativity | |
| |
| |
Parentheses and Precedence | |
| |
| |
The Modulus Operator (%) | |
| |
| |
Unary Operators | |
| |
| |
Determining the Type of an Expression | |
| |
| |
Combining Different Types in One Expression | |
| |
| |
Accessing the Metadata of a Component: A Brief Introduction | |
| |
| |
Enumerated Constants | |
| |
| |
Enumerator Operators | |
| |
| |
Conversions | |
| |
| |
The Methods of System.Enum | |
| |
| |
Characters and Text | |
| |
| |
The char Type | |
| |
| |
The string type | |
| |
| |
Summary | |
| |
| |
Review Questions | |
| |
| |
Programming Exercises | |
| |
| |
| |
Flow of Control Part I: Branching Statements and Related Concepts | |
| |
| |
Introduction to Flow of Control | |
| |
| |
Branching with the if Statement | |
| |
| |
Comparison Operators and Boolean Expressions | |
| |
| |
Nested if Statements | |
| |
| |
Multibranch if-else Statements | |
| |
| |
Logical Operators | |
| |
| |
The Scope of Variables | |
| |
| |
The goto Statement | |
| |
| |
The switch Statement | |
| |
| |
The Conditional Operator | |
| |
| |
Summary | |
| |
| |
Review Questions | |
| |
| |
Programming Exercises | |
| |
| |
| |
Flow of Control Part II: Iteration Statements | |
| |
| |
Traversing, Analyzing, and Generating Sequences of Data | |
| |
| |
The while Loop Statement | |
| |
| |
The do-while Loop Statement | |
| |
| |
The for Loop Statement | |
| |
| |
The Jump Statements break and continue | |
| |
| |
Structured Programming and Structured Constructs | |
| |
| |
Combination Assignment Operators | |
| |
| |
Nested Iteration Statements | |
| |
| |
Programming Exercises | |
| |
| |
Summary | |
| |
| |
Review Questions | |
| |
| |
Programming Exercises | |
| |
| |
| |
Arrays Part I: Array Essentials | |
| |
| |
Declaring and Defining an Array | |
| |
| |
Accessing Individual Array Elements | |
| |
| |
Array Indexes Out of Range | |
| |
| |
Adjusting for the Zero-Based Array Index | |
| |
| |
Initializing Arrays | |
| |
| |
Traversing an Entire Array with the foreach Statement | |
| |
| |
System.Array Is a Reference Type | |
| |
| |
Arrays and Equality | |
| |
| |
Arrays and Methods | |