Skip to content

Commit

Permalink
Feat: Added a basic main menu for testing purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
tommyah committed Mar 15, 2026
1 parent 9a015da commit 2e3b281
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/Main.java
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());
}
}
}

0 comments on commit 2e3b281

Please sign in to comment.