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
23 lines (16 loc) · 635 Bytes
/
Copy pathMain.java
File metadata and controls
23 lines (16 loc) · 635 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package com.openclassrooms;
import com.openclassrooms.store.*;
public class Main {
public static void main(String[] args) {
Mouse dellMouse = new Mouse(Brand.DELL, 20.0);
Screen samsungScreen = new Screen(Brand.SAMSUNG, 150.0, "1920x1080");
Inventory inventory = new Inventory();
inventory.addItem(samsungScreen, 5);
inventory.addItem(dellMouse, 12);
inventory.removeItem(dellMouse, 2);
inventory.displayInventoryOnConsole();
inventory.removeItem(dellMouse, 12);
inventory.displayInventoryOnConsole();
inventory.displayItemsOnConsole();
}
}