Update Technikladen/Client.java

Removed package line
This commit is contained in:
Igor Bartkowski 2024-10-14 19:05:24 +02:00
parent ef25b53add
commit c2f1ec6efd

@ -1,39 +1,37 @@
package tech_store; import java.util.ArrayList;
import java.util.ArrayList; public class Client {
private static int clientCounter;
public class Client { private int clientID;
private static int clientCounter; private String clientName;
private int clientID; private String clientEmail;
private String clientName; private ArrayList<Order> clientOrders;
private String clientEmail; public Client(String clientName, String clientEmail) {
private ArrayList<Order> clientOrders; clientCounter++;
public Client(String clientName, String clientEmail) { this.clientID = clientCounter;
clientCounter++; this.clientName = clientName;
this.clientID = clientCounter; this.clientEmail = clientEmail;
this.clientName = clientName; this.clientOrders = new ArrayList<Order>();
this.clientEmail = clientEmail; }
this.clientOrders = new ArrayList<Order>(); public int getID() {
} return this.clientID;
public int getID() { }
return this.clientID; public String getName() {
} return this.clientName;
public String getName() { }
return this.clientName; public String getEmail() {
} return this.clientEmail;
public String getEmail() { }
return this.clientEmail; public ArrayList<Order> getOrders() {
} return this.clientOrders;
public ArrayList<Order> getOrders() { }
return this.clientOrders; public void addOrder(Order order) {
} this.clientOrders.add(order);
public void addOrder(Order order) { }
this.clientOrders.add(order); public boolean hasOrder() {
} return !this.clientOrders.isEmpty();
public boolean hasOrder() { }
return !this.clientOrders.isEmpty(); public String toString() {
} return ("ID: " + this.clientID + ", Name: " + this.clientName + ", Email: " + this.clientEmail);
public String toString() { }
return ("ID: " + this.clientID + ", Name: " + this.clientName + ", Email: " + this.clientEmail); }
}
}