Sunday, 8 September 2013

Design: What could be the best possible way to design a class for car brands?

Design: What could be the best possible way to design a class for car brands?

I was asked this question in an interview:
Some car brands are there and those have some common character and each
brand has some different characters. How do you design?
All I could think of is having an abstract car class which would have
common abstract methods to be implemented by extending subclasses whereas
for different methods they could implement different interfaces.
I am not sure if this is the correct way to design or any design pattern
was the answer! Can anyone tell me what the correct solution should have
been?

No comments:

Post a Comment