develop #1

Open
HadiSharifi wants to merge 3 commits from develop into main
Showing only changes of commit b692d0cbc3 - Show all commits
+8 -9
View File
@@ -15,15 +15,14 @@ public class Main {
} }
Scanner scanner = new Scanner(input); Scanner scanner = new Scanner(input);
// TODO: while (scanner.hasNextLine()) {
// - Read each line from products.csv String line = scanner.nextLine();
// - For each line, parse productId, name, and price String[] cells = line.split(",");
// - The format of the file is like this: int productID = Integer.parseInt(cells[0]);
// [productId],[name],[price] String productName = cells[1];
// - Store Product objects in the productCatalog ArrayList double price = Double.parseDouble(cells[2]);
productCatalog.add(new Product(productID, productName, price));
// NOTE }
// - The data in products.csv is guaranteed to be valid.
} }
public static void main(String[] args) public static void main(String[] args)