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.
SIT232 Object-Oriented Development Trimester 1,2024
2
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)
"void Execute ( ) Executes the withdraw

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!