Beginning C# 2008 Objects: From Concept to Code

Book description

Updated with the latest changes to C#, Beginning C# 2008 Objects: From Concepts to Code introduces complete beginners to C# coding practice with a solid methodological foundation written by two critically-acclaimed experts in the field, already authors of the best-selling Beginning C# Objects.

By building from first principles in object-oriented terminology, then advancing through application design with UML into practical examples, Beginning C# 2008 Objects: From Concepts to Code provides a completely up-to-date foundational guide written from the perspective of two experienced, working authorities on C#.

Working coders will benefit from the object-oriented cast of the book and its section on use-case modeling. This is the book to read if you want to deepen and advance your existing professional development in C# with an eye towards advancing out of pure coding work.

For the reader wishing to "simply learn C#", this book will provide exactly that. In addition to listing code and syntax, Beginning C# 2008 Objects: From Concepts to Code also walks you through the design and architecting of a functioning C# application, showing the "why" and the "how" of the development decisions that go into professional C# coding.

Table of contents

  1. Copyright
  2. Dedication
  3. About the Authors
  4. About the Technical Reviewer
  5. Acknowledgments
  6. Preface
  7. Introduction
  8. The ABCs of Objects
    1. A Little Taste of C#
      1. Getting Hands-On with C#
      2. Why C#?
      3. C# Language Basics
      4. Anatomy of a Simple C# Program
      5. Predefined Types
      6. Variables
      7. Strings
      8. Case Sensitivity
      9. C# Expressions
      10. Implicit Type Conversions and Explicit Casting
      11. Loops and Other Flow of Control Structures
      12. Jump Statements
      13. Code Blocks and Variable Scope
      14. Printing to the Screen
      15. Elements of C# Style
      16. Summary
      17. Exercises
    2. Abstraction and Modeling
      1. Simplification Through Abstraction
      2. Generalization Through Abstraction
      3. Reuse of Abstractions
      4. Inherent Challenges
      5. Summary
      6. Exercises
    3. Objects and Classes
      1. What Is an Object?
      2. State/Fields/Data
      3. Behavior/Operations/Methods
      4. Classes
      5. User-Defined Types and Reference Variables
      6. Instantiating Objects: A Closer Look
      7. Objects As Fields
      8. Association
      9. Three Distinguishing Features of an Object-Oriented Programming Language
      10. Summary
      11. Exercises
    4. Object Interactions
      1. Events Drive Object Collaboration
      2. Declaring Methods
      3. Method Invocation and Dot Notation
      4. Information Hiding/Accessibility
      5. The Power of Encapsulation
      6. Constructors
      7. Summary
      8. Exercises
    5. Relationships Between Objects
      1. Associations and Links
      2. Rules for Deriving Classes: The "Do's"
      3. A Few Words About Multiple Inheritance
      4. Three Distinguishing Features of an Object-Oriented Programming Language, Revisited
      5. Summary
      6. Exercises
    6. Collections of Objects
      1. What Are Collections?
      2. Collections As Method Return Types
      3. Collections of Supertypes
      4. Composite Classes, Revisited
      5. Summary
      6. Exercises
    7. Polymorphism and Some Final Object Concepts
      1. What Is Polymorphism?
      2. Three Distinguishing Features of an OOPL
      3. Abstract Classes
      4. Interfaces
      5. Static Members
      6. Summary
      7. Exercises
  9. Object Modeling 101
    1. The Object Modeling Process in a Nutshell
      1. The "Big Picture" Goal of Object Modeling
      2. Our Object Modeling Process in a Nutshell
      3. Summary
      4. Exercises
    2. Formalizing Requirements Through Use Cases
      1. What Are Use Cases?
      2. Actors
      3. Specifying Use Cases
      4. Matching Up Use Cases with Actors
      5. To Diagram or Not to Diagram?
      6. Summary
      7. Exercises
    3. Modeling the Static/Data Aspects of the System
      1. Identifying Appropriate Classes
      2. Producing a Data Dictionary
      3. Determining Associations Between Classes
      4. Identifying Fields
      5. UML Notation: Modeling the Static Aspects of an Abstraction
      6. Object Diagrams
      7. Information "Flows" Along the Association "Pipeline"
      8. "Mixing and Matching" Relationship Notations
      9. Association Classes
      10. Our Completed Student Registration System Class Diagram
      11. Inheritance or Association?
      12. Summary
      13. Exercises
    4. Modeling the Dynamic/Behavioral Aspects of the System
      1. How Behavior Affects State
      2. Scenarios
      3. Sequence Diagrams
      4. Using Sequence Diagrams to Determine Methods
      5. Collaboration Diagrams
      6. Revised SRS Class Diagram
      7. Summary
      8. Exercises
    5. Wrapping Up Our Modeling Efforts
      1. Testing Your Model
      2. Revisiting Requirements
      3. Reusing Models: A Word About Design Patterns
      4. Summary
      5. Exercises
  10. Translating a UML "Blueprint" into C# Code
    1. A Deeper Look at C#
      1. Namespaces
      2. Strings As Objects
      3. Object Class
      4. Object Self-Referencing with "this"
      5. C#'s Collection Classes
      6. More on Fields
      7. More About the Main Method
      8. Printing to the Screen, Revisited
      9. Constructors, Revisited
      10. More About Inheritance and C#
      11. More on Methods
      12. More on Properties
      13. Object Identities
      14. Object Deletion and Garbage Collection
      15. Attributes
      16. Summary
      17. Exercises
    2. Transforming Our UML Model into C# Code
      1. Getting the Maximum Value Out of This and Subsequent Chapters
      2. Developing Command Line–Driven Applications
      3. The SRS Class Diagram, Revisited
      4. Summary
      5. Exercises
    3. Rounding Out Our Application, Part 1: Adding File Persistence
      1. What Is Persistence?
      2. C# Exception Handling
      3. Reading Data from or Writing Data to a File
      4. General I/O Approach for the SRS Classes
      5. CourseCatalog
      6. Changes to ScheduleOfClasses
      7. Faculty
      8. Course Modifications
      9. The Student Class (Dynamic Data Retrieval; Persisting Object State)
      10. Binary I/O
      11. Revisiting the SRS Class
      12. Summary
      13. Exercises
    4. Rounding Out Our Application, Part 2: Adding a Graphical User Interface
      1. C# GUIs: A Primer
      2. Stage 1: Preparing a Concept of Operations for the SRS GUI
      3. Stage 2: Creating the Look of Our GUI
      4. Stage 3: Adding Functionality Through Event Handling
      5. Summary
      6. Exercises
    5. Next Steps
      1. Our Tried-and-True Approach to Learning C# Properly
      2. Recommended Reading
      3. Your Comments, Please!
    6. Installing .NET and Compiling C# Programs
      1. Using the Online .NET Framework Documentation
      2. Downloading the .NET Framework Software Development Kit
      3. Odds and Ends Tips to Get C# to Work Properly
      4. Object Modeling Tools
      5. Compiling and Running C# Programs
    7. Downloading and Compiling the SRS Source Code
  11. Index

Product information

  • Title: Beginning C# 2008 Objects: From Concept to Code
  • Author(s): Jacquie Barker, Grant Palmer
  • Release date: October 2008
  • Publisher(s): Apress
  • ISBN: 9781430210887