1 / 13

Design Patterns in Java

Design Patterns in Java. Kinematic Simulator. Kinematic Simulator. Hello, I’m Steve Here’s our project. Kinematic Simulator. Hello, I’m Helena Here’s our design. Instance Diagram. Class Diagram. Patterns Used: Model View Controller. SimulatorModel. SimulatorViewer. SimulatorController.

santo
Télécharger la présentation

Design Patterns in Java

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Design Patterns in Java Kinematic Simulator

  2. Kinematic Simulator • Hello, I’m Steve • Here’s our project

  3. Kinematic Simulator • Hello, I’m Helena • Here’s our design

  4. Instance Diagram

  5. Class Diagram

  6. Patterns Used:Model View Controller SimulatorModel SimulatorViewer SimulatorController

  7. Patterns Used:Strategy SimulatorController (Context) PhysicsStrategy (Abstract Strategy) NewtonianPhysicsStrategy (Concrete Strategy)

  8. Patterns Used:Observer observes ViewerListener SimulatorController SimulatorViewer

  9. Patterns Used:Abstract Factory EntityFactory (Abstract Factory) Entity (Abstract Product) Ball Factory (Concrete Factory) Ball (Concrete Product)

  10. The Old Design:Classes and Instances

  11. Comparison of Old vs. New • Old: • Works • Everything has reference to everything else • Only simulates Balls • Few, big classes • Physics hard to find • AWT

  12. Comparison of Old vs. New • New • Works • MVC cleans up data flow • Can add new Entities! I want to add squares. • Can add new Physics! • Can add new Views! • Great! • It don’t mean a thing if it ain’t got that Swing • Faster!

  13. Questions? You can play at http://minutillo.com/steve/ks/ Thanks!

More Related