Skip to content

Commit

Permalink
classe metodene
Browse files Browse the repository at this point in the history
made the class methods, next commit i will document them
  • Loading branch information
EspenTinius committed Feb 11, 2026
1 parent 09a0f2b commit ec95b81
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/Stock.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,20 @@ public Stock(String symbol, String company, BigDecimal salesPrice){
this.symbol = symbol;
this.company = company;
}

public String getSymbol(){
return symbol;
}

public String getCompany(){
return company;
}

public BigDecimal getSalesPrice() {
return prices.getLast();
}

public void addNewSalesPrice(BigDecimal price) {
prices.add(price);
}
}

0 comments on commit ec95b81

Please sign in to comment.