1 / 10

Understanding Object-Oriented Design and Class Diagrams in Software Development

Object-Oriented Design (OOD) involves planning the necessary components or classes for a system, determining their roles and relationships to model the system before implementation. Using modeling techniques, such as UML (Unified Modeling Language), helps visualize the system structure, making it easier for developers to coordinate efforts. Key diagram types include class diagrams, use cases, and interaction diagrams. Class diagrams specifically depict classes, their attributes and methods, and relationships like inheritance, composition, and association, enhancing understanding and collaboration within development teams.

gryta
Télécharger la présentation

Understanding Object-Oriented Design and Class Diagrams in Software Development

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. Object-Oriented DesignandClass Diagrams

  2. OO Design • Planning the components (classes) necessary for a system • Determine: • the classes that will be defined • their roles and relationships (and interaction) with each other • Modeling

  3. Why Go Through Design? • Modeling a system before implementing (coding) saves time and increases the chances of success • Can worry less about programming details • The design model serves as a coordination point between programmers in a team

  4. Modeling Techniques • Notation • The UML: Unified Modeling Language • The Standard for OO Systems • Diagramming Techniques in the UML • Class Diagrams • Use Cases • Interaction Diagrams • Others

  5. Class Diagrams • What is Depicted? • Classes • name, attributes, methods • rectangles • Relationships • inheritance, composition, association • links

  6. Classes in a Class Diagram • Class name only Example • With Details Example Ledger Class Name Ledger double balance post() sortByDate() Class Name attributes methods

  7. Relationships • Inheritance (arrow) • example: between Secretary and Employee • Composition/Aggregation (diamond) • example: between Car and Wheel • Association (line) • example: between Borrower and Book

  8. Inheritance Employee public class Secretary extends Employee { … } Secretary

  9. Composition Car Wheel 4 w[] public class Car { Wheel w[]; ... public Wheel() { w = new Wheel[4]; … } ... }

  10. Association Borrower Book 1 3 currBorr bk[] public class Borrower { Book bk[]; … public Borrower() { bk = new Book[3]; } } public class Book { Borrower currBorr; … }

More Related