-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
78 additions
and
7 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
src/main/java/edu/ntnu/idi/idatt2003/gruppe42/Controller/StockController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| package edu.ntnu.idi.idatt2003.gruppe42.Controller; | ||
|
|
||
| import edu.ntnu.idi.idatt2003.gruppe42.Model.Stock; | ||
| import edu.ntnu.idi.idatt2003.gruppe42.Model.StockFileHandler; | ||
|
|
||
| import java.io.IOException; | ||
| import java.nio.file.Path; | ||
| import java.util.List; | ||
|
|
||
| public class StockController { | ||
|
|
||
| private List<Stock> market; | ||
|
|
||
| public StockController() { | ||
| try { | ||
| List<Stock> market = StockFileHandler.readFromFile(Path.of("stocks.csv")); | ||
| } catch (IOException e) { | ||
| System.out.println("File not found."); | ||
| } | ||
| } | ||
|
|
||
| public List<Stock> getMarket() { | ||
| return market; | ||
| } | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Companies by Market Cap | ||
| # Ticker,Name,Price | ||
|
|
||
| BAN,Banana Inc.,191.27 | ||
| APL,Apple Inc.,276.43 | ||
| TIR,Tire Inc.,404.68 | ||
| OIL,Oil Inc.,204.62 | ||
| SPC,Space Inc. (Class A),311.20 | ||
| WND,Turbine Inc. (Class C),311.62 | ||
| NUC,Nuclear Inc.,343.35 | ||
| CAR,Car Inc.,426.52 | ||
| HYD,Hydro,501.05 | ||
| TIP,Q-tip Inc.,128.75 | ||
| TED,Teddy Bear Inc.,1014.43 | ||
| UNI,NTNU,311.14 | ||
| COM,Communication Inc.,155.28 | ||
| MON,Monsters Inc.,329.54 | ||
| AIR,Plane Inc.,240.70 | ||
| ATB,Bus Inc.,539.52 |