Presentation is loading. Please wait.

Presentation is loading. Please wait.

Class Diagrams, MVC and Design Patterns CS153P Session 4.

Similar presentations


Presentation on theme: "Class Diagrams, MVC and Design Patterns CS153P Session 4."— Presentation transcript:

1 Class Diagrams, MVC and Design Patterns CS153P Session 4

2 What are Agile Models? Agile models fulfill their purpose. Agile models are understandable. Agile models are sufficiently accurate. Agile models are sufficiently consistent. Agile models are sufficiently detailed. Agile models provide positive value. Agile models are as simple as possible.

3 Agile Modeling Best Practices

4 Example Agile Models

5 UML2 Unified Modeling Language 2 ◦A subset of agile modeling ◦Object-oriented ◦Shared notation DiagramsInteraction Overview Diagram Activity DiagramObject Diagram Class Diagram Package Diagram Communication Diagram Sequence Diagram Component DiagramState Machine Diagram Composite Structure Diagram Timing Diagram Deployment Diagram Use Case Diagram

6 Use Case Diagrams Show users and how they will interact with your program

7 Class Diagrams Shows class attributes, methods and relationships

8 Class Diagrams Shows class attributes, methods and relationships

9 Class Diagrams Shows class attributes, methods and relationships

10 Sequence Diagrams Shows how the program progresses from one user/class to another

11 Sequence Diagrams Shows how the program progresses from one user/class to another

12 Agile Modeling Principles Model With A Purpose. Maximize Stakeholder ROI. Travel Light. Multiple Models. Rapid Feedback. Assume Simplicity. Embrace Change. Incremental Change. Quality Work. Working Software Is Your Primary Goal. Enabling The Next Effort Is Your Secondary Goal.

13 Design Patterns Most of the problems you face in software development have already been tackled Design Patterns are used to address these recurring problems Examples: ◦Singleton – making use of a single static class ◦Factory Pattern – a class used to determine which classes to create ◦Observer Pattern – classes which respond to events ◦Model-View-Controller (MVC) – separates classes into more manageable functionalities

14 Model-View-Controller A design pattern used frequently in games Achieves separation between program logic and data, rendering and user input

15 Example

16 Exercise Discuss your game with your partner Create a conceptual class diagram Based on your class diagram, create a sequence diagram starting from Main Time limit: 20 mins

17 Class Diagrams Shows class attributes, methods and relationships

18 Sequence Diagrams Shows how the program progresses from one user/class to another

19 Reminders Design Document Presentation on Saturday Include in Presentation: ◦New Design Document  Include Created Diagrams  Word Document or Wiki format ◦List of Closed Tickets  Show on Assembla

20 Quiz 1. ActionScript code is compiled as what? -.swf 2. What “runtime environment” is used to play ActionScript programs in a browser? –Flash player 3. According to the lecture, writing a program is similar to what? – building an airplane 4. Represents “things” in a program - objects 5. Describes the characteristics and behavior of an object - classes

21 Quiz 6. Parts is to blueprints as objects is to classes 7. A program’s master blueprint is its Main class 8. These are used to avoid name conflicts, and orders classes in directories - packages 9. These define how we can access variables, functions and classes – access control modifiers 10. This method initializes instances of a class - constructor

22 Quiz 11. Are constructors public or internal?- public 12. What keyword do we use to create objects? - new 13. This is used to refer to an object after creating it - variables 14. A variable that is used within a method to keep track of information – local variables 15. A variable attached to an object – instance variables

23 Quiz 16. A __ variable can be accessed within its class or descendant classes - protected 17. A __ variable can be accessed within its class only - private 18. Think of objects as ___, wherein internal operations are unknown to us – black boxes 19. What does API stand for? – application programming interface 20. Variables that are related to a class, not an instance – static variables


Download ppt "Class Diagrams, MVC and Design Patterns CS153P Session 4."

Similar presentations


Ads by Google