0% found this document useful (0 votes)
4 views2 pages

COMP228 Lab 6

This document outlines Lab Assignment 6 for the COMP-228 Java Programming course at Centennial College, focusing on developing multithreaded applications using Java's Multithreading and Collections APIs. Students are instructed to create a Java application that handles multiple ATM transactions with proper synchronization and to follow specific naming conventions for their projects. The evaluation criteria include functionality, multithreading implementation, use of Collections API, and adherence to naming conventions and input/output standards.

Uploaded by

vaibhavfl10
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

COMP228 Lab 6

This document outlines Lab Assignment 6 for the COMP-228 Java Programming course at Centennial College, focusing on developing multithreaded applications using Java's Multithreading and Collections APIs. Students are instructed to create a Java application that handles multiple ATM transactions with proper synchronization and to follow specific naming conventions for their projects. The evaluation criteria include functionality, multithreading implementation, use of Collections API, and adherence to naming conventions and input/output standards.

Uploaded by

vaibhavfl10
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Java Programming COMP-228

Centennial College

COMP 228: Java Programming


Lab Assignment 6: Developing Multithreaded Applications using Java Multithreading API
and Collections API.

Purpose: The purpose of this Lab assignment is to:


• Practice multithreading in Java Applications
• Practice Collections API in Java Applications
• Develop a Java multithreaded application

References: Read the course’s text, ppt slides and class examples.
This material provides the necessary information you need to complete the exercises.

Instructions: Be sure to read the following general instructions carefully


- Submit the project through the dropbox link on eCentennial.
- You must name your Eclipse project according to the following rule:
YourFullName_COMP228Labnumber
Example: JohnSmith_COMP228Lab6
- Each exercise should be placed in a separate package named exercise1, exercise2, etc.
- Submit your assignment in a zip file that is named according to the following rule:
YourLastName_COMP228Labnumber.zip
Example: JohnSmith_COMP228Lab6.zip
- Apply the naming conventions for variables, methods, classes, and packages:
- variable names start with a lowercase character
- classes start with an uppercase character
- packages use only lowercase characters
- methods start with a lowercase character

Exercise 1:

This exercise is like PrintTask example from Week 11.


Write a Java application that handles multiple ATM transactions (withdraw, deposit) at the same
time. Create an Account class and implement both deposit and withdraw operations. Synchronize
the operations to allow thread synchronization. Use Java Runnable interface to implement a
Transaction class. Perform withdraw and deposit operations in run method.

Create an AccountTest class to test multiple transactions (threads). Use an ArrayList to create a
list of three or more Transaction objects. Use method execute of ExecutorService to execute the
threads. Display the results. (10 marks)

Lab #6 Page 1 of 2
Java Programming COMP-228

Evaluation:
Functionality
Correct implementation of 50%
Multithreading
Correct implementation of Collections 30%
API
Comments, correct naming of 5%
variables, methods, classes, etc.
Friendly input/output 15%
Total 100%

Lab #6 Page 2 of 2

You might also like