This is a first course in Computer Science using the programming language Java. It covers the fundamentals of programming and of computer science.
For maximum benefit, go though these notes interactively, thinking about and answering the question at the bottom of each page. There are about 15 pages per chapter. If you spend about 3 minutes per page each chapter will take about 45 minutes; much more, if you copy and run some of the programs. If you are a beginning programmer, plan on spending more than a month with this.
These notes assume that you have the Java Development Kit (JDK) version 1.3 or later from Sun (http://www.javasoft.com) and a text editor such as NotePad. They may be used with more sophisticated environments, as well. For more about these notes check the frequently asked questions.
Best viewed at 800 x 600
General computer science topics. Hardware and software. Analog and binary signals. Machine language and high level languages. Language translation and interpretation.
Chapter 1 Introduction to Computer Systems Quiz Flash Cards. Chapter 2 Analog and Binary Signals Quiz Flash Cards. Chapter 3 Computer Memory Quiz Flash Cards. Chapter 4 The Processor Quiz Flash Cards.
How to run Java programs. Translating Java source code into bytecodes. How bytecodes are interpreted. How to create a Java program.
Chapter 5 Introduction to Java Review. Chapter 6 Small Java Programs Review. Chapter 7 How to Run the Example Programs Review.
How to program in Java.
Object Oriented programming. Software objects.
Chapter 25 Objects Quiz Chapter 26 Object References Quiz Chapter 27 More about Objects and Classes Review Chapter 28 Method Parameters Review Chapter 29 Strings and Object References Quiz Programming Exercises. Chapter 30 Defining your own Classes Review Programming Exercises. Chapter 31 Class Design Example (miles per gallon) Review Programming Exercises. Chapter 32 Class Design Example (checking account) Review Chapter 33 Encapsulation and Visibility Modifiers Quiz Programming Exercises. Chapter 34 Parameters, Overloading, Local Variables Review Chapter 34B Object Parameters Quiz Chapter 35 Objects that Contain Objects Review Programming Exercises.
Chapter 36 Applets Quiz Programming Exercises. Chapter 37 Applet Examples Quiz Programming Exercises. Chapter 38 More Applet Examples Quiz Programming Exercises.
Incrementing and decrementing variables. Convenient ways to create loops.
Chapter 39 Increment, Decrement, and Assignment Operators Quiz Chapter 40 Boolean Expressions and Short-circuit Operators Review Chapter 41 The forStatementQuiz Chapter 42 More about the forStatementQuiz Chapter 43 The Conditional Operator, and the switchStatementQuiz Chapter 44 The doStatementQuiz Chapter 46 Introduction to Arrays Quiz Chapter 47 Common Array Algorithms Quiz Chapter 48 Arrays as Parameters Review Chapter 49 Methods that Change Arrays Quiz Chapter 49B Arrays of Objects and Linear Search Quiz Programming Exercises Chapter 49C Two-dimensional Arrays Quiz Chapter 49D StringBuffers and StringTokenizers Quiz Programming Exercises
Advanced features of object oriented programming.
Chapter 50 Introduction to Inheritance Quiz Chapter 51 Abstract Classes and Polymorphism Quiz Chapter 52 More about Polymorphism Quiz Chapter 53 Interfaces Quiz Chapter 54 Vectors and Enumerations Quiz
Graphical user interfaces. Project Swing and the Abstract Windowing Toolkit.
Chapter 55 Introduction to GUI Programming Quiz Chapter 56 Swing Frames Quiz Chapter 57 Event Listeners Quiz Chapter 58 Adding Buttons to a Frame Quiz Programming Exercises. Chapter 59 Buttons and Action Events Quiz Programming Exercises. Chapter 60 Swing Text Fields and Labels Quiz Programming Exercises. Chapter 61 Components Layout Quiz Programming Exercises. Chapter 62 JPanel and BoxLayout Chapter 63 Radio Buttons and BorderLayout Programming Exercises. Chapter 64 Sliders and Change Events
Exceptions. Disk file input and output.
Chapter 80 Exceptions and Errors Quiz Programming Exercises. Chapter 81 More about Exceptions Quiz Programming Exercises. Chapter 82 Input and Output Streams Quiz Chapter 83 Writing Text Files Quiz Programming Exercises. Chapter 84 Reading Text Files Quiz Programming Exercises. Chapter 85 Writing Binary Files Quiz Programming Exercises. Chapter 86 Reading Binary Files Quiz Programming Exercises. Chapter 87 The File Class Quiz Programming Exercises.