updates
This commit is contained in:
@@ -34,8 +34,6 @@ public interface Api {
|
||||
* is not already in the inventory before adding
|
||||
*/
|
||||
|
||||
InventoryManager.getInstance().getArtPieceTypes().forEach(System.out::println);
|
||||
|
||||
/* Add Inventory */
|
||||
|
||||
InventoryManager.getInstance().add(make(new Drawing()));
|
||||
@@ -45,17 +43,24 @@ public interface Api {
|
||||
InventoryManager.getInstance().add(make(new Sculpture()));
|
||||
InventoryManager.getInstance().add(make(new Sculpture()));
|
||||
|
||||
/* Add Customer */
|
||||
//CustomerManager.getInstance().add(new Customer("Kate", "Demsey", "310-676-4844", "kate@museum.com"));
|
||||
//CustomerManager.getInstance().add(new Customer("Jim", "Gumbly", "203-676-4844", "jim@homedeco.com"));
|
||||
CustomerManager.getInstance().load();
|
||||
/*
|
||||
* 2. Remove art object from the inventory
|
||||
*/
|
||||
InventoryManager imgr = InventoryManager.getInstance();
|
||||
InventoryPiece art = imgr.find("####");
|
||||
imgr.Remove(art);
|
||||
System.out.println(String.format("Art Pieces in INVENTORY: count %d", imgr.INVENTORY.size()));
|
||||
InventoryPiece art = imgr.INVENTORY.getLast();
|
||||
InventoryPiece piece = imgr.find(art.getId());
|
||||
imgr.Remove(piece);
|
||||
System.out.println(String.format("Removed 1 Art Pieces from INVENTORY: count %d", imgr.INVENTORY.size()));
|
||||
/*
|
||||
* 3. Return a list of all art objects from inventory
|
||||
*/
|
||||
CustomerManager cmgr = CustomerManager.getInstance();
|
||||
Customer customer = cmgr.findByEmail("kate@it.com");
|
||||
Customer customer = cmgr.findByEmail("kate@museum.com");
|
||||
InventoryList customerCart = new InventoryList();
|
||||
|
||||
TransactionManager tmgr = TransactionManager.getInstance();
|
||||
|
||||
16
Api/src/resources/db/customers.json
Normal file
16
Api/src/resources/db/customers.json
Normal file
@@ -0,0 +1,16 @@
|
||||
[
|
||||
{
|
||||
"email": "kate@museum.com",
|
||||
"id": "1039445606",
|
||||
"nameFirst": "Kate",
|
||||
"nameLast": "Demsey",
|
||||
"phone": "310-676-4844"
|
||||
},
|
||||
{
|
||||
"email": "jim@homedeco.com",
|
||||
"id": "4312148107",
|
||||
"nameFirst": "Jim",
|
||||
"nameLast": "Gumbly",
|
||||
"phone": "203-676-4844"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user