Software Engineering: SDLC and Object Diagrams

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

Which of the following best describes 'Software Engineering'?

  • A systematic, disciplined and quantifiable approach to software development, operation and maintenance. (correct)
  • Defining phases/stages throughout the software development process.
  • A process of analyzing user requirements.
  • Designing, building and testing software applications.

What is the primary purpose of SDLC (Software Development Life Cycle)?

  • To ensure the software satisfies user needs.
  • To define the user requirements of a software application.
  • To analyze and test a software application.
  • To provide a framework that defines the phases or stages to be followed throughout the software development process. (correct)

Which of the following is NOT typically considered a phase of SDLC?

  • Implementation
  • Design
  • Requirement Gathering and Analysis
  • Marketing (correct)

What is the main focus of Object-Oriented Design in software engineering?

<p>Defining objects and their interactions to solve a software problem. (D)</p>
Signup and view all the answers

What is the role of structural models in design model types?

<p>Defining the system's architecture and components. (A)</p>
Signup and view all the answers

What is the primary purpose of a modeling language in software development?

<p>To express information, knowledge, or systems in a structured way. (D)</p>
Signup and view all the answers

What is the main goal of UML (Unified Modeling Language)?

<p>To offer a general-purpose, developmental modeling language for visualizing system design. (D)</p>
Signup and view all the answers

Which of the following UML diagrams is categorized as a Behavior Diagram?

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

Which of the following UML diagrams is categorized as a Structure Diagram?

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

Which technique is commonly used to discover classes in object-oriented design?

<p>Noun/Verb Analysis (A)</p>
Signup and view all the answers

In a class diagram, what does a class method represent?

<p>An operation the class can perform. (A)</p>
Signup and view all the answers

Which of the following notations represents inheritance in a class diagram?

<p>Dashed line with an arrow (C)</p>
Signup and view all the answers

What is the purpose of an object diagram?

<p>To show a snapshot of the system at a specific point in time, including objects and their data values. (B)</p>
Signup and view all the answers

What does it mean if the Objectname is optional, in the object notation?

<p>The object's name isn't mandatory (D)</p>
Signup and view all the answers

In object diagrams, what is the purpose of showing attributename = "value"?

<p>To assign a specific value to an object's attribute. (C)</p>
Signup and view all the answers

What kind of diagrams are sequence and communication diagrams?

<p>Interaction Diagrams (C)</p>
Signup and view all the answers

What aspect of system behavior does a sequence diagram primarily emphasize?

<p>The time ordering of messages between objects. (B)</p>
Signup and view all the answers

In a sequence diagram, what does a lifeline represent?

<p>The duration of an object's existence during the interaction. (C)</p>
Signup and view all the answers

What does an activation bar on a lifeline in a sequence diagram indicate?

<p>The object is actively processing a message or performing an action. (A)</p>
Signup and view all the answers

What is the difference between a synchronous and an asynchronous message in a sequence diagram?

<p>With a synchronous call the sender waits for the receiver to process the message; asynchronous messages allow the sender to continue without waiting. (B)</p>
Signup and view all the answers

In a sequence diagram, what does a 'create message' typically represent?

<p>The instantiation of a new object. (A)</p>
Signup and view all the answers

Which type of message in a sequence diagram implies that a message was sent, but its receipt is not guaranteed or relevant to the diagram's purpose?

<p>Lost Message (B)</p>
Signup and view all the answers

What do interaction fragments like 'alt', 'opt', and 'loop' provide in interaction diagrams?

<p>A mechanism to specify conditional behavior, optional sections, and repetitions. (A)</p>
Signup and view all the answers

When is the 'opt' interaction fragment used in sequence diagrams?

<p>To represent a section that may or may not be executed based on a condition. (C)</p>
Signup and view all the answers

What does the 'loop' interaction fragment signify in a sequence diagram?

<p>A repetitive execution of a sequence of messages. (B)</p>
Signup and view all the answers

What is the primary difference between sequence and communication diagrams?

<p>Sequence diagrams emphasize message flow over time, while communication diagrams emphasize object relationships and organization. (D)</p>
Signup and view all the answers

Which of the following is a typical symbol used in communication diagrams?

<p>Object (A)</p>
Signup and view all the answers

In a communication diagram, what does a numbered prefix on a message (e.g., '1.2:') indicate?

<p>The sequence of the message in the interaction. (A)</p>
Signup and view all the answers

What does the syntax msg sequence no. [Condition]: Msg represent in a communication diagram?

<p>A message that is sent only if the condition is true. (A)</p>
Signup and view all the answers

In communication diagrams, what does an asterisk (*) in the message sequence number indicate?

<p>The message is being repeated. (D)</p>
Signup and view all the answers

In communication diagrams, what does a double bar || in the message sequence number indicate?

<p>The message is sent in parallel or concurrently. (C)</p>
Signup and view all the answers

Which of the following is a key guideline for creating effective Communication Diagrams?

<p>Avoid crossing links and creating crowded diagrams. (C)</p>
Signup and view all the answers

What is a primary strength of sequence diagrams compared to communication diagrams?

<p>Emphasizing the sequence of events. (D)</p>
Signup and view all the answers

What is emphasized by communication diagrams in contrast to sequence diagrams?

<p>The relationships between the classes. (A)</p>
Signup and view all the answers

What does a 'State' represent in a State Chart Diagram?

<p>A particular condition that someone or something is in at a specific time. (C)</p>
Signup and view all the answers

In a State Chart Diagram, what is the role of a 'Transition'?

<p>To represent a change from one state to another. (C)</p>
Signup and view all the answers

What are the three elements of a state transition?

<p>Source State, Trigger, Destination State (A)</p>
Signup and view all the answers

What is a 'Trigger' in the context of State Chart Diagrams?

<p>An event that initiates a transition between states. (B)</p>
Signup and view all the answers

What is a 'self-transition' in a State Chart Diagram?

<p>A transition where the object remains in the same state. (D)</p>
Signup and view all the answers

What is a 'Call Event' trigger?

<p>The execution of a specific method or function. (A)</p>
Signup and view all the answers

Which of the following is an example of a 'Time Event' trigger?

<p>after (1 minute) (B)</p>
Signup and view all the answers

When using triggers with guard conditions, when is action executed?

<p>Only if the guard condition is true. (C)</p>
Signup and view all the answers

Flashcards

Software Engineering

The application of a systematic, disciplined, quantifiable approach for the development, operation, and maintenance of software.

SIE (Software Implementation and Engineering)

A process of analyzing user requirements and then designing, building, and testing software application which will satisfy those requirements.

SDLC (Software Development Life Cycle)

A framework that defines the phases/stages to be followed throughout the software development process.

SDLC Stages

Requirement gathering and analysis, design, implementation, testing, maintenance/evolution of software.

Signup and view all the flashcards

Function-Oriented S/W Design

A software design method that focuses on functions/procedures.

Signup and view all the flashcards

Object-Oriented S/W Design

A software design method focused on objects and their interactions.

Signup and view all the flashcards

Object Oriented Design

The discipline of defining the objects and their interactions to solve a software problem.

Signup and view all the flashcards

Design Model Types

Structural Models and Dynamic Models

Signup and view all the flashcards

Modeling Language

Any artificial language that can be used to express information or knowledge or systems in a structure that is defined by a consistent set of rules.

Signup and view all the flashcards

UML

A general-purpose, developmental, modeling language in the field of SIE that is intended to provide a standard way to visualize the design of a system.

Signup and view all the flashcards

Behaviour Diagrams

Diagrams focus on functional aspects.

Signup and view all the flashcards

Types of Behaviour Diagrams

Activity, State Machine, Use Case, Interaction, Sequence, Timing Diagrams

Signup and view all the flashcards

Structure Diagrams

Diagrams focus on static aspects of the system.

Signup and view all the flashcards

Types of Structure Diagrams

Class, Composite Structure, Component, Deployment, Object, Package, Profile Diagram

Signup and view all the flashcards

How to Discover Classes?

Noun/verb analysis or CRC cards

Signup and view all the flashcards

Class Structure

Class name, class attributes, class methods

Signup and view all the flashcards

Class Relationships

Association, Inheritance, Dependency, Aggregation, Composition

Signup and view all the flashcards

Object Diagram

A graph of instances, including objects and data values.

Signup and view all the flashcards

Static Object Diagram

Shows a snapshot of the detailed state of a system at a point in time.

Signup and view all the flashcards

Named Object Notation

Objectname : Classname || Objectname Classname. Should be there

Signup and view all the flashcards

Anonymous Object Notation

: Class name Object name is Optional.

Signup and view all the flashcards

Object with Attributes Notation

Objectname: Classname AttributeName1 = “Value” AttributeName2 = “Value”.

Signup and view all the flashcards

Interaction Diagram

Represents an interaction, which contains a set of objects and the relationships between them including the messages exchanged between the objects.

Signup and view all the flashcards

Interaction Diagrams Types

Temporal (Sequence Diagrams) or Structural focus (Communication Diagrams).

Signup and view all the flashcards

Sequence Diagram

Emphasizes on the time ordering of the messages.

Signup and view all the flashcards

Communication Diagram

Illustrates object relations and message flow.

Signup and view all the flashcards

Elements of sequence diagrams

Actor, Frame, Object

Signup and view all the flashcards

Class stereotypes

Boundary, Entity, Control Classes

Signup and view all the flashcards

Messages stereotypes

Lifeline, Execution/ Activation Bar and Messages

Signup and view all the flashcards

Message Types

Synchronous, Asynchronous, Return, Creation, Destruction

Signup and view all the flashcards

Synchronous call

Sender waits until receiver has finished processing the message.

Signup and view all the flashcards

Asynchronous call

Sender does not wait for the receiver to finish processing the message, it continues immediately.

Signup and view all the flashcards

Interaction Fragments

Reference, Alternative, Option, Iteration, Break, Parallel

Signup and view all the flashcards

Communication Diagram Emphasis

Emphasizes the organization of the objects that participate in an interaction.

Signup and view all the flashcards

Communication Diagram Symbols

Actor, Object, links, direction of messages, message sequence numbers, frame

Signup and view all the flashcards

Guard Expressions Example

sequence no. [Condition].: Msg

Signup and view all the flashcards

Iteration and Looping Signature

Msg signature of conditions to be done.

Signup and view all the flashcards

Rules of Thumb

crossing links and crowded diagrams should be avoided, all interactions should not be shown, obvious return values should not be modeled

Signup and view all the flashcards

Sequence Diagrams emphasis

emphasis the Sequences of events well

Signup and view all the flashcards

Communication Diagrams Show

Show the relationships between the classes.

Signup and view all the flashcards

Study Notes

Lecture 01: Introduction & Object Diagram

  • Software engineering is the application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software.
  • Software Engineering(SIE) is defined as a process of analyzing user requirements, designing, building, and testing software applications to satisfy those requirements.
  • SDLC (Software Development Life Cycle) is a framework defining the phases/stages throughout the software development process.
  • SDLC phases:
    • Requirement Gathering And Analysis
    • Design
    • Implementation
    • Testing
    • Maintenance/Evolution

The Design Phase

  • Software design methods include function-oriented S/W design and object-oriented S/W design.
  • Object-oriented design defines objects and their interactions to solve a software problem.
  • Design model types include structural and dynamic models.
  • Modeling languages serve to express information, knowledge, or systems in a structured and consistent manner.
  • UML (Unified Modeling Language)is a general-purpose, developmental modeling language intended to provide a standard way to visualize the design of a system.
  • UML Diagram Structure:
    • Behavior Diagrams: Activity, state machine, use case, interaction, communication diagram, interaction overview, sequence, and timing diagrams.
    • Structure Diagrams: Class, composite structure, component, deployment, object, package, and profile diagrams.

Class Diagram Revision

  • Classes are found using noun/verb analysis and CRC cards.
  • Class Structure:
    • Class name: the class name
    • Class attributes: e.g., +id: String, +name: String
    • Class methods: e.g., +getMaxBook(): int
  • Class Relationships:
    • Association
    • Inheritance
    • Dependency
    • Aggregation
    • Composition

Object Diagrams

  • An object diagram is a graph of instances, including objects and data values.
  • A static object diagram is an instance of a class diagram that shows a snapshot of the detailed state of a system at a point in time.
  • Object Notation Types:
    • Named Object: objectname : Classname.
    • Anonymous Object: Classname.
  • Object with Attributes:
    • objectname: Classname
    • attributename1 ="value"
    • attributename2 ="value"
  • "value" is used for string values.

Lecture 02: Interaction Diagrams - Part 1

  • An interaction diagram represents an interaction, containing objects and the relationships between them including messages exchanged between the objects.
  • Interaction diagrams include Sequence Diagrams (temporal focus) and Communication Diagrams (structural focus).
  • Sequence diagrams emphasize the time ordering of messages.
  • Elements:
    • Actor
    • Frame
    • Object: objectName: ClassName or :ClassName.
    • Class/Object Stereotypes: Boundary Class, Entity Class, Control Class.
    • Lifelines
    • Execution/Activation Bar

Sequence Diagrams

  • Messages:
    • Synchronous Message
    • Asynchronous Message
    • Return Message
    • Participant Creation Message: <>
    • Participant Destruction Message: <>.
  • Synchronous Call is used when the sender waits until the receiver has finished processing the message.
  • An Asynchronous Call; the sender does not wait for the receiver to finish processing the message and it continues immediately.
  • Create and Delete Message
    • Create Message: <>
    • Delete Message: <>
  • Lost and Found Message
    • Lost Message
    • Found Message
  • Self Calls

Interaction Fragments

  • Common interaction fragments include:
  • Reference (Ref)
  • Alternative (Alt): two or more
  • Option (Opt): one
  • Iteration (loop)
  • Break (break)
  • Parallel (par)

Lecture 03: Communication Diagrams

  • Communication diagrams emphasize the organization of objects participating in an interaction.
  • Symbols:
    • Actor
    • Object
    • Links between Objects
    • Direction of Messages
    • Message sequence numbers e.g., 1, 2, 2.1
    • Frame (interaction frame)
    • Message Syntax E.g., 1.0:login (UN/PW)
    • Self Calls
    • Guard Expressions Syntax: msg sequence no. [Condition] : Msg
  • Iteration and Looping Syntax:
    • Msg Sequence No *[Condition]: Msg Signature
    • Msg Sequence No *[condition] [iterative Clause]: Msg Signature (Optional)
  • Parallel Activities
    • 2.1 * [Condition]
    • 2.1 * || [Condition] (Concurrently notation)

Rules of Thumb for Diagrams

  • Avoid crossing links and crowded diagrams.
  • Do not show all interactions.
  • Do not model obvious return values.
  • Sequence diagrams emphasize the sequences of events well.
  • Communication diagrams show the relationships between classes.
  • Strengths:
    • Sequence diagrams show sequence or time order.
    • Communication diagrams show flexibility to add new objects in two dimensions.
  • Weeknesses:
    • Sequence diagrams are forced to extend to the right when adding new objects.
    • Communication diagrams are difficult to see message sequence.
  • Similarities:
    • Semantically equivalent
    • Diagrams can convert from each other without losing most of the information.
    • They model the dynamic aspects of a system.
    • They model the implementation of a use-case scenario.

Lecture 04: State-Chart (State-Machine) Diagram

  • State means a particular condition that someone or something is in at a specific time.
  • Notations:
    • Composite State
    • Simple State
      • State with Compartment ()
        • Internal Behaviours (entry, exit, do)
          • Internal Behaviours ->Entry, Exit, Do
    • Special States ->Initial State, Final State
  • Transitions:
    • Elements: Source State -><Trigger> Target State
    • Trigger: Time Event
    • Call Event/ Change Event
  • Self - Transitions: The state in question is exited and entered again
  • Types of Triggers
    • Call Event
    • Change Event
    • Time Event
  • Call Event/Trigger; Example: buttonPressed()
  • Change Event/ Trigger; Example: When (T>100°)
  • Time Event/ Trigger; Example: after (1 minute)

State Machine Conditions

  • Triggers with Guard Conditions (if true, execute):
    • message() [Guard Condition] / Action
    • when (Condition) [Guard Condition] / Action
    • after (timespan) [Guard Condition] / Action
  • Composite states has sub-states that are sequential or concurrent.
  • Sub-states are in a separate compartment known as the "Decomposition" compartment.
  • Simple Composite State consists of only one region.
  • Orthogonal Composite State encompasses more than one region within the decomposition compartment.
  • Hidden Decomposition Indicator:
    • entry/-
    • exit/

Lecture 05: Physical Diagrams

  • Not much information was given about physical diagrams

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