Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 76 additions & 4 deletions caseStudy/services/src/main/java/pojo/Company.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,81 @@
*/
public class Company {

// TODO - Think back to your modelling session
// Define the attributes of a Company based on the
// provided data in resources/data
// INSTANCE VARS
String symbol;
String name;
String headquartersCity;
String headquartersStateOrCountry;
int numberOfEmployees;
String sector;
String industry;

// TODO - add getter and setter methods for your attributes
// CONSTRUCTOR
public Company(String symbol, String name, String headquartersCity,
String headquartersStateOrCountry, int numberOfEmployees,
String sector, String industry) {
this.symbol = symbol;
this.name = name;
this.headquartersCity = headquartersCity;
this.headquartersStateOrCountry = headquartersStateOrCountry;
this.numberOfEmployees = numberOfEmployees;
this.sector = sector;
this.industry = industry;
}

// METHODS
public String getSymbol() {
return this.symbol;
}
public void setSymbol(String symbol) {
this.symbol = symbol;
}


public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}


public String getHeadquartersCity() {
return this.headquartersCity;
}
public void setHeadquartersCity(String headquartersCity) {
this.headquartersCity = headquartersCity;
}


public String getHeadquartersStateOrCountry(String headquartersStateOrCountry) {
return this.headquartersStateOrCountry;
}
public void setHeadquartersStateOrCountry(String headquartersStateOrCountry) {
this.headquartersStateOrCountry = headquartersStateOrCountry;
}


public int getNumberOfEmployees() {
return this.numberOfEmployees;
}
public void setNumberOfEmployees(int numberOfEmployees) {
this.numberOfEmployees = numberOfEmployees;
}


public String getSector() {
return this.sector;
}
public void setSector(String sector) {
this.sector = sector;
}


public String getIndustry() {
return this.industry;
}
public void setIndustry(String industry) {

}
}
38 changes: 34 additions & 4 deletions caseStudy/services/src/main/java/pojo/Stock.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,39 @@
*/
public class Stock {

// TODO - Think back to your modelling session
// Define the attributes of a stock price based on the
// provided data in resources/data
// INSTANCE VARS
String symbol;
int month;
int day;
int year;
float endOfDayPrice;

// CONSTRUCTOR
public Stock(String symbol, int month, int day, int year,
float endOfDayPrice) {
this.symbol = symbol;
this.month = month;
this.day = day;
this.year = year;
this.endOfDayPrice = endOfDayPrice;
}

// METHODS
public String getSymbol() {
return this.symbol;
}
public void setSymbol(String symbol) {
this.symbol = symbol;
}


public String getDate() {
return month + "/" + day + "/" + year;
}
public void setDate(String date) {
this.month = Integer.parseInt(date.substring(0,2));
this.day = Integer.parseInt(date.substring(2,4));
this.day = Integer.parseInt(date.substring(5));
}

// TODO - add getter and setter methods for your attributes
}
Loading