Question: void Execute ( ) Executes the withdraw transaction and its underlying tasks. First of all, it changes the _ executed status to true. This method
"void Execute
Executes the withdraw transaction and its underlying tasks. First of all, it changes the executed status to true.
This method debits the associated account deducting the specified amount. It throws an
InvalidOperationException when the transaction has been already attempted and specifies the reason for
this exception. It also throws this type of exception when the associated account has insufficient funds. When
the operation succeeds, it updates the success field of the class setting its value to true.
SIT ObjectOriented Development Trimester
void Rollback
Performs a reversal of the preceding withdraw operation. This method deposits the funds back into the
associated account if the withdraw transaction was successful and has not been reversed yet. When the
rollback operation is successful, it updates the reversed field of the class. This method must throw an
InvalidOperationException indicating the particular error when the original withdraw operation has not
been finalized or when it has been already reversed." Can someone explain to me the sole purpose of the rollback and execute methods as well as how to implement them correctly based on the UML design. This is also C# code
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
