UPI Study › Courses › Software Engineering › Free lessons › Lesson 8.1 Free with a free account
Designing Software the Object-Oriented Way
Software Engineering · Chapter 8: Object-Oriented Design and ArchitectureSection 8.1 · lesson 55 of 1036 min · free with a free account
Free preview
Create a free account to keep watching
It takes a minute and costs nothing. Your free account unlocks all of Chapter 1 and 3 more lessons of Software Engineering.
Lesson complete
Earn the 3 college credits for Software Engineering
Enrolling adds a quiz after each lesson, the graded work and the official transcript. Recommended for credit by NCCRS.
Next lesson: Components of a Complete Design Model →← Essential Ideas Behind Effective Software DesignNext lesson: Components of a Complete Design Model →
In this lesson
Translating analysis models into a design you can actually build.
- Explain the shift from an analysis model to a design model
- Describe how analysis classes become design classes
- Explain how a use case is distributed as class responsibilities
- Explain why some design classes have no analysis counterpart
Transcript
Everything said in the video, section by section (818 words). Read along, or search it.
Object-Oriented Design and Architecture
Designing Software the Object-Oriented Way
Objects, classes, encapsulation, inheritance, and polymorphism were introduced earlier, as the foundation of object-oriented thinking. Along with them came a promise, that the full process of designing a system this way would come later. This is that process. This section covers how analysis models are translated into a design model. What carries over, what changes, and what gets added.
Not Yet Buildable
From What to How
By this point, analysis has produced a set of models describing what the system must do. Conceptual classes describe the problem domain. Use cases describe how users reach their goals. And other models describe the data and behavior involved. None of that, on its own, is detailed enough to build. Object-oriented design, or O O D, is the process of translating those analysis models into a design model. The design model is precise enough that construction can actually begin.
2 Models
Problem Domain vs. Solution Domain
An analysis model describes the problem domain. It captures the concepts, behavior, and information a system must handle, in terms a customer or domain expert would recognize, without committing to any implementation. A design model describes the solution domain. It takes the same concepts, and develops them into a buildable structure. Specific classes, with specific attributes, methods, and responsibilities. O O D makes that shift using the same object-oriented vocabulary. It refines the analysis classes, and often introduces new ones.
Refining Classes
From Analysis Class to Design Class
An analysis class typically lists only attributes a domain expert would find meaningful, in plain terms, with no implementation detail. Turning it into a design class takes three things. First, give each attribute a concrete type. Second, give the class concrete methods, with defined signatures. And third, decide precisely what the class is responsible for doing.
Figure 8.1A
1 Analysis Class, Several Design Classes
Here is that refinement for an order. The analysis class, order, lists a customer, an order date, and a total amount, in plain language. The design process adds types and method signatures, assigns responsibilities, and adds design-only classes as needed. The result is not one class, but three. A design class for order, with typed attributes and methods like add item and calculate total. And two classes the analysis never had. An order validator, and an order repository.
Design-Only Classes
Needed to Build, Not to Describe
This last point matters. Object-oriented design does not simply add detail to existing analysis classes. It also introduces entirely new classes, to validate data, to manage storage, or to coordinate other classes. They exist purely because building a working system requires them. A domain expert would never describe them as part of the problem.
Figure 8.1B
1 Use Case, Several Responsible Classes
Use cases get translated too. A use case describes a goal-directed interaction from the user's point of view. It says what they want, not which part of the system handles which step. Design decides that. Take the use case, place order. An order controller receives the request from the user interface. An order validator checks the order is valid, and an order repository saves it. No single class does everything the use case describes. That is intentional. Each class stays focused on the behavior and data it naturally owns.
Table 8.1
What Changes from Analysis to Design
Here is what changes from analysis to design. The analysis model describes the problem, in the customer's terms. The design model describes the solution, in buildable, technical terms. Analysis classes are conceptual, with plain-language attributes. Design classes have typed attributes and methods. A use case goes from a goal-directed interaction to responsibilities distributed across classes. And while analysis classes come straight from the problem domain, some design classes are refined from them, and some are added purely to implement the system.
Think About It
"A User Resets Their Password"
Here is a question to think about. Take the use case, a user resets their password. Three design classes might each handle one part. A reset controller takes the request. A token service issues a one-time reset link. And the user account stores the new password. And a design-only class? An email sender. Nobody lists it as part of the problem, but the reset link has to reach the user somehow.
Key Terms
The Vocabulary of This Section
Let's lock in the key terms. Object-oriented design is the process of translating analysis models into a design model, using object-oriented concepts. An analysis model describes the problem domain, in terms a customer would recognize. A design model describes the solution, in concrete, buildable terms. A design class is a class in the design model, either refined from an analysis class, or added purely to support implementation. And a responsibility is a specific part of a use case's behavior, or a piece of data, that a design class is assigned to handle.
Key Takeaways
What to Carry Forward
To pull this together. Object-oriented design turns a problem-domain model into a design model detailed enough to build. Refining an analysis class adds concrete types, method signatures, and assigned responsibilities. Some design classes have no counterpart in the analysis model at all. They exist only to make the system work. Translating a use case means deciding which class is responsible for each part of its behavior. And the whole process applies the same object-oriented ideas. Classes, responsibilities, and collaboration.
About Software Engineering at UPI Study
Software Engineering (Computer Science 301) is a self-paced online course of 103 video lessons in 15 chapters, from process models and agile to requirements, design, user interfaces, reliability, security and project management. It carries a NCCRS credit recommendation for 3 semester credits.
Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Enroll now → Course details Download the syllabus All Computer Science courses Every course with PRO →
Why take it here
Why students take Software Engineering with UPI Study
Where the credit goes
Universities that work with NCCRS
Software Engineering carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Thomas Edison State UniversitySigned partner
University of the PeopleSigned partner
Charter Oak State CollegeSigned partner
Strayer UniversitySigned partner
Columbia Southern UniversitySigned partner
Indiana TechSigned partner
Penn StateWorks with NCCRS
Southern New Hampshire UniversityWorks with NCCRS
SUNYWorks with NCCRS
+many more cooperating universitiesFind my college →Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.
FAQ
Questions students ask us
About Designing Software the Object-Oriented Way
What is object-oriented design (OOD)?
What is the difference between an analysis model and a design model?
How does an analysis class become a design class?
Why do some design classes have no counterpart in the analysis model?
About the Software Engineering course
How many college credits is Software Engineering?
How much does Software Engineering cost and what is included?
Which universities accept UPI Study credits?
How long does Software Engineering take?
How are the exams done?
How do my credits reach my college?
Ready for the full course? Earn 3 credits in Software Engineering.
103 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.
3 credits · NCCRSEnroll →