info-java/Technikladen/Receipt.java

15 lines
386 B
Java
Raw Normal View History

2024-10-14 18:33:34 +02:00
package tech_store;
public class Receipt {
private Order receiptOrder;
private Client receiptClient;
public Receipt(Order order, Client client) {
this.receiptOrder = order;
this.receiptClient = client;
}
public void printReceipt() {
System.out.println("Client:\n" + this.receiptClient.toString());
System.out.println(this.receiptOrder.createReceipt());
}
}