public class CPU{
public void StartUp(){
System.out.println("the cup is startup");
}
public void shutdown(){
System.out.println("the cpu is shutdown");
}
}
public class Memory{
public void StartUp(){
System.out.println("the memeory is startup");
}
public void shutdown(){
System.out.println("the memory is shutdown");
}
public class Disk{
public void StartUp(){
System.out.println("the disk is startup");
}
public void shutdown(){
System.out.println("the disk is shutdown");
}
public class Computer{
private CPU cpu;
private Memory memory;
private Disk disk;
public Computer(){
cpu = new CPU();
memory = new Memory();
disk = new Disk();
}
public void startup(){
cpu.startup();
memory.startup();
disk.startup();
}
public void shutdown(){
cpu.shutdown();
memory.shutdown();
disk.shutdown();
}
}
public class User{
Computer computer = new Computer();
computer.startup();
computer.shutdown();
}