Compare commits

..

No commits in common. "2694e7b7b056a9ace4c40bab3c6713556a8b4d90" and "ed9f84a466ea1c9b3393608d8db49fdec0f5233d" have entirely different histories.

10 changed files with 11 additions and 8 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -3,9 +3,9 @@ import java.util.ArrayList;
public class OrderSystem {
private StorageManager systemManager;
private ArrayList<Client> systemClients;
public OrderSystem(StorageManager manager) {
public OrderSystem(StorageManager manager, ArrayList<Client> clients) {
this.systemManager = manager;
this.systemClients = new ArrayList<Client>();
this.systemClients = clients;
}
public void addProduct(Product product) {
this.systemManager.addProduct(product);

Binary file not shown.

Binary file not shown.

@ -2,8 +2,8 @@ import java.util.ArrayList;
public class StorageManager {
private ArrayList<Product> storageProducts;
public StorageManager() {
this.storageProducts = new ArrayList<Product>();
public StorageManager(ArrayList<Product> products) {
this.storageProducts = products;
}
public void addProduct(Product product) {
this.storageProducts.add(product);

Binary file not shown.

@ -1,13 +1,13 @@
import java.util.Scanner;
import java.util.ArrayList;
import java.util.Scanner;
public class TechStore {
public static void p(String input) {
System.out.print(input);
}
public static void main(String[] args) {
StorageManager manager = new StorageManager();
OrderSystem system = new OrderSystem(manager);
StorageManager manager = new StorageManager(new ArrayList<Product>());
OrderSystem system = new OrderSystem(manager, new ArrayList<Client>());
Scanner scnr = new Scanner(System.in);
while (true) {
p("\nInput mode: ");
@ -106,3 +106,6 @@ public class TechStore {
}
}
}