R
R
RtoSAI2019-03-16 12:35:25
Java
RtoSAI, 2019-03-16 12:35:25

How to make it so that the deposit of money is made from one object, and the withdrawal from another?

There is a class BankAccount. It is necessary to create an account object and two firstCard and secondCard objects belonging to the account in the demo class. There is also a nested Card class. With the help of which the cards are created:
final Account account = new Account("number", "name");
final Account.Card firstCard = account.new Card("numberOfCard");
final Account.Card secondCard = account.new Card("numberOfCard");
Then create a method with the help of which money is deposited from firstCard, and withdrawn through secondCard. Please help me implement this I am
attaching a UML diagram:
Account1.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question