Question: PROBLEM H2 (60 points) The ATM component supports the following operations: create(inx,stringy)card(intpin(stringx)deposit(intd);withdraw(intw);balance(;;lock(stringx)unlock(stringx)exit()//ATMiscreated//ATMcardisinsertedwherexisabalanceandyisapin#//providespin#//depositamountd//withdrawamountw//displaythecurrentbalance//locktheATM,wherexisapin#//unlocktheATM,wherexispin#//exitfromtheATM A simplified EFSM model for the ATM component is shown on the next

PROBLEM H2 (60 points) The ATM component supports the following operations: create(inx,stringy)card(intpin(stringx)deposit(intd);withdraw(intw);balance(;;lock(stringx)unlock(stringx)exit()//ATMiscreated//ATMcardisinsertedwherexisabalanceandyisapin#//providespin#//depositamountd//withdrawamountw//displaythecurrentbalance//locktheATM,wherexisapin#//unlocktheATM,wherexispin#//exitfromtheATM A simplified EFSM model for the ATM component is shown on the next page. Design the system using the State design pattern. Provide two solutions: - a decentralized version of the State pattern - a centralized version of the State pattern Notice that the components in your design should be de-coupled as much as possible. In addition, components should have high cohesion. For each solution: a. Provide a class diagram for the system. For each class list all operations with parameters and specify them using pseudo-code. In addition, for each class provide its attributes and data structures. Make the necessary assumptions for your design. b. Provide a sequence diagram for the following operation sequence: create(), card(900, "abc"), pin("abc"), deposit(300), withdraw(I10), exito When the EFSM model is "executed" on this sequence of operations, the following sequence of transitions is traversed/executed: T1,T2,T19,T14,T7,T5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
