Answer the question
In order to leave comments, you need to log in
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:
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question