Object Oriented Design Chapter 7

ExceedingZinc avatar
ExceedingZinc
·
·
Download

Start Quiz

Study Flashcards

Questions and Answers

What is the importance of design models in large systems developed by different groups?

Design models are an important communication mechanism.

What are some common activities involved in object-oriented design processes?

Defining the context and modes of use of the system, designing the system architecture, identifying principal system objects, developing design models, and specifying object interfaces.

Why is it essential to understand the relationships between the system being designed and its external environment?

To decide how to provide the required system functionality and how to structure the system to communicate with its environment.

What is the purpose of setting system boundaries?

<p>To decide what features are implemented in the system being designed and what features are in other associated systems.</p> Signup and view all the answers

What is a system context model?

<p>A structural model that demonstrates the other systems in the environment of the system being developed.</p> Signup and view all the answers

What is an interaction model?

<p>A dynamic model that shows how the system interacts with its environment as it is used.</p> Signup and view all the answers

Why are design models important in object-oriented design?

<p>Design models facilitate communication among different groups and help identify principal system objects and their relationships.</p> Signup and view all the answers

What is the significance of understanding the system's external environment?

<p>It helps establish the boundaries of the system and decide what features to implement.</p> Signup and view all the answers

What are the two types of design models that show the objects and object classes and relationships between these entities?

<p>Structural models and Dynamic models</p> Signup and view all the answers

What type of design model describes the static structure of the system in terms of object classes and relationships?

<p>Structural models</p> Signup and view all the answers

What type of design model shows the sequence of object interactions that take place?

<p>Sequence models</p> Signup and view all the answers

In UML, what construct is used to show the logical grouping of objects into subsystems?

<p>Packages</p> Signup and view all the answers

What does a thin rectangle in an object lifeline represent in a sequence model?

<p>The time when the object is the controlling object in the system</p> Signup and view all the answers

What type of design model shows how individual objects change their state in response to events?

<p>State machine models</p> Signup and view all the answers

What is the purpose of subsystem models in design?

<p>To show how the design is organized into logically related groups of objects</p> Signup and view all the answers

What do different styles of arrow represent in a sequence model?

<p>Different types of interaction</p> Signup and view all the answers

What is the primary purpose of state diagrams in system design?

<p>To show how objects respond to different service requests and the state transitions triggered by these requests.</p> Signup and view all the answers

When is it necessary to create a state diagram for an object in a system?

<p>Only when the object's behavior is complex and requires detailed modeling.</p> Signup and view all the answers

What is the importance of specifying object interfaces in system design?

<p>So that objects and other components can be designed in parallel.</p> Signup and view all the answers

How do designers typically represent object interfaces in system design?

<p>Using class diagrams in UML or programming languages like Java.</p> Signup and view all the answers

What is a design pattern in system design?

<p>A way of reusing abstract knowledge about a problem and its solution.</p> Signup and view all the answers

What characteristics of object-oriented programming are typically used in design pattern descriptions?

<p>Inheritance and polymorphism.</p> Signup and view all the answers

Why are design patterns useful in system design?

<p>They provide a way to reuse abstract knowledge about a problem and its solution.</p> Signup and view all the answers

What is the benefit of using multiple interfaces for an object in system design?

<p>It provides multiple viewpoints on the methods provided by the object.</p> Signup and view all the answers

Study Notes

Design Models

  • Show objects and object classes, as well as relationships between them
  • Two types of design models:
    • Structural models that describe the static structure of the system
    • Dynamic models that describe the dynamic interactions between objects

Examples of Design Models

  • Subsystem models that show logical groupings of objects into coherent subsystems
  • Sequence models that show the sequence of object interactions
  • State machine models that show how individual objects change their state in response to events
  • Other models include use-case models, aggregation models, generalisation models, etc.

Subsystem Models

  • Show how the design is organized into logically related groups of objects
  • In the UML, these are shown using packages, an encapsulation construct
  • Logical model, actual organisation of objects in the system may be different

Sequence Models

  • Show the sequence of object interactions that take place
  • Objects are arranged horizontally across the top, time is represented vertically
  • Interactions are represented by labelled arrows, different styles of arrow represent different types of interaction
  • A thin rectangle in an object lifeline represents the time when the object is the controlling object in the system

Process Stages

  • Variety of object-oriented design processes depending on the organization
  • Common activities include:
    • Defining the context and modes of use of the system
    • Designing the system architecture
    • Identifying the principal system objects
    • Developing design models
    • Specifying object interfaces

System Context and Interactions

  • Understanding the relationships between the software and its external environment is essential for deciding how to provide required system functionality
  • Understanding of the context also lets you establish the boundaries of the system
  • Setting the system boundaries helps you decide what features are implemented in the system being designed and what features are in other associated systems

Context and Interaction Models

  • A system context model is a structural model that demonstrates the other systems in the environment of the system being developed
  • An interaction model is a dynamic model that shows how the system interacts with its environment as it is used

State Diagrams

  • Used to show how objects respond to different service requests and the state transitions triggered by these requests
  • Useful high-level models of a system or an object’s run-time behavior
  • Not usually needed for all objects in the system, as many objects are relatively simple

Interface Specification

  • Object interfaces have to be specified so that objects and other components can be designed in parallel
  • Designers should avoid designing the interface representation but should hide this in the object itself
  • Objects may have several interfaces which are viewpoints on the methods provided
  • The UML uses class diagrams for interface specification, but Java may also be used

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team
Use Quizgecko on...
Browser
Browser