/Users/johnr/Desktop/IA_14_-_Stage_P_Upload_all_2021-04-08/CS IA Shoe Reselling Aryan April 6th /src/Shoes.java
  1 
  2 import javax.swing.SpinnerModel;
  3 import javax.swing.SpinnerNumberModel;
  4 
  5 /*
  6  * To change this license header, choose License Headers in Project Properties.
  7  * To change this template file, choose Tools | Templates
  8  * and open the template in the editor.
  9  */
 10 
 11 
 12 /**
 13  *
 14  * @author 19808
 15  */
 16 public class Shoes {
 17     private String name = "Not Set Yet"; //If the name has a number in it, convert it
 18     private double size = -99999.99999;
 19     private double buyingPrice = -99999.99999;
 20     private double sellingPrice = -99999.99999;
 21     private int shoeDateBoughtDay = -9999999;
 22     private int shoeDateBoughtMonth = -9999999;
 23     private int shoeDateBoughtYear = -9999999;
 24     
 25     private String dateBought = "unknown";
 26     
 27     private int shoeDateSoldDay = -9999999;
 28     private int shoeDateSoldMonth = -9999999;
 29     private int shoeDateSoldYear = -9999999;
 30     private String collaboration = "Not Set Yet";
 31     private String brand = "Not Set Yet";
 32     private double profitability = -99999.99999; 
 33     
 34     private String gender = "NA";
 35     
 36     //Overloaded constructor method
 37     public Shoes(){
 38     
 39     }
 40     
 41     //Constructor method
 42     public Shoes(String name, double size, double buyingPrice, double sellingPrice, int shoeDateBoughtDay, int shoeDateBoughtMonth, int shoeDateBoughtYear, String datebought, int shoeDateSoldDay, 
 43             int shoeDateSoldMonth, int shoeDateSoldYear, String collaboration, String brand, double profitability, String gender) { 
 44         this.name = name; 
 45         this.size = size;
 46         this.buyingPrice = buyingPrice;
 47         this.sellingPrice = sellingPrice;
 48         this.shoeDateBoughtDay = shoeDateBoughtDay;
 49         this.shoeDateBoughtMonth = shoeDateBoughtMonth;
 50         this.shoeDateBoughtYear = shoeDateBoughtYear;
 51         this.shoeDateSoldDay = shoeDateSoldDay;
 52         this.shoeDateSoldMonth = shoeDateSoldMonth;
 53         this.shoeDateSoldYear = shoeDateSoldYear;
 54         this.collaboration = collaboration;
 55         this.brand = brand;
 56         this.profitability = profitability;
 57         this.gender = gender;
 58         
 59         this.dateBought = shoeDateBoughtDay + "/" + shoeDateBoughtMonth + "/" + shoeDateBoughtYear;
 60         
 61     }
 62 
 63     Shoes(String text) {
 64         throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
 65     }
 66     
 67      //Get Methods: All of the following have a no precondition other than a need to be called, and for the attributes to possess the necessary data
 68     //Otherwise the post condition would be that the program retrieves the necessary attribute that is desired.
 69     
 70     public void setSellingPrice(double price)
 71     {
 72         sellingPrice = price;
 73     }
 74     
 75     public double getSellingPrice()
 76     {
 77         return sellingPrice;
 78     }
 79 
 80     public String getBoughtDate()
 81     {
 82         return dateBought;
 83     }
 84     
 85     public String getGender()
 86     {
 87         return gender;
 88     }
 89     
 90     public String getName() {
 91         return name;
 92     }
 93     
 94     public double getSize(){
 95         return size;
 96     }
 97     
 98     public double getBuyingPrice(){
 99         return buyingPrice;
100     }
101     
102     public int getShoeDateBoughtDay(){
103         return shoeDateBoughtDay;
104     }
105     
106     public int getShoeDateBoughtMonth(){
107         return shoeDateBoughtMonth;
108     }
109     
110     public int getShoeDateBoughtYear(){
111         return shoeDateBoughtYear;
112     }
113     
114     public int getShoeDateSoldDay(){
115         return shoeDateSoldDay;
116     }
117     
118     public int getShoeDateSoldMonth(){
119         return shoeDateSoldMonth;
120     }
121     
122     public int getShoeDateSoldYear(){
123         return shoeDateSoldYear;
124     }
125     
126     
127     public String getCollaboration(){
128         return collaboration ;
129     }
130         
131     public String getBrand(){
132         return brand ;
133     }
134     
135     public double getProfitability(){
136         return profitability ;
137     }
138     
139     //Set Methods: 
140     //Pre-condition: All the methods have a precondition of having the specifc attribute inputted by the user. 
141     //Post-condition: The program would put and associate it with the variable name for the attribute.
142     
143     public void setName (String name){
144         this.name = name;
145     }
146     
147     public void setSize (double size){
148         this.size = size;
149     }
150     
151       public void setBuyingPrice (double buyingPrice){
152         this.buyingPrice = buyingPrice;
153     }
154     
155     public void setShoeDateBoughtDay(int shoeDateBoughtDay){
156         this.shoeDateBoughtDay = shoeDateBoughtDay;
157     }
158     
159     public void setShoeDateBoughtMonth(int shoeDateBoughtMonth){
160         this.shoeDateBoughtMonth = shoeDateBoughtMonth;
161     }
162     
163     public void setShoeDateBoughtYear(int shoeDateBoughtYear){
164         this.shoeDateBoughtYear = shoeDateBoughtYear;
165     }
166     
167     public void setShoeDateSoldDay(int shoeDateSoldDay){
168         this.shoeDateSoldDay = shoeDateSoldDay;
169     }
170     
171     public void setShoeDateSoldMonth(int shoeDateSoldMonth){
172         this.shoeDateSoldMonth = shoeDateSoldMonth;
173     }
174     
175     public void setShoeDateSoldYear(int shoeDateSoldYear){
176         this.shoeDateSoldYear = shoeDateSoldYear;
177     }
178     
179     
180     public void setCollaboration(String collaboration){
181         this.collaboration = collaboration;
182     }
183         
184     public void setBrand(String brand){
185         this.brand = brand;
186     }
187     
188     public void setProfitability(double profitability){
189         this.profitability = profitability;
190     }
191     
192     
193     
194 }
195 
196     
197     
198         
199     
200     
201     
202     
203     
204     
205   
206