Coursework Description 1. Introduction This coursework is based on the Student Bank Account case study that was used in the first Lecture. The coursework is in three parts: 1. Develop an FSP program to model a student's Bank Account & the concurrent transactions on the account performed by a collection of individuals and the organisations: a student, the grandmother, a Loan Company and a University. You must also model a number of transactions, e.g. student buying a Samsung phone, the student loan company depositing the student loan and the University withdrawing the course fees. The concurrent transactions with the Bank should ensure mutual exclusion and no data corruption. 2. This abstract FSP program is then to be translated into a multi-threaded Java program, using appropriate Java concurrency features. The Java program is to be based on the FSP model of the student Banking system. You are required to develop Java classes to model the FSP processes and the complete system defined in part (1). Your Java implementation must ensure that mutual exclusion and no data corruption occurs as a result of the bank account being shared and concurrently accessed by the processes (Java threads). 3. Submit screen shot images that: demonstrate the use of the FSP tool LTSA to animate and check your FSP model, & show an example output from your Java program. Both the FSP and Java programs should conform to the general guidelines given in: FSP Programming Criteria, Java Programming Criteria and the general style used for both in the Lecture notes and example programs. 2. Detailed Description of Coursework Components 2.1 FSP Design & Model You are required to develop several FSP processes to model a student Bank Account, for a student; the student's grandmother, a Loan Company and a University. These processes should each perform at least one financial transactions on the bank account. This is to be done by using the FSP System Analysis & Design Form for the FSP process composition of the complete concurrent system. The system should be developed incrementally using the LTSA tool. 2.1.1 Description of Individual Processes The requirements & design of the individual FSP processes is as follows: (a) Student's Bank Account It allows users of the account to read the current balance & update it, by writing a new balance. The student's bank balance must be a correct record of the balance & must not suffer from "data corruption & interference". That is each user must have mutually exclusive access to the account while operating on it. 6SENG001W Coursework 2021/22 3 [17/10/2021] (b) Student - its behaviour is: Read its current balance. Make withdrawal by subtracting some money & calculating the new balance. Buy a Samsung phone. Update the account by writing back the new balance. (c) Student's Grandmother - her behaviour is: Read her grandchild's current balance. Give birthday present money, by adding the money to the current balance & calculating the new balance. Deposit the money in the account by writing back the new balance. Send an e-birthday card. (d) Student Loan Company - its behaviour is: Read the student's current balance. Make the loan by adding the loan amount to the current balance & calculating the student's new balance. Deposit the money in the student's account by writing back the new balance. (e) University - its behaviour is: Read the student's current balance. Make withdrawal of the University fees, by subtracting money & calculating the new balance. Update student's account by writing back the new balance. (f) Banking System - combines all of the above processes in parallel. Note that the FSP tool LTSA can only display a process with <= 64 states, so the amounts used in the transactions should be very small, if you wish to display the system. 2.2. java implementation of the fsp model implement the fsp model of the banking system as a concurrent java program, using the appropriate java concurrency features, e.g. threads, thread groups, monitor. the java implementation of the banking system should implement the behaviour of the equivalent fsp process. 2.2.1 description of individual java components the requirements & design of the java classes is as following 2.2.1.1 current account class define a class to represent a current account it must: implement the currentaccount interface, it defines the basic interface for a bank's current account. 6seng001w coursework 2021/22 4 [17/10/2021] use the transaction class to represent a "banking transaction" with a student's bank account, i.e. a customer's deposit or withdrawal. use the statement & statemententry classes. statement class is a list of statemententry objects. together they are used to represent a "bank statement" (statement) for the account, i.e. the list of the transactions (statemententry) performed on the bank account with the current balance after the transaction. contains information for a current account, i.e. the balance; the account holder's name; the account number; the account's statement. current account behaviour: allow users of the account to access its details, e.g. balance, account number, etc. & perform "transactions" on the account, i.e. deposits & withdrawals, resulting in a new balance using the transaction class. note: deposit transactions can always take place. however, withdrawal transactions are only allowed to take place, when the account has sufficient funds to cover the withdrawal; otherwise it must wait until the funds are available. the student's bank balance must be a correct record of the balance & must not suffer from "data corruption & interference". each user must have "mutually exclusive" access to the account. 2.2.1.2 student class define a class to represent a student, it must: use the transaction class to create several different "banking transaction", which are then performed on a student's bank account. for example, if a student won £1,000,000 on the lottery; they would create the appropriate "transaction" & deposit it into the account: transaction winlottery = new transaction(getname(), 1000000) ; mycurrentacount.deposit( winlottery ) ; contains information for a student, i.e. the thread group its in; their bank account; their name. student's behaviour is to: print out messages when he performs an action: starts, terminates & makes a deposit or withdrawal. performs 6 different transactions on their account. sleeping for a random amount of time between each transaction. after completing the transactions, print out the final bank statement. 2.2.1.3 grandmother class define a class to represent a student's grandmother, it must: 6seng001w coursework 2021/22 5 [17/10/2021] use the transaction class for the “top-up gifts”. contains information for the grandmother, i.e. the thread group it is in; the student's bank account details; the grandmother name. grandmother behaviour is to: print out messages when it performs an action: starts, terminates & makes a deposit. make 2 “top-up gifts”, e.g. birthday & christmas, deposits into their gandchild's bank account. sleep for a random amount of time between each transaction. 2.2.1.4 student loan company class define a class to represent a student loan company, it must: use the transaction class for the loans. contains information for the loan company, i.e. the thread group it is in; the student's bank account details; the company name. loan company's behaviour is to: print out messages when it performs an action: starts, terminates & makes a deposit. make 3 student loan deposits into the student's bank account. sleep for a random amount of time between each transaction. 2.2.1.5 university class define a class to represent a university, it must: use the transaction class for withdrawing course fees. contains information for the university, i.e. the thread group it is in; student's bank account details; the university name. university's behaviour is to: print out messages when it performs an action: starts, terminates & makes a withdrawal. make 3 appropriate course fee withdrawals from student's account. sleep for a random amount of time between each transaction. 2.2.1.6 banking system class define a class to represent the complete banking system, it must combine all of the above objects & threads in parallel. it should create and coordinate the following objects, threads and thread groups: one current account class for a student. two thread groups: one for humans and one for the loan company & university. 1 student, 1 grandmother, 1 loan company & 1 university. after all the threads have terminated, it prints out the final statement for the student's bank account. 6seng001w coursework 2021/22 6 [17/10/2021] in addition it must print out reports of what it is doing and when it has finished creating the threads and other objects, etc. 2.2.2 general guidance about the java implementation the structure of the banking system is given in the following diagram. the fsp process for the student's bank account should be implemented as a java "monitor". each of the fsp processes that model the bank account clients should be implemented by a separate class that subclasses java’s thread, i.e. is a java thread. note: this coursework requires you to use a java monitor to solve this problem. therefore, you must not use “semaphores” or the “synchronised ( object ) { ... }” statement to solve the synchronisation issues of this problem. if you do use either of these features then you will be awarded a very low mark for the java component. each of the above java thread classes should implement the behaviour of the equivalent fsp process as closely as possible, i.e. they should perform a suitable number of bank transactions on the student’s bank account. the complete composite fsp system that models the banking system should be implemented by the "main" method for a java class. it should create the bank account monitor and all of the client threads; connect up all of the threads to the monitor and then starts all of the threads executing. 3. blackboard submission the following components are to be submitted via blackboard. all files should be compressed into a single zip archive. the zip archive should be named using your surname & "rd-cw", e.g. "howells_rd-cw.zip". the file formats used for the screen shot images must be either “.png”, ".jpg” or “.jpeg". note: if you are unable to produce screen shot image files in these format then email me with the formats you are able to produce to check that i can view them. if you submit a format that i cannot view you will get zero marks for that component of the coursework. 6seng001w coursework 2021/22 7 [17/10/2021] 3.1 components to submit 1. the fsp process composition analysis & design form for the fsp process composition representing the complete banking system. (pdf file format.) [10%] 2. the fsp program for the banking system, called "banksystem.lts". (plain ascii text file.) [20%] 3. the java source code for each individual java class that implements the fsp model. java code files (".java") should be plain ascii text format. note do not include the given classes and interfaces or a full project structure from an ide. [50%] 4. an example of the output produced by your java program. (plain text file) [5%] 5. screen shots demonstrating the use of the fsp tool ltsa to animate and analyse the fsp model and the java execution. (assuming image files are in png format.) (a) “output” tab showing the output after performing: - the compilation and composition (file: ltsa_output_cc.png) - a deadlock check (file: ltsa_output_deadlock.png) (b) “draw” tab showing the lts for the student process (file: ltsa_draw_student.png) (c) two “animator” pop-up window images: - one showing the states of the actions before the student has locked the current account process. (file: ltsa_animation_unlocked.png) - one showing the states of the actions after the student has locked the current account process. (file: ltsa_animation_locked.png 64="" states,="" so="" the="" amounts="" used="" in="" the="" transactions="" should="" be="" very="" small,="" if="" you="" wish="" to="" display="" the="" system.="" 2.2.="" java="" implementation="" of="" the="" fsp="" model="" implement="" the="" fsp="" model="" of="" the="" banking="" system="" as="" a="" concurrent="" java="" program,="" using="" the="" appropriate="" java="" concurrency="" features,="" e.g.="" threads,="" thread="" groups,="" monitor.="" the="" java="" implementation="" of="" the="" banking="" system="" should="" implement="" the="" behaviour="" of="" the="" equivalent="" fsp="" process.="" 2.2.1="" description="" of="" individual="" java="" components="" the="" requirements="" &="" design="" of="" the="" java="" classes="" is="" as="" following="" 2.2.1.1="" current="" account="" class="" define="" a="" class="" to="" represent="" a="" current="" account="" it="" must:="" ="" implement="" the="" currentaccount="" interface,="" it="" defines="" the="" basic="" interface="" for="" a="" bank's="" current="" account.="" 6seng001w="" coursework="" 2021/22="" 4="" [17/10/2021]="" ="" use="" the="" transaction="" class="" to="" represent="" a="" "banking="" transaction"="" with="" a="" student's="" bank="" account,="" i.e.="" a="" customer's="" deposit="" or="" withdrawal.="" ="" use="" the="" statement="" &="" statemententry="" classes.="" statement="" class="" is="" a="" list="" of="" statemententry="" objects.="" together="" they="" are="" used="" to="" represent="" a="" "bank="" statement"="" (statement)="" for="" the="" account,="" i.e.="" the="" list="" of="" the="" transactions="" (statemententry)="" performed="" on="" the="" bank="" account="" with="" the="" current="" balance="" after="" the="" transaction.="" ="" contains="" information="" for="" a="" current="" account,="" i.e.="" the="" balance;="" the="" account="" holder's="" name;="" the="" account="" number;="" the="" account's="" statement.="" current="" account="" behaviour:="" ="" allow="" users="" of="" the="" account="" to="" access="" its="" details,="" e.g.="" balance,="" account="" number,="" etc.="" &="" perform="" "transactions"="" on="" the="" account,="" i.e.="" deposits="" &="" withdrawals,="" resulting="" in="" a="" new="" balance="" using="" the="" transaction="" class.="" ="" note:="" deposit="" transactions="" can="" always="" take="" place.="" however,="" withdrawal="" transactions="" are="" only="" allowed="" to="" take="" place,="" when="" the="" account="" has="" sufficient="" funds="" to="" cover="" the="" withdrawal;="" otherwise="" it="" must="" wait="" until="" the="" funds="" are="" available.="" ="" the="" student's="" bank="" balance="" must="" be="" a="" correct="" record="" of="" the="" balance="" &="" must="" not="" suffer="" from="" "data="" corruption="" &="" interference".="" ="" each="" user="" must="" have="" "mutually="" exclusive"="" access="" to="" the="" account.="" 2.2.1.2="" student="" class="" define="" a="" class="" to="" represent="" a="" student,="" it="" must:="" ="" use="" the="" transaction="" class="" to="" create="" several="" different="" "banking="" transaction",="" which="" are="" then="" performed="" on="" a="" student's="" bank="" account.="" for="" example,="" if="" a="" student="" won="" £1,000,000="" on="" the="" lottery;="" they="" would="" create="" the="" appropriate="" "transaction"="" &="" deposit="" it="" into="" the="" account:="" transaction="" winlottery="new" transaction(getname(),="" 1000000)="" ;="" mycurrentacount.deposit(="" winlottery="" )="" ;="" ="" contains="" information="" for="" a="" student,="" i.e.="" the="" thread="" group="" its="" in;="" their="" bank="" account;="" their="" name.="" student's="" behaviour="" is="" to:="" ="" print="" out="" messages="" when="" he="" performs="" an="" action:="" starts,="" terminates="" &="" makes="" a="" deposit="" or="" withdrawal.="" ="" performs="" 6="" different="" transactions="" on="" their="" account.="" sleeping="" for="" a="" random="" amount="" of="" time="" between="" each="" transaction.="" ="" after="" completing="" the="" transactions,="" print="" out="" the="" final="" bank="" statement.="" 2.2.1.3="" grandmother="" class="" define="" a="" class="" to="" represent="" a="" student's="" grandmother,="" it="" must:="" 6seng001w="" coursework="" 2021/22="" 5="" [17/10/2021]="" ="" use="" the="" transaction="" class="" for="" the="" “top-up="" gifts”.="" ="" contains="" information="" for="" the="" grandmother,="" i.e.="" the="" thread="" group="" it="" is="" in;="" the="" student's="" bank="" account="" details;="" the="" grandmother="" name.="" grandmother="" behaviour="" is="" to:="" ="" print="" out="" messages="" when="" it="" performs="" an="" action:="" starts,="" terminates="" &="" makes="" a="" deposit.="" ="" make="" 2="" “top-up="" gifts”,="" e.g.="" birthday="" &="" christmas,="" deposits="" into="" their="" gandchild's="" bank="" account.="" sleep="" for="" a="" random="" amount="" of="" time="" between="" each="" transaction.="" 2.2.1.4="" student="" loan="" company="" class="" define="" a="" class="" to="" represent="" a="" student="" loan="" company,="" it="" must:="" ="" use="" the="" transaction="" class="" for="" the="" loans.="" ="" contains="" information="" for="" the="" loan="" company,="" i.e.="" the="" thread="" group="" it="" is="" in;="" the="" student's="" bank="" account="" details;="" the="" company="" name.="" loan="" company's="" behaviour="" is="" to:="" ="" print="" out="" messages="" when="" it="" performs="" an="" action:="" starts,="" terminates="" &="" makes="" a="" deposit.="" ="" make="" 3="" student="" loan="" deposits="" into="" the="" student's="" bank="" account.="" sleep="" for="" a="" random="" amount="" of="" time="" between="" each="" transaction.="" 2.2.1.5="" university="" class="" define="" a="" class="" to="" represent="" a="" university,="" it="" must:="" ="" use="" the="" transaction="" class="" for="" withdrawing="" course="" fees.="" ="" contains="" information="" for="" the="" university,="" i.e.="" the="" thread="" group="" it="" is="" in;="" student's="" bank="" account="" details;="" the="" university="" name.="" university's="" behaviour="" is="" to:="" ="" print="" out="" messages="" when="" it="" performs="" an="" action:="" starts,="" terminates="" &="" makes="" a="" withdrawal.="" ="" make="" 3="" appropriate="" course="" fee="" withdrawals="" from="" student's="" account.="" sleep="" for="" a="" random="" amount="" of="" time="" between="" each="" transaction.="" 2.2.1.6="" banking="" system="" class="" define="" a="" class="" to="" represent="" the="" complete="" banking="" system,="" it="" must="" combine="" all="" of="" the="" above="" objects="" &="" threads="" in="" parallel.="" it="" should="" create="" and="" coordinate="" the="" following="" objects,="" threads="" and="" thread="" groups:="" ="" one="" current="" account="" class="" for="" a="" student.="" ="" two="" thread="" groups:="" one="" for="" humans="" and="" one="" for="" the="" loan="" company="" &="" university.="" ="" 1="" student,="" 1="" grandmother,="" 1="" loan="" company="" &="" 1="" university.="" ="" after="" all="" the="" threads="" have="" terminated,="" it="" prints="" out="" the="" final="" statement="" for="" the="" student's="" bank="" account.="" 6seng001w="" coursework="" 2021/22="" 6="" [17/10/2021]="" ="" in="" addition="" it="" must="" print="" out="" reports="" of="" what="" it="" is="" doing="" and="" when="" it="" has="" finished="" creating="" the="" threads="" and="" other="" objects,="" etc.="" 2.2.2="" general="" guidance="" about="" the="" java="" implementation="" the="" structure="" of="" the="" banking="" system="" is="" given="" in="" the="" following="" diagram.="" the="" fsp="" process="" for="" the="" student's="" bank="" account="" should="" be="" implemented="" as="" a="" java="" "monitor".="" each="" of="" the="" fsp="" processes="" that="" model="" the="" bank="" account="" clients="" should="" be="" implemented="" by="" a="" separate="" class="" that="" subclasses="" java’s="" thread,="" i.e.="" is="" a="" java="" thread.="" note:="" this="" coursework="" requires="" you="" to="" use="" a="" java="" monitor="" to="" solve="" this="" problem.="" therefore,="" you="" must="" not="" use="" “semaphores”="" or="" the="" “synchronised="" (="" object="" )="" {="" ...="" }”="" statement="" to="" solve="" the="" synchronisation="" issues="" of="" this="" problem.="" if="" you="" do="" use="" either="" of="" these="" features="" then="" you="" will="" be="" awarded="" a="" very="" low="" mark="" for="" the="" java="" component.="" each="" of="" the="" above="" java="" thread="" classes="" should="" implement="" the="" behaviour="" of="" the="" equivalent="" fsp="" process="" as="" closely="" as="" possible,="" i.e.="" they="" should="" perform="" a="" suitable="" number="" of="" bank="" transactions="" on="" the="" student’s="" bank="" account.="" the="" complete="" composite="" fsp="" system="" that="" models="" the="" banking="" system="" should="" be="" implemented="" by="" the="" "main"="" method="" for="" a="" java="" class.="" it="" should="" create="" the="" bank="" account="" monitor="" and="" all="" of="" the="" client="" threads;="" connect="" up="" all="" of="" the="" threads="" to="" the="" monitor="" and="" then="" starts="" all="" of="" the="" threads="" executing.="" 3.="" blackboard="" submission="" the="" following="" components="" are="" to="" be="" submitted="" via="" blackboard.="" all="" files="" should="" be="" compressed="" into="" a="" single="" zip="" archive.="" the="" zip="" archive="" should="" be="" named="" using="" your="" surname="" &="" "rd-cw",="" e.g.="" "howells_rd-cw.zip".="" the="" file="" formats="" used="" for="" the="" screen="" shot="" images="" must="" be="" either="" “.png”,="" ".jpg”="" or="" “.jpeg".="" note:="" if="" you="" are="" unable="" to="" produce="" screen="" shot="" image="" files="" in="" these="" format="" then="" email="" me="" with="" the="" formats="" you="" are="" able="" to="" produce="" to="" check="" that="" i="" can="" view="" them.="" if="" you="" submit="" a="" format="" that="" i="" cannot="" view="" you="" will="" get="" zero="" marks="" for="" that="" component="" of="" the="" coursework.="" 6seng001w="" coursework="" 2021/22="" 7="" [17/10/2021]="" 3.1="" components="" to="" submit="" 1.="" the="" fsp="" process="" composition="" analysis="" &="" design="" form="" for="" the="" fsp="" process="" composition="" representing="" the="" complete="" banking="" system.="" (pdf="" file="" format.)="" [10%]="" 2.="" the="" fsp="" program="" for="" the="" banking="" system,="" called="" "banksystem.lts".="" (plain="" ascii="" text="" file.)="" [20%]="" 3.="" the="" java="" source="" code="" for="" each="" individual="" java="" class="" that="" implements="" the="" fsp="" model.="" java="" code="" files="" (".java")="" should="" be="" plain="" ascii="" text="" format.="" note="" do="" not="" include="" the="" given="" classes="" and="" interfaces="" or="" a="" full="" project="" structure="" from="" an="" ide.="" [50%]="" 4.="" an="" example="" of="" the="" output="" produced="" by="" your="" java="" program.="" (plain="" text="" file)="" [5%]="" 5.="" screen="" shots="" demonstrating="" the="" use="" of="" the="" fsp="" tool="" ltsa="" to="" animate="" and="" analyse="" the="" fsp="" model="" and="" the="" java="" execution.="" (assuming="" image="" files="" are="" in="" png="" format.)="" (a)="" “output”="" tab="" showing="" the="" output="" after="" performing:="" -="" the="" compilation="" and="" composition="" (file:="" ltsa_output_cc.png)="" -="" a="" deadlock="" check="" (file:="" ltsa_output_deadlock.png)="" (b)="" “draw”="" tab="" showing="" the="" lts="" for="" the="" student="" process="" (file:="" ltsa_draw_student.png)="" (c)="" two="" “animator”="" pop-up="" window="" images:="" -="" one="" showing="" the="" states="" of="" the="" actions="" before="" the="" student="" has="" locked="" the="" current="" account="" process.="" (file:="" ltsa_animation_unlocked.png)="" -="" one="" showing="" the="" states="" of="" the="" actions="" after="" the="" student="" has="" locked="" the="" current="" account="" process.="" (file:="">= 64 states, so the amounts used in the transactions should be very small, if you wish to display the system. 2.2. java implementation of the fsp model implement the fsp model of the banking system as a concurrent java program, using the appropriate java concurrency features, e.g. threads, thread groups, monitor. the java implementation of the banking system should implement the behaviour of the equivalent fsp process. 2.2.1 description of individual java components the requirements & design of the java classes is as following 2.2.1.1 current account class define a class to represent a current account it must: implement the currentaccount interface, it defines the basic interface for a bank's current account. 6seng001w coursework 2021/22 4 [17/10/2021] use the transaction class to represent a "banking transaction" with a student's bank account, i.e. a customer's deposit or withdrawal. use the statement & statemententry classes. statement class is a list of statemententry objects. together they are used to represent a "bank statement" (statement) for the account, i.e. the list of the transactions (statemententry) performed on the bank account with the current balance after the transaction. contains information for a current account, i.e. the balance; the account holder's name; the account number; the account's statement. current account behaviour: allow users of the account to access its details, e.g. balance, account number, etc. & perform "transactions" on the account, i.e. deposits & withdrawals, resulting in a new balance using the transaction class. note: deposit transactions can always take place. however, withdrawal transactions are only allowed to take place, when the account has sufficient funds to cover the withdrawal; otherwise it must wait until the funds are available. the student's bank balance must be a correct record of the balance & must not suffer from "data corruption & interference". each user must have "mutually exclusive" access to the account. 2.2.1.2 student class define a class to represent a student, it must: use the transaction class to create several different "banking transaction", which are then performed on a student's bank account. for example, if a student won £1,000,000 on the lottery; they would create the appropriate "transaction" & deposit it into the account: transaction winlottery = new transaction(getname(), 1000000) ; mycurrentacount.deposit( winlottery ) ; contains information for a student, i.e. the thread group its in; their bank account; their name. student's behaviour is to: print out messages when he performs an action: starts, terminates & makes a deposit or withdrawal. performs 6 different transactions on their account. sleeping for a random amount of time between each transaction. after completing the transactions, print out the final bank statement. 2.2.1.3 grandmother class define a class to represent a student's grandmother, it must: 6seng001w coursework 2021/22 5 [17/10/2021] use the transaction class for the “top-up gifts”. contains information for the grandmother, i.e. the thread group it is in; the student's bank account details; the grandmother name. grandmother behaviour is to: print out messages when it performs an action: starts, terminates & makes a deposit. make 2 “top-up gifts”, e.g. birthday & christmas, deposits into their gandchild's bank account. sleep for a random amount of time between each transaction. 2.2.1.4 student loan company class define a class to represent a student loan company, it must: use the transaction class for the loans. contains information for the loan company, i.e. the thread group it is in; the student's bank account details; the company name. loan company's behaviour is to: print out messages when it performs an action: starts, terminates & makes a deposit. make 3 student loan deposits into the student's bank account. sleep for a random amount of time between each transaction. 2.2.1.5 university class define a class to represent a university, it must: use the transaction class for withdrawing course fees. contains information for the university, i.e. the thread group it is in; student's bank account details; the university name. university's behaviour is to: print out messages when it performs an action: starts, terminates & makes a withdrawal. make 3 appropriate course fee withdrawals from student's account. sleep for a random amount of time between each transaction. 2.2.1.6 banking system class define a class to represent the complete banking system, it must combine all of the above objects & threads in parallel. it should create and coordinate the following objects, threads and thread groups: one current account class for a student. two thread groups: one for humans and one for the loan company & university. 1 student, 1 grandmother, 1 loan company & 1 university. after all the threads have terminated, it prints out the final statement for the student's bank account. 6seng001w coursework 2021/22 6 [17/10/2021] in addition it must print out reports of what it is doing and when it has finished creating the threads and other objects, etc. 2.2.2 general guidance about the java implementation the structure of the banking system is given in the following diagram. the fsp process for the student's bank account should be implemented as a java "monitor". each of the fsp processes that model the bank account clients should be implemented by a separate class that subclasses java’s thread, i.e. is a java thread. note: this coursework requires you to use a java monitor to solve this problem. therefore, you must not use “semaphores” or the “synchronised ( object ) { ... }” statement to solve the synchronisation issues of this problem. if you do use either of these features then you will be awarded a very low mark for the java component. each of the above java thread classes should implement the behaviour of the equivalent fsp process as closely as possible, i.e. they should perform a suitable number of bank transactions on the student’s bank account. the complete composite fsp system that models the banking system should be implemented by the "main" method for a java class. it should create the bank account monitor and all of the client threads; connect up all of the threads to the monitor and then starts all of the threads executing. 3. blackboard submission the following components are to be submitted via blackboard. all files should be compressed into a single zip archive. the zip archive should be named using your surname & "rd-cw", e.g. "howells_rd-cw.zip". the file formats used for the screen shot images must be either “.png”, ".jpg” or “.jpeg". note: if you are unable to produce screen shot image files in these format then email me with the formats you are able to produce to check that i can view them. if you submit a format that i cannot view you will get zero marks for that component of the coursework. 6seng001w coursework 2021/22 7 [17/10/2021] 3.1 components to submit 1. the fsp process composition analysis & design form for the fsp process composition representing the complete banking system. (pdf file format.) [10%] 2. the fsp program for the banking system, called "banksystem.lts". (plain ascii text file.) [20%] 3. the java source code for each individual java class that implements the fsp model. java code files (".java") should be plain ascii text format. note do not include the given classes and interfaces or a full project structure from an ide. [50%] 4. an example of the output produced by your java program. (plain text file) [5%] 5. screen shots demonstrating the use of the fsp tool ltsa to animate and analyse the fsp model and the java execution. (assuming image files are in png format.) (a) “output” tab showing the output after performing: - the compilation and composition (file: ltsa_output_cc.png) - a deadlock check (file: ltsa_output_deadlock.png) (b) “draw” tab showing the lts for the student process (file: ltsa_draw_student.png) (c) two “animator” pop-up window images: - one showing the states of the actions before the student has locked the current account process. (file: ltsa_animation_unlocked.png) - one showing the states of the actions after the student has locked the current account process. (file: ltsa_animation_locked.png>