Suppose all the Air Conditioner (AC) manufacturers in India are using the compressor made by a company called Indo-Air. Indo-Air is using createCompressor(type) method to build and return the required compressor based on the types. Till today, Indo-Air has provided a copy of the createCompressor(type) method to Blue Star, Career, LG, and Samsung, and all these AC manufacturers are using the same method to build the ACcompressor as per their needs. If there is any change in the createCompressor(type) method, Indo-Air updates the copies of methods supplied to its clients. Do you think that the current scheme is a good scheme? If not, what do you suggest to improve? Design a system of classes to model the solution. Consider ReciprocatingAirConditioner, RotaryAirConditioningand CentrifugalAirConditioning as the compressor types available.
Aucun commentaire:
Enregistrer un commentaire