java composition best practices 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;
}