Write java code for showing the following composition relation code example
Example: composition java
public class motherboard{
private CPU cpu;
}
public class CPU{
private int amtOfCores;
private String brand;
}
public class motherboard{
private CPU cpu;
}
public class CPU{
private int amtOfCores;
private String brand;
}