Introduction To Object-Oriented Programming Using C#: An Information Systems Approach
Introduction To Object-Oriented Programming Using C#: An Information Systems Approach
Introduction To Object-Oriented Programming Using C#: An Information Systems Approach
Tentative Title:
Introduction to Object-Oriented Programming Using C#:
Tentative Subtitle1:
An Information Systems Approach
Definition of Topic and/or Product with Technology Details and Statistics (Installed User Base, etc.):
Today’s market has many programming language/tool alternatives for desktop and web application
development. In the recent past, Java drew considerable interest while Visual Basic held on to a strong
constituency. However, C# has quickly become the fastest growing programming language, and that trend
is expected to continue in the coming years based on reports published by Gartner and DeveloperIQ.
While Visual Basic is widely-accepted as an easy language for beginners to learn, many opponents
question its potential for complex systems. On the other hand, C++ and Java are favorites for complex
application development, but tend to be more challenging for a beginner to learn.
Microsoft has either been extremely good at predicting the market or extremely good at driving the
market. Either way, its operating systems and languages have driven the PC market since the advent of
MS-DOS and Basic-80 in the early 1980’s. That dominance has not diminished much over the years,
despite efforts by competitors and the US Justice Department. The Introduction of Visual Studio .NET
(VSN) is an effort to continue that aggressive lead by providing a complete suite of programming
languages and tools in one package.
While there is no definitive statistic for the installed base for VSN, the authors’ educated guess is that it is
approximately 3 to 5 million copies. Microsoft has aggressively marketed VSN and has signed numerous
student licensing agreements with many major institutions. These agreements allow VSN to be purchased
for as little as $10. It is difficult to know how many student copies exist.
The low-cost availability of the VSN tool coupled with the abundance of Visual Basic.Net programming
textbooks may explain why many academic institutions teach Visual Basic (.NET) in their introductory
programming courses. Visual Basic, however, suffers from a reputation of being limited to simple
programming tasks, despite the proven ability of proficient VB programmers to develop complex,
enterprise-based applications. Nonetheless, there are many computing curricula that opt to use C++ or
Java in their programming courses. C# has been touted by Microsoft as a language that combines the
elegance of C++ with the productivity enhancements offered by Visual Basic, resulting in significant
productivity enhancements for the developer building complex software applications. Further, the
similarities of C# to Java make it easier for a student to move from C# to Java.
The entire .NET paradigm of a single integrated development environment (IDE) for all of its languages
and tools makes it very difficult for any would-be competitor to duplicate the same toolset. The changes in
the IDE also are designed to make web-based development that much easier. Indeed, the fact that a single
IDE supports not only C#, but also Visual Basic, C++, and ASP provides a “cradle-to-grave, one-stop-
shopping” set of tools for the programmer. All of these facts suggest academe has motivation to move
from Visual Basic and Java to C# in programming curricula.
The book is designed to be an introductory computer programming text for Information Systems,
Information Technology and other application-oriented curricula. While thousands of introductory
programming texts exist, we have found none that combine the three elements that account for the
uniqueness of our book:
Teach computer programming from an application developer perspective, rather than the computer
science approach of how programming languages and compilers work,
1
teach Object Oriented Programming (OOP) by integrating it throughout the text, rather than
“grafting” a chapter on to the end as we’ve found in many other texts,
and finally, use C# as the programming language to teach concepts and techniques.
The authors believe in the “learning by doing” approach, so realistic, business-oriented examples will be
used throughout the text to illustrate concepts and how to apply them. Related explanations will help
students understand why things work as they do.
Where applicable, chapters will be divided into two sections. The first section will cover the fundamentals
of that chapter’s subject. The second section will delve deep into the subject area for students and
instructors who wish to learn more detailed information. For example, the first section in the chapter on
persistence using files will cover simple, tab-delimited text files, and the second section will cover binary,
random-access files. Similarly, the first section in the chapter on iterations (i.e. looping) will contain the
familiar while and for next constructs, and the second section will cover nested loops.
We believe this two-part chapter approach has several benefits. It shortens the length of the topics into
more easily digestible portions. It allows the reader a chance to understand the general concepts before
delving into the gritty details. More importantly, it gives course instructors flexibility in how to use the
text to best fit the course audience. For example, one instructor may choose to use only the first section of
each chapter, while another instructor may choose to use the first section of some chapters and both
sections of others.
The proposed book will apply OOP techniques in a consistent fashion throughout the text. This approach
begins with a simple, yet (we believe) effective, introduction to the fundamental concepts of OOP. The
initial introduction stresses the concept of objects while the topics of encapsulation, polymorphism, and
inheritance are discussed later in the text. Because we envision this as serving a one semester introductory
course, we think the emphasis should be on the encapsulation aspects of OOP (i.e., “data hiding” as it
applies to object properties and methods). This emphasis enables us: 1) to provide the novice programmer
with the appropriate mindset necessary to successfully use OOP techniques and 2) to “convert” the student
with structured programming experience to the OOP paradigm.
Students will have the opportunity to apply learned concepts by completing end-of-chapter programming
exercises. Sidebars will also be used where appropriate to discuss 1) tips, 2) techniques, and 3) common
programming mistakes. Different icons will be used to signal which type of sidebar is being presented.
This is a common (and useful) teaching technique used in many programming texts. After completing the
book, the student should be able to both explain OOP concepts as well as develop practical/useful
programs written in C#. Further, the student should feel confident if moving to an advanced course.
We leave it to the publisher to determine whether, for marketing purposes, a code examples CD or a
supplemental website are needed. At least one of the authors is willing to negotiate with the publisher to
provide data for the website. The authors do agree that the website may be a more cost-effective way to
update the code or communicate errata if that is deemed necessary. Development of additional teaching
materials may also be negotiated separately with any of the authors, if desired.
1. Introduction
a. Terminology
i. source code
ii. compiler
iii. executable
iv. IDE
b. Visual Studio Primer
2
c. Elements of a simple program – the idea is to show a complete program and provide a brief
discussion of the following topics.
i. operators
ii. operands
iii. expressions
iv. statements
v. comments
vi. decisions/if
vii. input
viii. data validation
ix. type conversions
x. objects
xi. textboxes
xii. button
xiii. labels
xiv. forms
xv. events
xvi. initialization
xvii. variables
While this may seem ambitious, we’ve used this technique in the classroom and it
works. Further, it gives us a base from which to expand the detail and complexity
while still providing a framework for writing a “real” program.
d. Debugging – This will be at a very basic level at this point…enough to set a breakpoint,
single-step the program, and inspect the value of a variable.
2. Data
a. Types – which type to use
i. Introduce the object.property and object.method notation.
ii. String concatenation
b. Variable names
c. Type conversions – why it is important
d. Formatting numbers
e. More on debugging.
3. Arithmetic Operators
a. Introduce import keyword used in a math example.
b. Operator, hierarchy, precedence, parentheses
4. Logical Operators and Decisions
a. Truth tables
b. if-else, switch, ternary operator
c. Data validation and error handling
d. MessageBox
5. Exceptions and Debugging
6. Modularity/Methods
a. Design methodologies – the Five Program Steps, UML notation
b. Micro versus macro design, Sideways refinement, pseudo code
c. Algorithms?
7. ListBoxes and Loops
a. The three conditions for a well-behaved loop. (ill-behaved loops)
b. while
c. for
d. break
e. nested loops
8. Arrays/Lists/Collections
a. Arrays as lists, arrays as tables, arrays as cubes, arrays as headaches
b. for each
c. collections versus arrays
9. Encapsulation
a. State – private, public, protected access specifiers—why each exists
b. Behavior
3
c. Constructor
d. Garbage Collection
10. Multiple Forms
a. Instantiating and showing other forms
b. Modal vs. non-modal forms (dialog)
c. Sharing data between forms
11. Persistence Using Data Files
a. Tabbed-delimited text files
b. OpenFileDialog & SaveFileDialog
c. Binary files
d. Using the printer object and redirecting output
12. Database Connectivity
a. Datagrid
b. Database Connectivity with ADO.NET and SQL
13. Inheritance & Polymorphism
a. Inheritance
b. Classes versus subclasses
c. Messages
d. Method overriding
e. Virtual classes
f. Interfaces
Page Count:
There are so many factors that can impact the page count (e.g., usage of white space, font, tables and
figures, etc.) that it is difficult to estimate this. However, from the point of view of student reading
assignments, we prefer to keep each chapter page count between 23-39 pages and expect the appendices to
be between 20-30 pages. This implies approximately 320-540 pages for the entire text.
Audience Profile:
This will be used by instructors who teach introductory computer programming courses in Information
Systems, Information Technology and other application-oriented curricula who are looking for an easy-to-
use alternative to Visual Basic, C++, or Java.
Secondary audience: High school students or anyone wishing to learn C# as a first or subsequent object-
oriented programming language
Ideal Reader:
The ideal reader for this book would be an undergraduate student with no prior computer programming
experience in an Information Systems, Information Technology and other application-oriented curricula.
There are many C# books on the market but none are college textbooks that combine the three elements
that account for the uniqueness of our book. First, most of the existing books are targeted toward
experienced, professional programmers who simple wish to learn the syntax of C#. These titles will tend
4
to confuse the novice programmer. Second, a few are designed for beginners, but are targeted toward
computer science curricula and focus on language syntax and how the language and compiler works,
rather than how to use it to solve business-related problems. And third, we feel our approach of
integrating OOP throughout the book and abundant, illustrative examples will give the novice learner a
more complete understanding of OOP than what is possible with most of the competing titles.
Additionally we hope to develop our text using the “Whidbey” release of Visual Studio .NET. Whidbey is
the code name for the current alpha release of Visual Studio that is scheduled to be released late 2004.
Although information about Whidbey is sketchy due to its newness, there are numerous enhancements to
most elements of Visual Studio. Our text will concentrate on the enhancements that pertain to C#.
Someone would purchase the proposed text for one, some or all of the reasons below:
1. It will help the novice learn C# and object-oriented programming.
2. It can be used as an alternative to using Visual Basic to teach introductory computer
programming in an engaging manner.
3. It will teach the reader how to develop non-trivial Windows applications.
4. It will make use of realistic, recognizable examples to help the reader better understand how to
apply concepts to business-oriented problems.
5. It will use sample code to illustrate concepts.
6. It will provide the essential skills for the reader to advance to secondary programming course in
any object-oriented programming language.
Below we are listing many of the C# books we have found. Note that our research indicates none of the book
titles listed below appear to be college textbooks with relevant teaching materials.
5
TITLE Amazon Strengths Weaknesses
ranking
Liberty, J. (2003). Programming C#, 1928 very well written with an Designed for developers. Need some
third edition. O’Reilly & Associates. organization that works for background in OO language like C+
the experienced developer. +/Java to get full value from this
book. Numerous references to C, C+
+, and Java make it necessary for the
reader to have prior background in
another language.
Lippman, S.B. (2001). C# Primer: A 100781 Contains insights of C# not Assumes you know C++ or Java.
Practical Approach. Addison-Wesley found in other texts, so
Publishing Company useful for the experienced
programmer.
Mayo, J. (2002). C# Unleashed. Sams. 76991 not enough coverage for Designed for beginners.
experienced developers.
Onion, F. (2003). Essential ASP.NET 9905 well-written style & Designed for experienced developers.
with Examples in C#. Addison-Wesley organization. Very Need basic understanding of
Publishing Company. readable. ASP.NET before using this book. Not
enough screen shots of running code
examples.
Price, J., Gunderloy, M. (2002). 17839 Examples, while simplistic, Not enough examples to hold interest
Mastering Visual C#.NET. Sybex. do help a beginner of experienced programmer
understand some difficult
OO concepts
Robinson, S., Harvey, B., et.al. (2002). 16453 Designed for developers.
Professional C# (2nd edition). Wrox. Book contains errors
Sharp, J. & Jagger, J. (2003). Microsoft 26767 Good pace for self-study. Designed for beginners, so some
Visual C#.NET Step by Step-Version Seasoned developers topics are missing. Step-by-step
2003. Microsoft Press. should look elsewhere. teaches how to put a program
together without really understanding
what you’ve done. Insufficient
explanations lead to confusion.
Troelsen, A. (2003). C# and the .NET 3999 Advanced topics covered in Designed for developers.
Platform, second edition. A-Press. a readable manner
Manuscript Specifications:
6
Photo Editor
Microsoft Word