forked from denyskon/info-java
Compare commits
2 Commits
ed9f84a466
...
2694e7b7b0
Author | SHA1 | Date | |
---|---|---|---|
2694e7b7b0 | |||
1e9ecee355 |
BIN
Technikladen/Client.class
Normal file
BIN
Technikladen/Client.class
Normal file
Binary file not shown.
BIN
Technikladen/Order.class
Normal file
BIN
Technikladen/Order.class
Normal file
Binary file not shown.
BIN
Technikladen/OrderEntry.class
Normal file
BIN
Technikladen/OrderEntry.class
Normal file
Binary file not shown.
BIN
Technikladen/OrderSystem.class
Normal file
BIN
Technikladen/OrderSystem.class
Normal file
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, ArrayList<Client> clients) {
|
||||
public OrderSystem(StorageManager manager) {
|
||||
this.systemManager = manager;
|
||||
this.systemClients = clients;
|
||||
this.systemClients = new ArrayList<Client>();
|
||||
}
|
||||
public void addProduct(Product product) {
|
||||
this.systemManager.addProduct(product);
|
||||
@ -52,4 +52,4 @@ public class OrderSystem {
|
||||
System.out.println("ID: " + product.getID() + ", Name: " + product.getName() + ", Price: " + product.getPrice() + ", Amount: " + product.getAmount());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
BIN
Technikladen/Product.class
Normal file
BIN
Technikladen/Product.class
Normal file
Binary file not shown.
BIN
Technikladen/StorageManager.class
Normal file
BIN
Technikladen/StorageManager.class
Normal file
Binary file not shown.
@ -2,8 +2,8 @@ import java.util.ArrayList;
|
||||
|
||||
public class StorageManager {
|
||||
private ArrayList<Product> storageProducts;
|
||||
public StorageManager(ArrayList<Product> products) {
|
||||
this.storageProducts = products;
|
||||
public StorageManager() {
|
||||
this.storageProducts = new ArrayList<Product>();
|
||||
}
|
||||
public void addProduct(Product product) {
|
||||
this.storageProducts.add(product);
|
||||
|
BIN
Technikladen/TechStore.class
Normal file
BIN
Technikladen/TechStore.class
Normal file
Binary file not shown.
@ -1,13 +1,13 @@
|
||||
import java.util.ArrayList;
|
||||
import java.util.Scanner;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class TechStore {
|
||||
public static void p(String input) {
|
||||
System.out.print(input);
|
||||
}
|
||||
public static void main(String[] args) {
|
||||
StorageManager manager = new StorageManager(new ArrayList<Product>());
|
||||
OrderSystem system = new OrderSystem(manager, new ArrayList<Client>());
|
||||
StorageManager manager = new StorageManager();
|
||||
OrderSystem system = new OrderSystem(manager);
|
||||
Scanner scnr = new Scanner(System.in);
|
||||
while (true) {
|
||||
p("\nInput mode: ");
|
||||
@ -106,6 +106,3 @@ public class TechStore {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user