
SLIS - Courses - LIBR252B - G. Liu - Sample Programs
|
TOPIC |
CODES
DESCRIPTION |
SOURCE FILE |
|
Class Basics |
1. A beginner’s class 2. Java’s main() 3. Data type classes defined in Java class hierarchy |
|
|
. |
. |
. |
|
Class inheritance &
virtual functionality |
1. Dummy example of inheritance 2. Geometric shapes |
|
|
Class/method/variable
scoping |
(self evident) |
|
|
Abstract class &
abstract methods |
Derived classes of geometric shapes |
|
|
Static variable and method
function |
Computing Fibonacci numbers |
|
|
. |
. |
. |
|
Dynamic array allocation |
Dynamic array implementation |
|
|
Array as function argument |
Sorting an array of objects |
|
|
Objects as function argument |
Objects are passed by reference |
|
|
. |
. |
. |
|
String and StringBuffer
classes |
1. String class 2. StringBuffer class 3. String as command-line arguments |
|
|
. |
. |
. |
|
Constructor overloading |
Dummy class with multiple versions of constructor |
|
|
Method function overloading |
Overloaded print() method functions of Word class |
|
|
. |
. |
. |
|
I/O streams in Java |
Opening, reading from and writing into files |
|
|
Exceptions and error
handling |
1. IOExceptions 2. Array Indexing Exceptions 3. Other Exceptions in general |
|
|
Interface definition and
declaration |
1. Declaration of interface Comparable 2. Implementation and use of the Comparable interface |
|
|
Generic object reference |
1. Binary searching (generic version) 2. Bubble sorting (generic version) 3. B-Tree |
|
|
Runtime Object Type
Determination |
Java’s equivalent of RunTimeTypeInfo |
|
|
Container/Storage classes |
i. Word class ii. WordDictionary class iii. Test Driver
|
|
|
. |
. |
. |
|
AWT-based graphic user
interface |
1. Gathering inputs in text fields 2. Drawing graphics in a window |
|
|
Threads and threading |
1. Thread programming basics 2. Mutex and ConditionalVariable 3. Concurrency control in thread programming with mutex and conditional variable |
|
|
Network programming in Java |
A simple example of socket server |
|
|
Java applets in web
programming |
. |
. |
|
JavaScripts in web
programming |
. |
. |
Select here to return to the main page for this course.
This page is maintained by Geoffrey Z. Liu. It was last revised on March, 2006.