-
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.
Feat: Added a basic main menu for testing purposes
- Loading branch information
Showing
1 changed file
with
11 additions
and
10 deletions.
There are no files selected for viewing
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 |
|---|---|---|
| @@ -1,17 +1,18 @@ | ||
| package edu.ntnu.idi.idatt2003.g40.mappe; | ||
|
|
||
| //TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or | ||
| // click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter. | ||
| import java.io.IOException; | ||
| import java.util.List; | ||
|
|
||
| public class Main { | ||
| static void main() { | ||
| //TIP Press <shortcut actionId="ShowIntentionActions"/> with your caret at the highlighted text | ||
| // to see how IntelliJ IDEA suggests fixing it. | ||
| IO.println(String.format("Hello and welcome!")); | ||
|
|
||
| for (int i = 1; i <= 5; i++) { | ||
| //TIP Press <shortcut actionId="Debug"/> to start debugging your code. We have set one <icon src="AllIcons.Debugger.Db_set_breakpoint"/> breakpoint | ||
| // for you, but you can always add more by pressing <shortcut actionId="ToggleLineBreakpoint"/>. | ||
| IO.println("i = " + i); | ||
| FileParser parser1 = new FileParser("src/main/resources/dummydata.txt"); | ||
| FileConverter converter1 = new FileConverter(); | ||
| try { | ||
| List<Stock> stocksInFile = converter1.getStocksFromStrings(parser1.readFile()); | ||
| parser1.writeStocksToFile(converter1.stocksToStrings(stocksInFile)); | ||
| stocksInFile.forEach(s -> System.out.println(s.getSymbol())); | ||
| } catch (IOException e) { | ||
| System.err.println(e.getMessage()); | ||
| } | ||
| } | ||
| } |