prev next

Computer Science for Transfers
Lab 6 - The Bridge Troll

Overview

The primary purpose of this lab is get to provide you with the opportunity to work with threads in Java. You will learn how to write code that uses threads and how to modify the priority of a thread, as well as techniques for controlling the synchronization between running multiple threads.

Pre-lab

  1. Review your class notes on thread synchronization.
  2. Read through the Java tutorial's section on thread synchronization.

Objectives

  1. Understand the concept of threads.
  2. Learn the Java syntax for defining, creating, and running threads.
  3. Execute programs that use threads.
  4. Understand the need for synchronization between multiple threads.
  5. Program using Java's thread synchronization primitives.

Activities

  1. Create n threads.
  2. Simulate a bunch of Woolies
  3. Controlling access to the bridge

Grading

In-lab participation 3 points
Activity 1 7 points
Activity 2 10 points
Activity 3 10 points
Total 30 points

prev next
Last modified July 24, 2003 by tmh. All rights reserved.