Object Oriented Design Question - Bank accounts A given bank has thousands of bank accounts. Each bank
Question:
Object Oriented Design Question - Bank accounts
A given bank has thousands of bank accounts. Each bank account has attributes such as balance, account_id, and is_sensitive. Go through all the bank accounts and if they are is_sensitive (True), tokenize them using a Tokenize service that has TokenServiceRequest and TokenServiceResponse class objects. If we're dealing with sensitive bank accounts (sensitive = True), then append 'tkn_' + account.id (e.g "tkn_1234") to account.
What would the object oriented design look like? IN JAVA.
------------
Example answer (INCORRECT ANSWER in python): This is not the correct answer but it was in the right direction in python. Please write the correct answer in JAVA instead.
class Account: ... def accountService(accounts): pass # you implemented
class TokenService: ... def tokenizeService(tokenServiceRequests): pass # you implemented
Account(id, balance, sensitive): self.id = id self.balance = balance self.sensitive = sensitive
TokenServiceRequest(trackingId, data): self.id = id self.data = data
TokenServiceResponse(trackingId, token): self.trackingId self.token = token
accounts = [Accounts("1234","12",True),Accounts("2233","22", False)] response = Account.accountService(accounts) print("True: ", tkn_" + accounts[0].account_id == response[0].account_id)
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill