Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Diagram 1: CashIn Diagram 2: Process Sale CashIn 1) During \"CashIn\", what step

ID: 3818157 • Letter: D

Question

Diagram 1: CashIn

Diagram 2: Process Sale

CashIn

1) During "CashIn", what steps must occur in order for the first instance of the "LoggedInScreen" message to be generated by "Register".

2) During "CashIn", what happens if an "AuthorizationStatus" of not true is returned from "UserDatabase". According to the diagram, how many times can this happen?

3) What parameters must the class "Register" be able to process?

ProcessSale

4) How many times does the system go through the "EnterItem - Description, subtotal" loop?

5) How many objects are explicitly destroyed during the ProcessSale interaction?

6) List a pair of messages that could have been represented as an exclusive conditional pair? What would the condition be?

7) According to Common UML Interaction Diagram notation as described by Larman, what is wrong with the representation of each "Create" message in the diagram?

Alt Cashier Login(ID, Password) Authorization true Logged InSaeen else 1 Retry prompt Insert amount amountVerificationStatus true Open Drawer else Re-count prompt place insert, close drawer Acceptance Message LoggedlnSaeen Register UserDatabase. Authorize UserID, Password) AuthorizationStatus verify Count amount) amountVerificationStatus Cashin Accounting Database

Explanation / Answer

CashIn

1) During "CashIn" the steps that must occur in order for the first instance of the "LoggedInScreen" message to be generated by "Register" are:
   i) Cashier first of all enter his/her login deatils that included ID and password.
   ii) Then authorization of these login credentials are being done from user database.
   iii) If the authorization is sucessfully then the first instance of the "LoggedInScreen" message will be generated.

2) During authorization if user credentials are not available on user database then authorization status will get failed and in this condition LoggedInScreen will not be displayed. Its can happen every time when the cashier is trying to login in.

3) The Register class can able to process following parameters:
   i) Authorization Status parameter
   ii) Can process amount parameter
   iii) Can process parameter related to drawer.

ProcessSale

4) The system will go through the "EnterItem - Description, subtotal" loop, depends upon the number of items. for each item we have to enter these details. Suppose if we have 10 items then for ten times the loop will be executed.