Git Product home page Git Product logo

design-patterns-in-java's Introduction

Design-Patterns-in-Java

One Mega Problem Statement - "Setting Up of a Car Company"

All 23 Gang of four Design Patterns implemented in Java

Whats So SPECIAL :

When i was preparing for interview, I could not find a single problem statement that will use all the design patterns. So when i can remember that problem statement, i can revise all the design pattern at once. So, I set out to create that Mega Problem and came up with "Setting Up of a Car Company". All the patterns are implemented using one Mega problem statement i.e Setting up of a Car Company Which involves creating a Car factory in a city that has different models of cars; have showrooms in different cities; Headquarter somewhere; car manufacturing process and Hierarchy of Employee that has different job within the car company.

Following are the features in our problem statement :

Behavioral Design Patterns -

1. CHAIN OF RESPONSIBILITY -

In our new Car Artificial Intelligence software, there is a possibility of virus from other hackers.There are different levels of virus and based on that level, employees can solve or not solve it. So, we have a team of developers and there is a hierarchy of developers. So, when there is a virus found in the system, it is given to the engineer. If he can not solve it, then he will pass it to team lead; if team lead cant then he will pass it to technical officer;etc. .

2. COMMAND -

In our new Car, We want to provide user a remote with only one button ( Just for elegance ) that can be used to perform differnt tasks like lighton , play music and Controlling Air condition etc. All these commands can be performed on a single button press;

3. INTERPRETER -

In our car, We want to create a voice command system in which commands can be created and interpreted. e.g startcar, fuelcheck, autodrive etc. for these commands there are AND OR combination of commands like fuelcheck and doorclosed.

4. ITERATOR -

Description Coming Soon..

5. MEDIATOR -

Description Coming Soon..

6. MEMENTO -

Description Coming Soon..

7. OBSERVER -

Description Coming Soon..

8. STATE -

Description Coming Soon..

9. STRATEGY -

Description Coming Soon..

10. TEMPLATE -

Description Coming Soon..

11. VISITOR -

Description Coming Soon..

Creational Design Patterns -

1. ABSTRACT FACTORY -

Description Coming Soon..

2. BUILDER -

Description Coming Soon..

3. FACTORY -

Description Coming Soon..

4. PROTOTYPE -

Description Coming Soon..

5. SINGLETON -

Description Coming Soon..

Structural Design Patterns -

1. ADAPTER -

Description Coming Soon..

2. BRIDGE -

Description Coming Soon..

3. COMPOSITE -

Description Coming Soon..

4. DECORATOR -

Description Coming Soon..

5. FACADE -

Description Coming Soon..

6. FLYWEIGHT -

Description Coming Soon..

7. PROXY -

Description Coming Soon..

design-patterns-in-java's People

Contributors

shubhamshekhar23 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.