vendredi 1 juillet 2016

What Design Pattern can be used here?

I am new to Design pattern. Can anybody help me to identify which design pattern can be used here ? please provide reason also.

Assume that we would like to model a personal computer (PC). A PC consists of a cabinet, which includes a chassis. A chassis on its turn is composed of a bus, a floppy disk drive, a memory unit, a CPU, and a power supply. A bus incorporates a network card. We would like to treat all the equipment components in a uniform way. The basic operations needed are netPrice and powerConsumption, which return the net price and the power consumption of each component respectively. In addition, each component may have its own specific semantics.

Aucun commentaire:

Enregistrer un commentaire