While programming, drafting use cases and user stories can point to class responsibilities. These are the actions that each class will take. For example, a customer might be responsible for paying for items, entering payment information, and providing an address. Identifying class responsibilities allows you to assign functionality based on those responsibilities. Learn how to quickly and easily define responsibilities for classes by watching this online video.
- View Offline
We're trying to get to the point where we can truly identify what are and what…aren't classes that we need to create. And much of this comes from figuring…out the responsibilities of our conceptual objects, and this will be the…behavior what will become methods in our objects, and here is a great starting point for this.…Just as we started off by looking at the nouns in our written description…to figure out our potential objects, we can go back to the use case or a…user story, and look for verbs and verb phrases to pick responsibilities.…
So in this case, we'd have things like customer verifies items, provides payment…and address, process sale, validate payment, confirm order, provide order…number, check order status, and send order details email.…Now, not all of these will become behaviors, some will be combined, some will…need to be split apart, and some will just not be needed or be replaced by…something else, but they are a good starting point, and they will often prompt…others, or prompt some discussion.…
Let Simon Allardice introduce you to the terms—words like abstraction, inheritance, polymorphism, subclass—and guide you through defining your requirements and identifying use cases for your program. The course also covers creating conceptual models of your program with design patterns, class and sequence diagrams, and unified modeling language (UML) tools, and then shows how to convert the diagrams into code.
- Why use object-oriented design (OOD)?
- Pinpointing use cases, actors, and scenarios
- Identifying class responsibilities and relationships
- Creating class diagrams
- Using abstract classes
- Working with inheritance
- Creating advanced UML diagrams
- Understanding object-oriented design principles