forked from OpenClassrooms-Student-Center/Challenge_Java_P2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
32 lines (23 loc) · 858 Bytes
/
Main.java
File metadata and controls
32 lines (23 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.openclassrooms;
import com.openclassrooms.store.Brand;
import com.openclassrooms.store.Inventory;
import com.openclassrooms.store.Mouse;
import com.openclassrooms.store.Screen;
/**
* Début du programme: classe applicative
*/
public class Main {
public static void main(String[] args) {
System.out.println("INVENTORY POC");
Mouse delMouse = new Mouse(Brand.DELL, 20.0);
Screen samsungScreen = new Screen(Brand.SAMSUNG, 150.0, "1920x10800");
Inventory inventory = new Inventory();
inventory.addItem(samsungScreen, 5);
inventory.addItem(delMouse, 12);
inventory.removeItem(delMouse, 2);
inventory.displayInventoryOnConsole();
inventory.removeItem(delMouse, 12);
inventory.displayInventoryOnConsole();
inventory.displayItemsOnConsole();
}
}