Question: 1. The following Java class is a good example of a ______ OODP. class ComputerComposite { private CPU processor; private Memory ram; private HardDrive hd;

1. The following Java class is a good example of a ______ OODP. class ComputerComposite { private CPU processor; private Memory ram; private HardDrive hd; public ComputerComposite() { this.processor = new CPU(); this.ram = new Memory(); this.hd = new HardDrive(); } public void start() { processor.freeze(); ram.load(BOOT_ADDRESS, hd.read(BOOT_SECTOR, SECTOR_SIZE)); processor.jump(BOOT_ADDRESS); processor.execute(); } } /* Client */ class You { public static void main(String[] args) { ComputerComposite computer = new ComputerComposite (); computer.start(); } }

Bridge, Flyweight ,Singleton, Composite, Facade, Prototype

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!