From c16d7e9cbc49940f083f0c4e5c2bbcbcd43334e4 Mon Sep 17 00:00:00 2001 From: github-mathieu-capo Date: Fri, 19 Jan 2024 14:19:34 +0100 Subject: [PATCH] hmmm --- Account.java | 58 ---- Bank.java | 52 ---- Client.java | 85 ------ IAdminAccount.java | 9 - IBankDesk.java | 10 - IBusinessAccount.java | 11 - ICartLane.java | 47 ---- IConsultAccount.java | 9 - IConsultProvider.java | 15 -- IFastLane.java | 31 --- IJustHaveALook.java | 24 -- IOrderProvider.java | 18 -- Main.java | 24 -- Provider.java | 60 ----- Store.java | 248 ------------------ src/core/Account.java | 2 +- src/core/Bank.java | 2 +- src/core/Cart.java | 2 +- src/core/Client.java | 2 +- src/core/ItemInStock.java | 2 +- src/core/Order.java | 2 +- src/core/Provider.java | 2 +- src/core/Store.java | 4 +- .../InsufficientBalanceException.java | 2 +- .../exceptions/InvalidCartException.java | 2 +- .../exceptions/UnknownAccountException.java | 2 +- .../exceptions/UnknownItemException.java | 2 +- src/main/Main.java | 10 +- 28 files changed, 18 insertions(+), 719 deletions(-) delete mode 100644 Account.java delete mode 100644 Bank.java delete mode 100644 Client.java delete mode 100644 IAdminAccount.java delete mode 100644 IBankDesk.java delete mode 100644 IBusinessAccount.java delete mode 100644 ICartLane.java delete mode 100644 IConsultAccount.java delete mode 100644 IConsultProvider.java delete mode 100644 IFastLane.java delete mode 100644 IJustHaveALook.java delete mode 100644 IOrderProvider.java delete mode 100644 Main.java delete mode 100644 Provider.java delete mode 100644 Store.java diff --git a/Account.java b/Account.java deleted file mode 100644 index 2e8070e..0000000 --- a/Account.java +++ /dev/null @@ -1,58 +0,0 @@ -package estore.services.implem; - -import estore.services.interfaces.IAdminAccount; -import estore.services.interfaces.IBusinessAccount; -import estore.services.interfaces.IConsultAccount; -import estorePojo.exceptions.InsufficientBalanceException; - -public class Account implements IConsultAccount, IAdminAccount, IBusinessAccount { - - private double amount; - private String owner; - - @Override - public String getOwner() { - return owner; - } - - @Override - public void setOwner(String owner) { - this.owner = owner; - } - - @Override - public double getAmount() { - return amount; - } - - @Override - public void setAmount(double amount) { - this.amount = amount; - } - - @Override - public void credit(double amount) { - this.amount += amount; - } - - @Override - public void withdraw(double amount) throws InsufficientBalanceException { - if ( this.amount < amount ) - throw new InsufficientBalanceException(owner); - this.amount -= amount; - } - - /** - * Two AccountImpl instances are considered equals - * if they share the same owner. - * Of course, in a more realistic implementation, - * we should have a account number. - */ - public boolean equals( Object other ) { - if( ! (other instanceof Account) ) - return false; - Account otherAccount = (Account) other; - return ( otherAccount.owner == owner); - } - -} diff --git a/Bank.java b/Bank.java deleted file mode 100644 index ff7dd45..0000000 --- a/Bank.java +++ /dev/null @@ -1,52 +0,0 @@ -package estore.services.implem; - -import estore.services.interfaces.IAdminAccount; -import estore.services.interfaces.IBankDesk; -import estore.services.interfaces.IBusinessAccount; -import estorePojo.exceptions.InsufficientBalanceException; -import estorePojo.exceptions.UnknownAccountException; - -public class Bank implements IBankDesk { - - private IBusinessAccount estore, anne, bob; - - public Bank(IAdminAccount estoreAdmin, IAdminAccount anneAdmin, IAdminAccount bobAdmin, - IBusinessAccount estore, IBusinessAccount anne, IBusinessAccount bob) { - this.estore = estore; - this.anne = anne; - this.bob = bob; - - estoreAdmin.setOwner("Estore"); - estoreAdmin.setAmount(0); - anneAdmin.setOwner("Anne"); - anneAdmin.setAmount(30); - bobAdmin.setOwner("Bob"); - bobAdmin.setAmount(100); - } - - @Override - public void transfert(String from, String to, double amount) - throws InsufficientBalanceException, UnknownAccountException { - IBusinessAccount Afrom = null; - IBusinessAccount Ato = null; - - if (from.equals("E-Store")) - Afrom = estore; - else if (from.equals("Anne")) - Afrom = anne; - else if (from.equals("Bob")) - Afrom = bob; - - if (to.equals("E-Store")) - Ato = estore; - else if (to.equals("Anne")) - Ato = anne; - else if (to.equals("Bob")) - Ato = bob; - - // Perform the transfert - Afrom.withdraw(amount); - Ato.credit(amount); - } - -} diff --git a/Client.java b/Client.java deleted file mode 100644 index 3a6c2c1..0000000 --- a/Client.java +++ /dev/null @@ -1,85 +0,0 @@ -package estore.services.implem; - -import estore.data.Cart; -import estore.data.Order; -import estore.services.interfaces.ICartLane; -import estore.services.interfaces.IFastLane; -import estore.services.interfaces.IJustHaveALook; -import estorePojo.exceptions.InsufficientBalanceException; -import estorePojo.exceptions.InvalidCartException; -import estorePojo.exceptions.UnknownAccountException; -import estorePojo.exceptions.UnknownItemException; - -public class Client implements Runnable { - - private IJustHaveALook forLookingStore; - private IFastLane fastStore; - private ICartLane cartStore; - - public Client(IJustHaveALook forLookingStore, IFastLane fastStore, ICartLane cartStore) { - this.forLookingStore = forLookingStore; - this.fastStore = fastStore; - this.cartStore = cartStore; - } - // ----------------------------------------------------- - // Implementation of the Runnable interface - // ----------------------------------------------------- - - public void run() { - - // Scenario 1 - // Direct ordering of an item - // The scenario is run twice - System.out.println("Scenario 1"); - scenario1("CD", 2, "Lille", "Bob"); - scenario1("CD", 1, "Lille", "Anne"); - System.out.println(); - - // Scenario 2 - // Ordering of several items by using a cart - System.out.println("Scenario 2"); - scenario2(new String[] { "DVD", "CD" }, new int[] { 2, 1 }, "Lille", "Bob"); - System.out.println(); - } - - private void scenario1(String item, int qty, String address, String account) { - - try { - _scenario1(item, qty, address, account); - } catch (Exception e) { - System.err.println("Exception: " + e.getMessage()); - e.printStackTrace(); - } - } - - private void _scenario1(String item, int qty, String address, String account) - throws UnknownItemException, InsufficientBalanceException, UnknownAccountException { - - System.out.println("Ordering " + qty + " " + item + " for " + account + "..."); - Order order = fastStore.oneShotOrder(this, item, qty, address, account); - System.out.println(order); - } - - private void scenario2(String[] items, int[] qties, String address, String account) { - - try { - _scenario2(items, qties, address, account); - } catch (Exception e) { - System.err.println("Exception: " + e.getMessage()); - e.printStackTrace(); - } - } - - private void _scenario2(String[] items, int[] qties, String address, String account) - throws InsufficientBalanceException, UnknownAccountException, UnknownItemException, InvalidCartException { - - System.out.println("Ordering for " + account + "..."); - Cart cart = null; - for (int i = 0; i < items.length; i++) { - System.out.println("Item: " + items[i] + ", quantity: " + qties[i]); - cart = cartStore.addItemToCart(cart, this, items[i], qties[i]); - } - Order order = cartStore.pay(cart, address, account); - System.out.println(order); - } -} diff --git a/IAdminAccount.java b/IAdminAccount.java deleted file mode 100644 index 6950faf..0000000 --- a/IAdminAccount.java +++ /dev/null @@ -1,9 +0,0 @@ -package estore.services.interfaces; - -public interface IAdminAccount { - - void setOwner(String owner); - - void setAmount(double amount); - -} \ No newline at end of file diff --git a/IBankDesk.java b/IBankDesk.java deleted file mode 100644 index 69735c1..0000000 --- a/IBankDesk.java +++ /dev/null @@ -1,10 +0,0 @@ -package estore.services.interfaces; - -import estorePojo.exceptions.InsufficientBalanceException; -import estorePojo.exceptions.UnknownAccountException; - -public interface IBankDesk { - - void transfert(String from, String to, double amount) throws InsufficientBalanceException, UnknownAccountException; - -} \ No newline at end of file diff --git a/IBusinessAccount.java b/IBusinessAccount.java deleted file mode 100644 index 587dd3f..0000000 --- a/IBusinessAccount.java +++ /dev/null @@ -1,11 +0,0 @@ -package estore.services.interfaces; - -import estorePojo.exceptions.InsufficientBalanceException; - -public interface IBusinessAccount { - - void credit(double amount); - - void withdraw(double amount) throws InsufficientBalanceException; - -} \ No newline at end of file diff --git a/ICartLane.java b/ICartLane.java deleted file mode 100644 index 9011bdf..0000000 --- a/ICartLane.java +++ /dev/null @@ -1,47 +0,0 @@ -package estore.services.interfaces; - -import estore.data.Cart; -import estore.data.Order; -import estore.services.implem.Client; -import estorePojo.exceptions.InsufficientBalanceException; -import estorePojo.exceptions.InvalidCartException; -import estorePojo.exceptions.UnknownAccountException; -import estorePojo.exceptions.UnknownItemException; - -public interface ICartLane { - - /** - * Add an item to a cart. - * If the cart does not exist yet, create a new one. - * This method is called for each item one wants to add to the cart. - * - * @param cart a previously created cart or null - * @param client - * @param item - * @param qty - * @return - * Implementation dependant. - * Either a new cart at each call or the same cart updated. - * - * @throws UnknownItemException - * @throws MismatchClientCartException - * if the given client does not own the given cart - */ - Cart addItemToCart(Cart cart, Client client, Object item, int qty) - throws UnknownItemException, InvalidCartException; - - /** - * Once all the items have been added to the cart, - * this method finish make the payment - * - * @param cart - * @param address - * @param bankAccountRef - * @return the order - * - * @throws UnknownItemException - */ - Order pay(Cart cart, String address, String bankAccountRef) - throws InvalidCartException, UnknownItemException, InsufficientBalanceException, UnknownAccountException; - -} \ No newline at end of file diff --git a/IConsultAccount.java b/IConsultAccount.java deleted file mode 100644 index 2ecb4f3..0000000 --- a/IConsultAccount.java +++ /dev/null @@ -1,9 +0,0 @@ -package estore.services.interfaces; - -public interface IConsultAccount { - - String getOwner(); - - double getAmount(); - -} \ No newline at end of file diff --git a/IConsultProvider.java b/IConsultProvider.java deleted file mode 100644 index 3372d88..0000000 --- a/IConsultProvider.java +++ /dev/null @@ -1,15 +0,0 @@ -package estore.services.interfaces; - -import estorePojo.exceptions.UnknownItemException; - -public interface IConsultProvider { - - /** - * Get the price of an item provided by this provider. - * - * @param item - * @return - */ - double getPrice(Object item) throws UnknownItemException; - -} \ No newline at end of file diff --git a/IFastLane.java b/IFastLane.java deleted file mode 100644 index 7467a96..0000000 --- a/IFastLane.java +++ /dev/null @@ -1,31 +0,0 @@ -package estore.services.interfaces; - -import estore.data.Order; -import estore.services.implem.Client; -import estorePojo.exceptions.InsufficientBalanceException; -import estorePojo.exceptions.UnknownAccountException; -import estorePojo.exceptions.UnknownItemException; - -public interface IFastLane { - - /** - * Used by a client to order an item. - * The whole process of ordering is encapsulated by this method. - * If several items need to be ordered, this method needs to be - * called several times, but the items will appear in separate orders. - * - * @param client - * @param item - * @param qty - * @param address - * @param bankAccountRef - * @return the order - * - * @throws UnknownItemException - * @throws InsufficientBalanceException - * @throws UnknownAccountException - */ - Order oneShotOrder(Client client, Object item, int qty, String address, String bankAccountRef) - throws UnknownItemException, InsufficientBalanceException, UnknownAccountException; - -} \ No newline at end of file diff --git a/IJustHaveALook.java b/IJustHaveALook.java deleted file mode 100644 index f70a154..0000000 --- a/IJustHaveALook.java +++ /dev/null @@ -1,24 +0,0 @@ -package estore.services.interfaces; - -import estorePojo.exceptions.UnknownItemException; - -public interface IJustHaveALook { - - /** - * @param item a given item - * @return the price of a given item - * @throws UnknownItemException - */ - double getPrice(Object item) throws UnknownItemException; - - /** - * @param item a given item - * @param qty a given quantity - * @return - * true if the given quantity of the given item is available - * directly from the store - * i.e. without having to re-order it from the provider - */ - boolean isAvailable(Object item, int qty) throws UnknownItemException; - -} \ No newline at end of file diff --git a/IOrderProvider.java b/IOrderProvider.java deleted file mode 100644 index dc79c53..0000000 --- a/IOrderProvider.java +++ /dev/null @@ -1,18 +0,0 @@ -package estore.services.interfaces; - -import estorePojo.exceptions.UnknownItemException; - -public interface IOrderProvider { - - /** - * Emit an order for items. The provider returns the delay for delivering the - * items. - * - * @param store the store that emits the order - * @param item the item ordered - * @param qty the quantity ordered - * @return the delay (in hours) - */ - int order(IJustHaveALook store, Object item, int qty) throws UnknownItemException; - -} \ No newline at end of file diff --git a/Main.java b/Main.java deleted file mode 100644 index d257191..0000000 --- a/Main.java +++ /dev/null @@ -1,24 +0,0 @@ -package estore.services.implem; - -import estore.services.implem.Account; -import estore.services.implem.Bank; -import estore.services.implem.Client; -import estore.services.implem.Provider; -import estore.services.implem.Store; - -public class Main { - - public static void main(String[] args) { - Provider prov = new Provider(); - Account estore = new Account(); - Account anne = new Account(); - Account bob = new Account(); - Bank bank = new Bank(estore, anne, bob, estore, anne, bob); - Store store = new Store(prov, prov, bank); - Client cl = new Client(store, store, store); - - cl.run(); - - } - -} diff --git a/Provider.java b/Provider.java deleted file mode 100644 index 9743226..0000000 --- a/Provider.java +++ /dev/null @@ -1,60 +0,0 @@ -package estore.services.implem; - -import java.util.HashMap; -import java.util.Map; - -import estore.services.interfaces.IConsultProvider; -import estore.services.interfaces.IJustHaveALook; -import estore.services.interfaces.IOrderProvider; -import estorePojo.exceptions.UnknownItemException; - -public class Provider implements IConsultProvider, IOrderProvider { - - private Map itemPrices = new HashMap<>(); - - /** - * Constructs a new ProviderImpl - */ - public Provider() { - itemPrices.put("CD", 15d); - itemPrices.put("DVD", 20d); - } - - /** - * Get the price of an item provided by this provider. - * - * @param item - * @return - */ - @Override - public double getPrice(Object item) throws UnknownItemException { - - if (!itemPrices.containsKey(item)) - throw new UnknownItemException("Item " + item + " is not an item delivered by this provider."); - - Double price = (Double) itemPrices.get(item); - return price.doubleValue(); - } - - /** - * Emit an order for items. The provider returns the delay for delivering the - * items. - * - * @param store the store that emits the order - * @param item the item ordered - * @param qty the quantity ordered - * @return the delay (in hours) - */ - @Override - public int order(IJustHaveALook store, Object item, int qty) throws UnknownItemException { - - if (!itemPrices.containsKey(item)) - throw new UnknownItemException("Item " + item + " is not an item delivered by this provider."); - - // Actually the production process is quite chaotic - // We only know that the production a random number of hours!! - double r = Math.random() * 10 * qty; - return (int) r; - } - -} diff --git a/Store.java b/Store.java deleted file mode 100644 index e906684..0000000 --- a/Store.java +++ /dev/null @@ -1,248 +0,0 @@ -package estore.services.implem; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.Set; - -import estore.data.Cart; -import estore.data.ItemInStock; -import estore.data.Order; -import estore.services.interfaces.IBankDesk; -import estore.services.interfaces.ICartLane; -import estore.services.interfaces.IConsultProvider; -import estore.services.interfaces.IFastLane; -import estore.services.interfaces.IJustHaveALook; -import estore.services.interfaces.IOrderProvider; -import estorePojo.exceptions.InsufficientBalanceException; -import estorePojo.exceptions.InvalidCartException; -import estorePojo.exceptions.UnknownAccountException; -import estorePojo.exceptions.UnknownItemException; - -public class Store implements IJustHaveALook, IFastLane, ICartLane { - - private IConsultProvider providerPriceManager; - private IOrderProvider providerStockManager; - private IBankDesk bank; - - /** - * Constructs a new StoreImpl - */ - public Store(IConsultProvider priceManager, IOrderProvider stockManager, IBankDesk bk) { - this.providerPriceManager = priceManager; - this.providerStockManager = stockManager; - bank = bk; - } - - /** - * @param item a given item - * @return the price of a given item - * @throws UnknownItemException - */ - @Override - public double getPrice(Object item) throws UnknownItemException { - return providerPriceManager.getPrice(item); - } - - /** - * @param item a given item - * @param qty a given quantity - * @return true if the given quantity of the given item is available directly - * from the store i.e. without having to re-order it from the provider - */ - @Override - public boolean isAvailable(Object item, int qty) throws UnknownItemException { - - if (!itemsInStock.containsKey(item)) - throw new UnknownItemException("Item " + item + " does not correspond to any known reference"); - - ItemInStock iis = itemsInStock.get(item); - return (iis.getQuantity() >= qty); - } - - /** - * Add an item to a cart. If the cart does not exist yet, create a new one. This - * method is called for each item one wants to add to the cart. - * - * @param cart a previously created cart or null - * @param client - * @param item - * @param qty - * @return Implementation dependant. Either a new cart at each call or the same - * cart updated. - * - * @throws UnknownItemException - * @throws MismatchClientCartException if the given client does not own the - * given cart - */ - @Override - public Cart addItemToCart(Cart cart, Client client, Object item, int qty) - throws UnknownItemException, InvalidCartException { - - if (cart == null) { - // If no cart is provided, create a new one - cart = new Cart(client); - } else { - if (client != cart.getClient()) - throw new InvalidCartException("Cart " + cart + " does not belong to " + client); - } - - cart.addItem(item, qty); - - return cart; - } - - /** - * Once all the items have been added to the cart, this method finish make the - * payment - * - * @param cart - * @param address - * @param bankAccountRef - * @return the order - * - * @throws UnknownItemException - */ - @Override - public Order pay(Cart cart, String address, String bankAccountRef) - throws InvalidCartException, UnknownItemException, InsufficientBalanceException, UnknownAccountException { - - if (cart == null) - throw new InvalidCartException("Cart shouldn't be null"); - - // Create a new order - Order order = new Order(cart.getClient(), address, bankAccountRef); - orders.put(order.getKey(), order); - - // Order all the items of the cart - Set entries = cart.getItems().entrySet(); - for (Iterator iter = entries.iterator(); iter.hasNext();) { - Map.Entry entry = (Map.Entry) iter.next(); - Object item = entry.getKey(); - int qty = ((Integer) entry.getValue()).intValue(); - - treatOrder(order, item, qty); - } - double amount = order.computeAmount(); - - // Make the payment - // Throws InsuffisiantBalanceException if the client account is - // not sufficiently balanced - bank.transfert(bankAccountRef, toString(), amount); - - return order; - } - - /** - * A map of emitted orders. keys = order keys as Integers values = Order - * instances - */ - private Map orders = new HashMap<>(); - - /** - * A map of items available in the stock of the store. keys = the references of - * the items as Objects values = ItemInStock instances - */ - private Map itemsInStock = new HashMap<>(); - - /** - * Used by a client to order an item. The whole process of ordering is - * encapsulated by this method. If several items need to be ordered, this method - * needs to be called several times, but the items will appear in separate - * orders. - * - * @param client - * @param item - * @param qty - * @param address - * @param bankAccountRef - * @return the order - * - * @throws UnknownItemException - * @throws InsufficientBalanceException - * @throws UnknownAccountException - */ - @Override - public Order oneShotOrder(Client client, Object item, int qty, String address, String bankAccountRef) - throws UnknownItemException, InsufficientBalanceException, UnknownAccountException { - - // Create a new order - Order order = new Order(client, address, bankAccountRef); - orders.put(order.getKey(), order); - - // Treat the item ordered - treatOrder(order, item, qty); - double amount = order.computeAmount(); - - // Make the payment - // Throws InsuffisiantBalanceException if the client account is - // not sufficiently balanced - bank.transfert(bankAccountRef, toString(), amount); - - return order; - } - - /** - * Treat an item ordered by a client and update the corresponding order. - * - * @param order - * @param item - * @param qty - * @return - * - * @throws UnknownItemException - * @throws InsufficientBalanceException - * @throws UnknownAccountException - */ - private void treatOrder(Order order, Object item, int qty) throws UnknownItemException { - - // The number of additional item to order - // in case we need to place an order to the provider - final int more = 10; - - // The price of the ordered item - // Throws UnknownItemException if the item does not exist - final double price = providerPriceManager.getPrice(item); - - final double totalAmount = price * qty; - - // The delay (in hours) for delivering the order - // By default, it takes 2 hours to ship items from the stock - // This delay increases if an order is to be placed to the provider - int delay = 2; - - // Check whether the item is available in the stock - // If not, place an order for it to the provider - ItemInStock iis = (ItemInStock) itemsInStock.get(item); - if (iis == null) { - int quantity = qty + more; - delay += providerStockManager.order(this, item, quantity); - ItemInStock newItem = new ItemInStock(item, more, price, providerStockManager); - itemsInStock.put(item, newItem); - } else { - // The item is in the stock - // Check whether there is a sufficient number of them - // to match the order - if (iis.getQuantity() >= qty) { - iis.changeQuantity(qty); - } else { - // An order to the provider needs to be issued - int quantity = qty + more; - delay += providerStockManager.order(this, item, quantity); - iis.changeQuantity(more); - } - } - - // Update the order - order.addItem(item, qty, price); - order.setDelay(delay); - } - - // ----------------------------------------------------- - // Other methods - // ----------------------------------------------------- - - public String toString() { - return "E-Store"; - } -} diff --git a/src/core/Account.java b/src/core/Account.java index 395a7ab..d5bb42a 100644 --- a/src/core/Account.java +++ b/src/core/Account.java @@ -1,4 +1,4 @@ -package estore.services.implem.src.core; +package estore.services.interfaces.src.core; import estore.services.implem.src.estorePojo.exceptions.InsufficientBalanceException; diff --git a/src/core/Bank.java b/src/core/Bank.java index 3d66481..e4fa6cb 100644 --- a/src/core/Bank.java +++ b/src/core/Bank.java @@ -1,4 +1,4 @@ -package estore.services.implem.src.core; +package estore.services.interfaces.src.core; import estore.services.implem.src.estorePojo.exceptions.InsufficientBalanceException; import estore.services.implem.src.estorePojo.exceptions.UnknownAccountException; diff --git a/src/core/Cart.java b/src/core/Cart.java index 95e2c9d..2e11279 100644 --- a/src/core/Cart.java +++ b/src/core/Cart.java @@ -1,4 +1,4 @@ -package estore.services.implem.src.core; +package estore.services.interfaces.src.core; import java.util.HashMap; import java.util.Map; diff --git a/src/core/Client.java b/src/core/Client.java index 0ad9033..98ec02c 100644 --- a/src/core/Client.java +++ b/src/core/Client.java @@ -1,4 +1,4 @@ -package estore.services.implem.src.core; +package estore.services.interfaces.src.core; import estore.services.implem.src.estorePojo.exceptions.InsufficientBalanceException; import estore.services.implem.src.estorePojo.exceptions.InvalidCartException; diff --git a/src/core/ItemInStock.java b/src/core/ItemInStock.java index e41c95d..d66e0f4 100644 --- a/src/core/ItemInStock.java +++ b/src/core/ItemInStock.java @@ -1,4 +1,4 @@ -package estore.services.implem.src.core; +package estore.services.interfaces.src.core; public class ItemInStock { diff --git a/src/core/Order.java b/src/core/Order.java index 9696f73..8d7d865 100644 --- a/src/core/Order.java +++ b/src/core/Order.java @@ -1,4 +1,4 @@ -package estore.services.implem.src.core; +package estore.services.interfaces.src.core; import java.util.Date; import java.util.HashMap; diff --git a/src/core/Provider.java b/src/core/Provider.java index 5ec470a..498df6b 100644 --- a/src/core/Provider.java +++ b/src/core/Provider.java @@ -1,4 +1,4 @@ -package estore.services.implem.src.core; +package estore.services.interfaces.src.core; import java.util.HashMap; import java.util.Map; diff --git a/src/core/Store.java b/src/core/Store.java index 61ca777..f88c4a6 100644 --- a/src/core/Store.java +++ b/src/core/Store.java @@ -1,6 +1,6 @@ -package estore.services.implem.src.core; +package estore.services.interfaces.src.core; - import java.util.HashMap; +import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Set; diff --git a/src/estorePojo/exceptions/InsufficientBalanceException.java b/src/estorePojo/exceptions/InsufficientBalanceException.java index 4998822..45fb8d8 100644 --- a/src/estorePojo/exceptions/InsufficientBalanceException.java +++ b/src/estorePojo/exceptions/InsufficientBalanceException.java @@ -1,4 +1,4 @@ -package estore.services.implem.src.estorePojo.exceptions; +package estore.services.interfaces.src.estorePojo.exceptions; public class InsufficientBalanceException extends Exception { diff --git a/src/estorePojo/exceptions/InvalidCartException.java b/src/estorePojo/exceptions/InvalidCartException.java index 40c2178..3cd20fd 100644 --- a/src/estorePojo/exceptions/InvalidCartException.java +++ b/src/estorePojo/exceptions/InvalidCartException.java @@ -1,4 +1,4 @@ -package estore.services.implem.src.estorePojo.exceptions; +package estore.services.interfaces.src.estorePojo.exceptions; public class InvalidCartException extends Exception { diff --git a/src/estorePojo/exceptions/UnknownAccountException.java b/src/estorePojo/exceptions/UnknownAccountException.java index b92c547..ce317df 100644 --- a/src/estorePojo/exceptions/UnknownAccountException.java +++ b/src/estorePojo/exceptions/UnknownAccountException.java @@ -1,4 +1,4 @@ -package estore.services.implem.src.estorePojo.exceptions; +package estore.services.interfaces.src.estorePojo.exceptions; public class UnknownAccountException extends Exception { diff --git a/src/estorePojo/exceptions/UnknownItemException.java b/src/estorePojo/exceptions/UnknownItemException.java index f985fe4..e11724e 100644 --- a/src/estorePojo/exceptions/UnknownItemException.java +++ b/src/estorePojo/exceptions/UnknownItemException.java @@ -1,4 +1,4 @@ -package estore.services.implem.src.estorePojo.exceptions; +package estore.services.interfaces.src.estorePojo.exceptions; public class UnknownItemException extends Exception { diff --git a/src/main/Main.java b/src/main/Main.java index 6920a28..a3f9c58 100644 --- a/src/main/Main.java +++ b/src/main/Main.java @@ -1,9 +1,9 @@ -package estore.services.implem.src.main; +package estore.services.interfaces.src.main; -import estore.services.implem.src.core.Bank; -import estore.services.implem.src.core.Client; -import estore.services.implem.src.core.Provider; -import estore.services.implem.src.core.Store; +import estore.services.interfaces.src.core.Bank; +import estore.services.interfaces.src.core.Client; +import estore.services.interfaces.src.core.Provider; +import estore.services.interfaces.src.core.Store; public class Main {