composition in java real time 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;
}