COMP228Lab6F16 (3) (1)

docx

School

Centennial College *

*We aren’t endorsed by this school

Course

228

Subject

Computer Science

Date

Feb 20, 2024

Type

docx

Pages

2

Uploaded by SargentBadgerMaster764

Report
Java Programming COMP-228 Centennial College COMP 228: Java Programming Lab Assignment 6: Developing Multithreaded Applications using Java Multithreading API and Collections API. Student: ______________________________________________________________________ Due Date: Week 13 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: - This is an in-class assignment . You will have to finish the assignment and demonstrate your solution in Week 13 scheduled lab session . - 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 three individual files: a. Video File demoing the run of your application. b. Export the zip c. Full screenshot in word file.! For a pair submission include both full names. Example: JohnSmith_JaneSmith_COMP228Lab6 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 similar to PrintTask example from Week 12. Lab #6 Page 1 of 2
Java Programming COMP-228 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) Evaluation: Functionality Correct implementation of Multithreading 50% Correct implementation of Collections API 30% Comments, correct naming of variables, methods, classes, etc. 5% Friendly input/output 15% Total 100% Lab #6 Page 2 of 2
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help