CP317A Software Engineering Week 3-2

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is the purpose of UML diagrams in software engineering?

  • To create a visual representation of the system's data flow.
  • To provide a standardized way to visualize the system's design. (correct)
  • To generate code directly from the diagrams.
  • To analyze the system's performance and efficiency.

Which of the following is NOT a design principle discussed in the content?

  • Abstraction (correct)
  • Decomposition
  • Coupling
  • Cohesion

Which architecture type is most likely to cause a race condition?

  • Event-driven (correct)
  • Data-centric
  • Client/server
  • Monolithic

What is the main problem caused by a race condition?

<p>Loss of data consistency. (B)</p> Signup and view all the answers

Which of the following best describes the purpose of a Class diagram in UML?

<p>To define the structure and relationships between classes in the system. (B)</p> Signup and view all the answers

What does the notation '0..*' in a UML Class diagram represent?

<p>Many instances (C)</p> Signup and view all the answers

What is the primary purpose of Component diagrams in UML?

<p>To showcase the overall architecture of the system and how components interact. (A)</p> Signup and view all the answers

Which of the following is NOT a benefit of using a use-case diagram?

<p>To model the detailed implementation of a specific feature (C)</p> Signup and view all the answers

What type of diagram is used for modeling discrete behavior through finite state transitions?

<p>State Machine Diagram (D)</p> Signup and view all the answers

Which of the following is NOT a valid UML diagram type?

<p>Network diagram (C)</p> Signup and view all the answers

In a sequence diagram, what does the timeline represent?

<p>The sequence of interactions between objects (A)</p> Signup and view all the answers

Which of the following diagrams are considered to be 'structure diagrams'?

<p>Class Diagram and Component Diagram (C)</p> Signup and view all the answers

What is meant by 'decomposition' in software design?

<p>Breaking down a complex system into smaller, independent modules (D)</p> Signup and view all the answers

What is the relationship between cohesion and software design?

<p>Higher cohesion leads to a better software design (A)</p> Signup and view all the answers

Which of the following best describes 'coupling' in software design?

<p>The degree of interdependency between different modules (C)</p> Signup and view all the answers

In the context of software design, why is low coupling generally preferable?

<p>Low coupling makes the system easier to understand and maintain (A)</p> Signup and view all the answers

Flashcards

Use-Case Diagram

A diagram showing actors, use cases, and their relationships in a system.

Purpose of Use-Case Diagrams

To gather system requirements and illustrate external/internal influences.

State Transition Diagram

A diagram modeling discrete behavior through finite state transitions.

Sequence Diagram

A diagram illustrating object interactions in a sequential order over time.

Signup and view all the flashcards

Decomposition

Breaking complex problems into simpler, manageable parts.

Signup and view all the flashcards

Cohesion

A measure of how dependent elements of a module are on each other.

Signup and view all the flashcards

Coupling

Interdependencies between components/modules affecting changes.

Signup and view all the flashcards

Cohesion vs Coupling

Cohesion indicates internal module dependence; coupling indicates external dependencies.

Signup and view all the flashcards

Race Condition

An undesirable situation when multiple processes modify the same object simultaneously.

Signup and view all the flashcards

Mutual Exclusion

A technique to prevent race conditions by allowing only one process at a time to access a resource.

Signup and view all the flashcards

Unified Modeling Language (UML)

A general-purpose modeling language used to visualize the design of a software system.

Signup and view all the flashcards

Structure Diagram

A UML diagram that represents the static structure of a system and its components.

Signup and view all the flashcards

Class Diagram

A specific type of structure diagram that shows classes and their relationships in a system.

Signup and view all the flashcards

Behavior Diagram

A UML diagram that illustrates the dynamic behavior of objects over time.

Signup and view all the flashcards

Study Notes

Software Engineering Course Notes

  • Course: CP317A Software Engineering
  • Instructor: Shaun Gao, Ph.D., P.Eng.
  • Topic: High-level design, part 2 - Week 3-2

Agenda

  • Review week 3-1
  • Race condition
  • Unified Modeling Language (UML)
  • UML diagrams
    • Structure diagrams (Class, Object, Package, Composite Structure, Component, Manifestation, Deployment, Network Architecture, Profile)
    • Behavior diagrams (Use Case, Activity, State Machine, Sequence, Interaction)
  • Design principles (3 principles)
    • Decomposition
    • Cohesion
    • Coupling
  • Summary

Race Condition

  • Event-driven or distributed architectures can cause race conditions
  • Race condition: undesirable situation where multiple processes try to modify the same object concurrently
  • Problems: data inconsistency
  • Prevention techniques: mutual exclusion, semaphores

Unified Modeling Language (UML)

  • UML: general-purpose modeling language for software engineering
  • Intended to visualize system designs
  • Multiple UML diagram types for different purposes
  • UML version 2.0 defines 13 diagrams

Design Principles

  • Decomposition: Breaking down complex problems into smaller, manageable parts. (e.g., ATM example - splitting into display, balance, deposit, transfer, withdraw)
  • Cohesion: How closely related the elements within a module are. High cohesion is better
  • Coupling: The dependencies between software components or modules. Low coupling is better

UML: Diagram Types

  • Structure Diagrams: show the static structure of the system
    • Class Diagram: depicts classes, attributes, operations, and relationships between them; Used for creating static structure
    • Object Diagram: depicts specific objects from a class diagram; Show the instances of the classes mentioned in the class diagram
    • Package Diagram: depicts how a system is composed into several packages; Shows how the system classifies and arranges each component
    • Component Diagram: depicts the software components in a system; Shows the different components in the system in a graphical representation
    • Composite Structure Diagram: graphical representation of how parts of a class structure function
    • Deployment Diagram: shows the physical deployment of components in a system
    • Manifestation Diagram: show how components execute in a system
    • Network Architecture Diagram: depicts how systems in a network interact
    • Profile Diagram: extends the UML language and notation for a specific domain or project
  • Behavior Diagrams: show the system's dynamic behaviour over time
    • Use Case Diagram: model the interaction between actors/users and the system's functions. Show function of different components to the user or actor
    • State Machine Diagram: model the behavior and states of a component as it progresses through various circumstances (Example: ATM states).
    • Sequence Diagram: depicts the interaction among objects in a system; Show the communication/messages exchanged between actors over a sequence
    • Activity Diagram: model business logic with flows and actions; shows different phases within the system
    • Interaction Diagram: show interactions between objects and their interactions over a timeframe.

Additional Information

  • Project Report (SDD) is the starting point for group projects
  • Low-level design will be discussed next week
  • Help available for group formation

Studying That Suits You

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

Quiz Team

Related Documents

More Like This

Use Quizgecko on...
Browser
Browser