Newer
Older
POS_for_GUI / src / resources / POS.java
student on 4 Apr 2022 700 bytes [add]featuring to generate window
package resources;
import java.util.*;

//-------------------------------------------------------------------------
// todo: add name field
public class POS {
	private Points points;
	private Total total;
	private History history;
	private Payment payment;
	public POS() {
		points = new Points();
		total = new Total();
		history = new History(total);
		payment = new Payment(points,history);
	}
	public void purchase(int x) {
		this.payment.purchase(x);
	}
	public int getTotal() {
		return total.getValue();
	}
	public int getPayment() {
		return payment.getValue();
	}
	public List<Integer> getHistory() {
		return history.getValue();
	}
	public int getPoints() {
		return points.getValue();
	}
}