LIST OF EXAMPLES

Chapter 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10

NB: Right-click links to save to disk or just click source file (.cs) links to view.

Note

A number of the examples in the chapters make use of images. These images are made available in an associated Zip archive. The archives should be unzipped into the same directory as the source file in order for the program to behave correctly.



Chapter 2 Using Objects

2.1 A first program (Welcome.cs)
2.2 Introducing the Go method (WelcomeFromGo.cs)
2.3 Days to the year end (TimeDifference.cs)
2.4 Analysing a program (FetchImage.cs, photo.jpg)
2.5 Dates in different formats (TimeFormat.cs)
2.6 Meeting times (TimeMeeting.cs)
2.7 Time with reading (TimeReading.cs)
2.8 Your lucky day (Lucky.cs)


Chapter 3 Inside Objects

3.1 A StarLord type (StarLord.cs)
3.2 A Time type (Time.cs)
3.3 The shuttle bus (ShuttleBus.cs)
3.4 Table of meeting times (TimeLoop.cs)
3.5 Book chapters (BookChapters.cs)
CS1 Phone bill comparison (PhoneComparison.cs)


Chapter 4 Controlling Objects, repeating actions

4.1 Compute a grade (ComputeGrade.cs)
4.2 The unlucky days program (Unlucky.cs)
4.3 Unlucky days,version 2 (Unlucky2.cs)
4.4 Prime numbers (Primes.cs)
4.5 Mark frequencies (Frequencies.cs)
4.6 Compute a grade, revisited (ComputeGrade2.cs)
4.7 The ShowBinary program (ShowBinary.cs)
4.8 Roman numbers conversion (Roman2Arabic.cs)
CS2 Rock-Paper-Scissor game (DriveRPSGameConsole.cs, RPSGame.cs)


Chapter 5 Graphical user interfaces with Views

5.1 R-P-S game with GUI (DriveRPSGameGUI.cs, RPSImages.zip)
5.2 Simple Calculator with GUI (SimpleCalculator.cs)
5.3 Image scaler (ImageScaling.cs, Bridge.jpg)
5.4 Show-Hide (ShowHide.cs, QueensBridge.jpg)
CS3 The till program (Till.cs, TillImages.zip)


Chapter 6 Exceptions and Debugging

6.1 Using Debug methods (FibExample.cs)
6.2 Using the CLR debugger (Buggy.cs)


Chapter 7 Files and streams

7.1 Expanding tabs to spaces (ExpandTabs.cs)
7.2 Searching a file (SearchTextFile.cs)
7.3 Photo Album (PhotoAlbum.cs, images.zip)
7.4 Select and rename photos (PhotoAlbum2.cs, images.zip)


Chapter 8 Classes and collections

8.1 Listing pets (ListPets.cs)
8.2 Testing Array methods (ArrayTest.cs)
8.3 Rainfall statistics (WeatherStats.cs, Stats.cs, rain.dat)
8.4 Public Holidays (HolidaysGUI.cs, holidays.dat)
CS4 Training Schedules (StaffTraining.cs, course.dat, employee.dat)


Chapter 9 Objects at large

9.1 Defining interfaces (InterfaceTest.cs)
9.2 Building access control (University.cs)
CS5 Enhancing the starlords (Character.cs, SuperCharacter.cs, StarLordTwo.cs, CharacterImages.zip)


Chapter 10 Graphics and networking

10.1 Drawing spots (Spotty.cs)
10.2 Identifying part of an image (FetchImageWithBox.cs, Jacarandas.jpg)
10.3 Mixed up numbers (MixedNumbers.cs)
10.4 The Ticking Clock (WorldTime.cs)
10.5 Many spots (SpottyThreads.cs)
10.6 The stop watch with Views (StopWatchWithViews.cs)
10.7 Fetching an image on the internet (FetchImageWeb.cs)
10.8 An ATM client-server system (ATMServer.cs, ATMClient.cs)


Chapter 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10