/Users/johnr/Dropbox/johnrayworth.info/largeFilesOutsideJSR/__IB-Other/Other/IA-Solutions-2019/Guy/Product/Investor's Application IA Working Final Draft/src/investor/s/application/ia/Transaction.java
  1 /*
  2  * To change this license header, choose License Headers in Project Properties.
  3  * To change this template file, choose Tools | Templates
  4  * and open the template in the editor.
  5  */
  6 package investor.s.application.ia;
  7 
  8 /**
  9  *
 10  * @author 17887
 11  */
 12 public class Transaction {
 13 
 14     private String stockName = "not set yet";
 15     private String date = "not set yet";
 16     private int numberOfShares = -999;
 17     private double dividends = -999;
 18     private double price = -999.99;
 19     private boolean bought = true;
 20     private long timeStamp = -99999;
 21     private double averagePriceToDate = -999.99;
 22     private int totalSharesOwnedToDate = -99;
 23     private double transactionProfit = -9.99;
 24     private double ProfitToDate = -9.99;
 25     
 26     public Transaction(){
 27         
 28     }
 29 
 30     public Transaction(String stockName, String date, int numberOfShares, double dividends, double price, 
 31             boolean bought, long timeStamp, double averagePriceToDate, int totalSharesOwnedToDate, 
 32             double transactionProfit, double netProfitToDate){
 33         this.stockName = stockName;
 34         this.date = date;
 35         this.numberOfShares = numberOfShares;
 36         this.dividends = dividends;
 37         this.price = price;
 38         this.bought = bought;
 39         this.timeStamp = timeStamp;
 40         this.averagePriceToDate = averagePriceToDate;
 41         this.totalSharesOwnedToDate = totalSharesOwnedToDate;
 42         this.transactionProfit = transactionProfit;
 43         this.ProfitToDate = netProfitToDate;
 44     }
 45     
 46     //accessor methods
 47     public String getStockName(){
 48         return stockName;
 49     }
 50 
 51     public String getDate(){
 52         return date;
 53     }
 54     
 55     public int getNumberOfShares(){
 56         return numberOfShares;
 57     }
 58         
 59     public double getDividends(){
 60         return dividends;
 61     }
 62     
 63     public double getPrice(){
 64         return price;
 65     }
 66 
 67     public boolean getBought(){
 68         return bought;
 69     }
 70     
 71     public long getTimeStamp(){
 72         return timeStamp;
 73     }
 74     
 75     public double getAveragePriceToDate(){
 76         return averagePriceToDate;
 77     }
 78     
 79     public int getTotalSharesOwnedToDate(){
 80         return totalSharesOwnedToDate;
 81     }
 82     
 83     public double getProfitToDate(){
 84         return ProfitToDate;
 85     }
 86     
 87     public double getTransactionProfit(){
 88         return transactionProfit;
 89     }
 90 
 91     //modifier methods (sets)
 92     public void setStockName(String stockName){
 93         this.stockName = stockName;
 94     }
 95 
 96     public void setDate(String date){
 97         this.date = date;
 98     }
 99     
100     public void setNumberOfShares(int numberOfShares){
101         this.numberOfShares = numberOfShares;
102     }
103     
104     public void setDividends(double dividends){
105         this.dividends = dividends;
106     }
107     
108     public void setPrice(double price){
109         this.price = price;
110     }
111 
112     public void setBought(boolean bought){
113         this.bought = bought;
114     }
115     
116     public void setTimeStamp(long timeStamp){
117         this.timeStamp = timeStamp;
118     }
119     
120     public void setAveragePriceToDate(double averagePriceToDate){
121         this.averagePriceToDate = averagePriceToDate;
122     }
123     
124     public void setTotalSharesOwnedToDate(int totalSharesOwnedToDate){
125         this.totalSharesOwnedToDate = totalSharesOwnedToDate;
126     }
127     
128     public void setTransactionProfit(double transactionProfit){
129         this.transactionProfit = transactionProfit;
130     }
131     
132     public void setProfitToDate(double netProfitToDate){
133         this.ProfitToDate = netProfitToDate;
134     }
135     
136 }
137