Designing Software the Object-Oriented Way, Explained

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

← Essential Ideas Behind Effective Software DesignNext lesson: Components of a Complete Design Model →

Earn 3 college credits for Software EngineeringRecommended for credit by NCCRS · Computer Science 301 · self-paced · one payment, lifetime access

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.

Compare: Software Engineering vs Systems Analysis

Why take it here

Why students take Software Engineering with UPI Study

How professional software gets builtSoftware Engineering covers how teams turn requirements into working, maintainable software: process models, agile, requirements, design, testing, reliability and project management. It is a core course in computer science and software degrees.
Credit at a fraction of the priceThe same 3 credits can cost $750 or more at a US college. Here it is one payment, self-paced, with lifetime access.
Finish your degree soonerTransfer credits reduce the courses you still owe, so you can graduate earlier or lighten a heavy semester.
Strengthen an applicationA completed college-level course on an official transcript shows admissions and scholarship committees you can do the work.
Study on your own scheduleNo start dates, no deadlines. Watch the lessons, practice, and take the final when you are ready.
130,000+students helped with college creditsACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

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.

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)?
Object-oriented design is the process of translating analysis models into a design model precise enough that construction can begin. Analysis produces conceptual classes, use cases, and models of data and behavior that describe what the system must do. OOD uses the same object-oriented vocabulary of classes, responsibilities, and collaboration to refine those analysis classes into buildable ones, and it often introduces new classes the analysis never had.
What is the difference between an analysis model and a design model?
An analysis model describes the problem domain in terms a customer or domain expert would recognize, without committing to any implementation. A design model describes the solution domain in concrete, buildable terms. Analysis classes are conceptual, with plain-language attributes, while design classes have typed attributes and methods with defined signatures. Some design classes are refined from analysis classes, and others are added purely to implement the system.
How does an analysis class become a design class?
An analysis class becomes a design class by giving each attribute a concrete type, giving the class methods with defined signatures, and deciding precisely what the class is responsible for. An analysis Order class listing a customer, order date, and total amount might become a typed Order design class with methods like add item and calculate total, plus an order validator and an order repository that the analysis never mentioned.
Why do some design classes have no counterpart in the analysis model?
Some design classes exist only because building a working system requires them, not because they are part of the problem a domain expert would describe. Classes that validate data, manage storage, or coordinate other classes fall into this group. In a password reset use case, for example, a reset controller, token service, and user account handle the domain steps, but an email sender class is needed so the reset link actually reaches the user.

About the Software Engineering course

How many college credits is Software Engineering?
Software Engineering (Computer Science 301) carries a NCCRS credit recommendation for 3 semester credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
How much does Software Engineering cost and what is included?
$250, paid once, with lifetime access: all 103 video lessons, a practice quiz after each, the graded work and final exam, and an official transcript when you finish. Students who want several courses choose UPI Study PRO instead.
Which universities accept UPI Study credits?
UPI Study has signed partner agreements with universities such as Thomas Edison State University, University of the People and Charter Oak State College, and works with universities such as Penn State, SNHU and SUNY. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities. Use "Find my college" on this page to check yours.
How long does Software Engineering take?
It is self-paced with no deadlines. The 103 lessons total about 11 hours of video; most students add reading and practice time and finish in a few weeks to a few months, on their own schedule.
How are the exams done?
Quizzes and assignments are online in the course. The final exam is taken online with proctoring; a person on the UPI Study team checks assignments, usually within two days.
How do my credits reach my college?
When the course shows 100% complete, request the official transcript from your dashboard. It is sent to the college you name, and you can send it to more than one. Check your college first with "Find my college" on this page, or ask Athena.

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.

Software Engineering
3 credits · NCCRS
Enroll →