Advertisement
spiny94

Untitled

Sep 12th, 2015
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.26 KB | None | 0 0
  1. package BankServices;
  2.  
  3.  
  4. import java.util.Collections;
  5. import java.util.LinkedList;
  6. import java.util.List;
  7.  
  8. public class Account {
  9.     List<Deposit> deposits = new LinkedList<>();
  10.     List<Withdrawal> withdrawals = new LinkedList<>(); 
  11.    
  12.     List<Operation> operations =  new LinkedList<>();
  13.     private String name;
  14.     private int code;  
  15.     private int date;
  16.     //Withdrawal    w;
  17.     private double initial;
  18.         private double value;
  19.         public Account(String name, int date, double initial){
  20.             this.name=name;
  21.             this.date=date;
  22.             this.initial=initial;
  23.     //withdrawals.add(w);
  24.         //value=initial;
  25.        
  26.         }
  27.    
  28.         public double getValue() {
  29.             // TODO Auto-generated method stub
  30.             return value;
  31.         }
  32.        
  33.         public String toString() {
  34.         return  code + "," + name + "," + date + "," + value;
  35.     }
  36.    
  37.    
  38.    
  39.     public List<Operation> getMovements() {
  40.         return operations;
  41.     }
  42.    
  43.     public List<Deposit> getDeposits() {
  44.        
  45.        
  46.         return deposits;
  47.     }
  48.  
  49.     public List<Withdrawal> getWithdrawals() {
  50.        
  51.         return withdrawals;
  52.     }
  53.    
  54.     public double getInitial() {
  55.         // TODO Auto-generated method stub
  56.         return initial;
  57.     }
  58.    
  59.     public void addValue(double v) {
  60.         // TODO Auto-generated method stub
  61.        
  62.     }
  63.     public int getDate() {
  64.         // TODO Auto-generated method stub
  65.         return date;
  66.     }
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement