Boston University Seal Boston University
College of Arts and Sciences
Computer Science Department

CS 111: Introduction to Computer Science, Spring 2006
Contact Info Course Description Books & Software Labs Assignments Examples

Please report broken links to azs@bu.edu
Class meeting Concept Examples from class
Thu 19 January General Java syntax, Standard output
HelloWorld.java
Tue 24 January Standard output
Variables, data types
Assignment statements
HelloWorld.java
DataTypes.java
Thu 26 January Constants
Arithmetic
Casting
Constants.java
Arithmetic.java
FunWithCasts.java
Tue 31 January Using pre-defined classes, calling methods.
Standard input
Math and Scanner class
HigherMath.java
InputFromKeyboard.java
Thu 2 February Introduction to Graphics (coordinates, drawing, basic Colors)
Calling methods
Passing arguments to method calls
Drawing.java [some code to get us started]
Drawing.java (the drawing I did in class)
Tue 7 February Object reference variables.
Object creation using new.
Using constructors.
More Graphics: creating custom Colors.
String object references (briefly)
Drawing.java [updated]
DateExample.java
Thu 9 February More about String
Accessor and Mutator methods.
Static methods, static member data.
Factory methods for object creation.
AboutString.java
AccessorsAndMutators.java
FactoryMethod.java
Tue 14 February Expressions, selection using if statements.
Expressions.java
Selection.java
Thu 16 February Selection: continued
Comparing floating point numbers,
comparing objects (e.g. String),
MinOf3Ints.java
ComparingFloatingPoint.java.java
ComparingObjects.java.java
Thu 23 February Switch statements
Repetition using while loops.
Sentinel-controlled repetition.
SwitchExample.java
RepetitionExample.java
YesOrNo_02_23.java
Tue 28 February Counter-controlled repetition.
ReadingFromFile.java
CounterControlledLoop.java
Thu 2 March Repetition using do-while loops.
YesOrNo.java
Tue 14 March User-defined classes, member variables Circle.java
UsingCircle.java
Thu 16 March User-defined classes: constructors, methods DrawingCircle.java [some starter code]
Pause.java [to pause the animation]
Circle.java
DrawingCircle.java [my screen saver]
Tue 21 March User-defined classes:
toString, equals methods,
static & final keywords
enumerated types
Circle.java
UsingCircle2.java
Temperature.java
UsingTemperature.java
Thu 23 March Introducing arrays
Array indicies, operations.
IntroArrays.java
Tue 28 March More array operations
Combining arrays with method calls
IntroArrays.java
DrawingCircle.java
Thu 30 March
Allocating arrays with initializer lists.
Multidimensional Arrays
MultiDimArrays.java
TraversingArrays.java
MoreMultiDimArrays.java
Tue 4 April Inheritance, class hierarchies
PlayingGames.java
Thu 6 April Overiding methods.
Access-modifiers revisted (public, protected, private)
Polymorphism
PlayingGames.java
Tue 11 April Polymorphism
Abstract classes and interfaces
Pets.java
Tue 13 April Exceptions, handling in try-catch
Generating (throwing) Exceptions
PlayingWithFire.java
Tuesday 18 April File Input/Output
Structured data files
ReadingFromAFile.java [file I/O]
ReadingFromStructuredFile.java
Contacts.txt [structured file]
WritingToFile.java



Created by: Aaron Stevens, azs@bu.edu
http://www.cs.bu.edu/courses/cs111
Last update: 18 April 2006