Chabot College Fall 2001

Removed Fall 2010

Course Outline for Computer Science 19B

JAVA PROGRAMMING II

Course Description:

19B – Java Programming II 4 units

Stream input and output, threads, an introduction to Java collection classes: vectors, sets, lists, and maps, advanced graphical interfaces using Swing components, introduction to Java Beans. Includes multi-class applications. Prerequisite: Computer Science 19A (completed with a grade of C or higher). 3 hours lecture, 3 hours laboratory.
[Typical contact hours: lecture 52.5, laboratory 52.5]

Prerequisite Skills:

Upon entry to the class the student should be able to:

1. create and execute elementary “stand alone” applications and applets using the Java compiler and editor;

2. recognize and understand the standard Java classes and their available methods;

3. manipulate and convert Java’s string input to other data types;

4. create various objects (e.g., labels, buttons, text areas, checkboxes, scroll bars) on an applet;

5. embed mouse controls and manipulate background graphics and text in an applet;

6. coordinate an applet with other basic HTML tag capabilities on a web page;

7. define classes and create instances of these classes in programs;

8. describe inheritance as it relates to Java core classes;

9. subclass existing classes;

10. convert a Java application to an applet;

11. demonstrate an understanding of security issues under Java.

Expected Outcomes for Students:

Upon completion of the course the student should be able to:

1. explain and apply the fundamental concepts of Java programming in Swing objects for

use with a Japplet;

2. define what is meant by input and output streams;

3. describe various classes available in the java.io package;

4. write applications that use the classes available in java.io to perform input and output of

various types of simple data and objects to file streams;

5. explain what is a thread, describe its life cycle and define synchronization;

6. write a simple multithreaded application;

7. describe the major type of collection classes: set, sequence, and list;

8. use the Vector collection class in Java programs;

9. demonstrate an understanding of the difference between AWT components and Swing

components;

10. write advanced graphical user interfaces that include menus, panes, toolbars and custom

dialogs using a variety of Swing components;

11. describe what is meant by a Java Bean;

12. explain the Java Event model as it applies to beans;

13. write a simple Java Bean component using a builder tool such as Borland’s JBuilder or

Symantec’s Visual Café;

14. use simple Java Bean components to build an application.


Chabot College Page 2

Course Outline for Computer Science 19B

Effective Fall 2001

Course Content :

1. Input and output streams and the java.io package

a. What is meant by a stream

b. Overview of the major classes for input and output: OutputStream, InputStream, Writer, Reader, RandomAccessFile

c. The OutputSream abstract class:

1. Bye Output Streams

2. Overview of the subclasses: FutputSteam, ByteArrayOutputStream, PipedOutputStream, FilterOutputStream, ObjectOutputStream

d. The Writer abstract class

1. BufferedWriter class

2. PrintWriter class

3. OutputStreamWriter and FileWriter

e. The InputStream abstract class

1. Byte input streams

2. Overview of the subclasses: FileInputSteam, ByteArrayInputStream,

3. PipedInputStream, FilterINputStream, ObjectInputStream

f. The Reader abstract class

1. BufferedReader

2. InputStreamReader and FileReader

g. RandomAccessFile class

1. Input and Output methods

2. Use of the file position

2. Threads and Multithreaded Applications

a. What a thread is

b. Creating and starting threads

c. Synchronization issues

d. A simple multithreaded application example

3. An overview of the Java container classes

a. What is meant by a collection

b. An overview of sets, lists and maps

c. Introduction to what is contained in the java.util package

4. The Vector class

a. Creating a vector

b. Properties of a vector: capacity and size

c. Dynamic resizing

d. Methods for storing and retrieving objects in/from a vector

e. Use of iterator to access elements

f. Methods for removing objects

g. Sorting and searching examples using vectors

h. How a vector object differs from an array object

5. Advanced Graphical User Interfaces, the AWT and Swing components

a. Differences between AWT and Swing “lightweight” components

b. The Swing Model-View Architecture

c. An overview of the Swing classes

d. The JComponent class and its subclasses:

1. Various kinds of buttons

2. Checkboxes

3. Panes

4. Panels

5. Text areas, labels, and scroll panes

6. scrollbars and sliders

7. Menus

8. Toolbars

9. Dialogs

10. Layout managers

e. Use of the timer and thread issues

Chabot College Page 3

Course Outline for Computer Science 19B

Effective Fall 2001

Course Content: continued

6. Introduction to Java Beans

a. What a Java Bean component is

b. Beans and objects

c. How to create a simple Bean component

d. Overview of the Java Event Model

e. Implementing a source component

f. Implementing a listener component

g. Hooking up source and listener components

h. Creation of a simple application that uses Java Bean components

Methods of Presentation:

1. Lecture

2. Discussion

3. Demonstrations using computer with projection capability

Assignments and Methods of Evaluating Student Progress:

1. Typical Assignments

a. Implement a program that reads ordinary numeric and string information sequentially

from a file, manipulates the information, and writes it sequentially to another file

b. Implement a program that demonstrates Java’s byte stream input and output capabilities

c. Implement a program that demonstrates the ability to handle a simple random access

file

d. Implement at least one program that creates a stand alone application using a wide

variety of Swing components

e. Implement a simple application that creates and uses Java Bean components

f. Implement a simple multithreaded application

g. Implement a program that demonstrates ability to perform standard Vector manipulation

techniques

h. Implement a timer application, applet, or Japplet that implements a simple animation such

as a graphic image slideshow with start and stop manual command buttons (possibly combined with number six above).

2. Methods of Evaluating Student Progress

a. Written programs and assignments

b. Final Exam

Textbook(s) (Typical):

Rapid Java Application Development Using Jbuilder 3, Daniel Liang, Prentice Hall Publishers, 2000

Java Programming Advanced Topics, Wigglesworth and Lumby, Course Technology Publishers, 2000

Special Student Materials:

Diskettes

Des Chun, Carol Conway and Maurice Ngo, October 2000-10-06

2000 Curriculum CSCI 30.rev4 Effective Fall 2001