Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Accounts {
- public static void main(String[] args) {
- // Code in Account.Java should not be touched!
- // write your code here
- Account A = new Account("A", 100.0);
- Account B = new Account("B", 0.0);
- Account C = new Account("C", 0.0);
- transfer(A, B, 50);
- transfer(B,C,25);
- }
- public static void transfer(Account from, Account to, double howMuch)
- {
- from = from-howMuch;
- to = to+howMuch;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement