package has_a_relationship;

public class Computer {
	private CPU cpu;
	private Memory memory;
	
	
	public Computer(CPU cpu, Memory memory) {
		super();
		this.cpu = cpu;
		this.memory = memory;
	}
	
	public Computer() {
		super();
	}

	@Override
	public String toString() {
		return "Computer [cpu=" + cpu + ", memory=" + memory + "]";
	}

	public CPU getCpu() {
		return cpu;
	}

	public void setCpu(CPU cpu) {
		this.cpu = cpu;
	}

	public Memory getMemory() {
		return memory;
	}

	public void setMemory(Memory memory) {
		this.memory = memory;
	}
	
	public void start() {
		this.cpu.process();
		this.memory.load();
	}
}