Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advice for "Inheritance-Challenge" #1

Open
DJavierReyesM opened this issue Jan 1, 2021 · 0 comments
Open

Advice for "Inheritance-Challenge" #1

DJavierReyesM opened this issue Jan 1, 2021 · 0 comments

Comments

@DJavierReyesM
Copy link

Hello. Happy New Year. Checking the code I come up with something you can consider for the Inheritance-Challenge: You want to build a car using the “Car” class, but this can have different representations (variations according to its brand, model, etc.) as can be seen in the “Outlander” class where this is a car with certain special characteristics that inherits from "Car". Since to build a car you can use a standard creation process with variations depending on the specific type of vehicle you want to create and in order to avoid creating n classes for n representations through inheritance or calls to constructors with many parameters (scent code), the use of the Builder pattern is proposed to use the same construction process (code) to create different representations of the various cars in a more flexible way.
Blank diagram (9)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant