Tải bản đầy đủ (.pdf) (7 trang)

a0084 bruce eckel thinking in c shar morebook vn 2402

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 (38.49 KB, 7 trang )

Thinking
in
C#
Larry O’Brien
and
Bruce Eckel

PDF created with FinePrint pdfFactory Pro trial version


Thinking
in
C#
Larry O’Brien
and
Bruce Eckel
Prentice Hall
Upper Saddle River, New Jersey 07458
www.phptr.com

PDF created with FinePrint pdfFactory Pro trial version


PDF created with FinePrint pdfFactory Pro trial version


Overview
Introduction
1: Those Who Can, Code

3


13

2: Introduction to Objects 13
3: Hello, Objects

49

4: Controlling Program Flow87
5: Initialization & Cleanup149
6: Coupling and Cohesion213
6a: Hiding the Implementation
7: Reusing classes

248

8: Interfaces and Implementation
8a: Interfaces

232
293

331

9: Collecting Your Objects389
10: Error Handling With Exceptions
11: I/O in C#

481

519


12: Reflection and Attributes557
13: Programming Windows Forms
14: GDI+ Overview

587

705

14: Multithreaded Programming

710

C: C# Programming Guidelines

746

PDF created with FinePrint pdfFactory Pro trial version


What’s Inside
Introduction

3

Prerequisites .......................3
Learning C# ........................3
Goals ...................................4
Online documentation ..........
Chapters ..............................6

Exercises .............................9
Source code ....................... 10
Coding standards ..........................11

1: Those Who Can, Code

13

2: Introduction to Objects 13
The progress of abstraction14
An object has an interface. 17
An object provides services20
The hidden implementation20
Reusing the implementation22
Inheritance: reusing the
interface ............................23
Is-a vs. is-like-a relationships ...... 27

Interchangeable objects
with polymorphism...........29

Exception handling: dealing
with errors .........................41
Multithreading ................. 42
Persistence........................ 43
C# and the Internet.......... 43
What is the Web?......................... 44
Client-side programming ............ 44
Server-side programming............ 44
A separate arena: applications .... 44


Analysis and design.......... 45
Extreme programming..... 45
Why .NET succeeds.......... 45
Systems are easier to express and
understand................................... 45
Maximal leverage with libraries .. 45
Error handling ............................. 45
Programming in the large............ 45

Strategies for transition.... 46
Guidelines .................................... 46
Management obstacles ................ 48

C# vs. Java?...................... 48
Summary .......................... 48

3: Hello, Objects

49

Collections and iterators .............. 35

You manipulate objects with
references ......................... 49
You must create all the
objects............................... 50

The singly rooted hierarchy ......... 37


Where storage lives....................... 51

Collection libraries and support for

Arrays in Java ...............................52

Abstract base classes and interfaces33

Object landscapes and
lifetimes.............................34

easy collection use........................38
The housekeeping dilemma: who
should clean up?...........................39

Special case: value types ...............53

You never need to destroy
an object ........................... 54
Scoping......................................... 54

PDF created with FinePrint pdfFactory Pro trial version


Sun Microsystems, Java, all Java-based names and logos and the Java Coffee
Cup are trademarks of Sun Microsystems; Internet Explorer, the Windows
Media Player, DOS, Windows 95, and Windows NT are trademarks of Microsoft.

PDF created with FinePrint pdfFactory Pro trial version



Thinking in C: Foundations for Java &
C++
Multimedia Seminar-on-CD ROM
©2000 MindView, Inc. All rights reserved.
WARNING: BEFORE OPENING THE DISC PACKAGE, CAREFULLY
READ THE TERMS AND CONDITIONS OF THE LICENSE
AGREEMENT & WARANTEE LIMITATION ON THE PREVIOUS
PAGES.

The CD ROM packaged with this book is a multimedia seminar consisting
of synchronized slides and audio lectures. The goal of this seminar is to
introduce you to the aspects of C that are necessary for you to move on to
C++ or Java, leaving out the unpleasant parts that C programmers must
deal with on a day-to-day basis but that the C++ and Java languages steer
you away from. The CD also contains this book in HTML form along with
the source code for the book.
This CD ROM will work with Windows (with a sound system). However,
you must:

1. Install the most recent version of Microsoft’s Internet Explorer.
Because of the features provided on the CD, it will NOT work
with Netscape Navigator. The Internet Explorer software
for Windows 9X/NT is included on the CD.
2. Install Microsoft’s Windows Media Player. The Media Player
software for Windows 9X/NT is included on the CD.
You can also go to
and
follow the instructions or links there to download and install the
Media Player for your particular platform.

3. At this point you should be able to play the lectures on the CD.
Using the Internet Explorer Web browser, open the file
Install.html that you’ll find on the CD. This will introduce you
to the CD and provide further instructions about the use of the
CD.

769

PDF created with FinePrint pdfFactory Pro trial version



×