23
January 20, 2020 © Sam Siewert SE310 Analysis and Design of Software Systems Lecture 2 - 2 Systems Engineering for OO

SE310 Analysis and Design of Software Systemsmercury.pr.erau.edu/~siewerts/se310/documents/Lectures/Lecture-… · Agile –Manifesto that Hosts Spiral, XP, Scrum, Feature-Driven

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: SE310 Analysis and Design of Software Systemsmercury.pr.erau.edu/~siewerts/se310/documents/Lectures/Lecture-… · Agile –Manifesto that Hosts Spiral, XP, Scrum, Feature-Driven

January 20, 2020 © Sam Siewert

SE310

Analysis and Design of Software

Systems

Lecture 2-2 – Systems Engineering for

OO

Page 2: SE310 Analysis and Design of Software Systemsmercury.pr.erau.edu/~siewerts/se310/documents/Lectures/Lecture-… · Agile –Manifesto that Hosts Spiral, XP, Scrum, Feature-Driven

Different Versions of Modelio

Standard Image

– Current (check)

– 3.4.1 Community Edition

(2019) (download)

Latest (download)

– 4.0.0 Edition

– Add-on Modules (Store)

SE Workstation 3.7 SD

– 3.7 SD (license required)

– Installed on SE Workstation

– 3.7 Community Edition

(download)

© Sam Siewert 2

Community

SD - Software Dev

Page 3: SE310 Analysis and Design of Software Systemsmercury.pr.erau.edu/~siewerts/se310/documents/Lectures/Lecture-… · Agile –Manifesto that Hosts Spiral, XP, Scrum, Feature-Driven

Note on Modelio Models (Examples)

Modelio UML models can be downloaded to use a reference or starting point

Note that 3.4.x models are not compatible with 3.7 (bummer - I don’t know why?)

Model export/import uses UML 2.5 language, but does not transfer diagrams!

Just download 3.4 SD models I have created and put in your workspace!

© Sam Siewert 3

Step-1 - Download 3.4 SD models

Step-2 - Unzip where you like!

Step-3 - Switch workspace to point to

3.4-SD directory

I did export from 3.4 to

UML and import into 3.7 for

3.7-SD, but note that

diagrams are missing!

Page 4: SE310 Analysis and Design of Software Systemsmercury.pr.erau.edu/~siewerts/se310/documents/Lectures/Lecture-… · Agile –Manifesto that Hosts Spiral, XP, Scrum, Feature-Driven

Learning Objective

Software Engineering Process? – Lifecycle Phases

Agile – Manifesto that Hosts Spiral, XP, Scrum, Feature-

Driven or any Iterative Process [Waterfall with Feedback]

Requirements? Architecture? – First Phase is Research,

Analysis and Specification© Sam Siewert 4

SPIRAL in Agile XP – Extreme

In Agile

WATERFALL

feedback

Page 5: SE310 Analysis and Design of Software Systemsmercury.pr.erau.edu/~siewerts/se310/documents/Lectures/Lecture-… · Agile –Manifesto that Hosts Spiral, XP, Scrum, Feature-Driven

Notes on Research for SystemsSoftware is Often Integrated in Specific Domains (Requires Research)– Energy

– Transportation, Shipping

– Security, Remote Sensing, Defense

– Information Storage and Retrieval, Enterprise Systems

– Decision Support Systems

– Aviation, Aerospace

Research can Start with Simple Google Search or Wikipedia, but should follow pointers to peer-reviewed resources [citations and references]– IEEE Xplore, ACM Digital Library

– Google Scholar, Microsoft Academic Search

– Research Gate [research social network]

– ERAU Library Resources

– Industry Specifications, Journals, Developer Papers, White Papers [IBM, Intel, NVIDIA, Texas Instruments, …]

– Non-profit research institutes and agencies [CERT, SEI, NDIA, FAA, FIPS, CSRC,…]

– Who are you referencing and citing and why?

© Sam Siewert 5

Page 6: SE310 Analysis and Design of Software Systemsmercury.pr.erau.edu/~siewerts/se310/documents/Lectures/Lecture-… · Agile –Manifesto that Hosts Spiral, XP, Scrum, Feature-Driven

Overall Learning Objectives

Overall OO

Lifecycle

Requirements,

Architecture,

Unit/Sub-System

Construction,

Integration & Test,

CM

Translation of

OOA/OOD to an

OOP (C++ or

Java)

© Sam Siewert 6

Recall that Testing starts with SWE Kick-off

SQA is a Concurrent Effort

Cross-Validation During Each Phase

Test Requires Design and Development

Test Execution Starts with Design if Possible,

But with Code Units for sure

www.ndia.org/Divisions/Divisions/SystemsEngineering/Documents

Page 7: SE310 Analysis and Design of Software Systemsmercury.pr.erau.edu/~siewerts/se310/documents/Lectures/Lecture-… · Agile –Manifesto that Hosts Spiral, XP, Scrum, Feature-Driven

When Does OOP – Code Construction

Start?HW & SW

Engineering

can be

Concurrent

Test and

Design/Dev

can be

Concurrent

Depends upon

Process Used

© Sam Siewert 7

Regre

ssio

n T

esting

www.ndia.org/Divisions/Divisions/SystemsEngineering/Documents

Page 8: SE310 Analysis and Design of Software Systemsmercury.pr.erau.edu/~siewerts/se310/documents/Lectures/Lecture-… · Agile –Manifesto that Hosts Spiral, XP, Scrum, Feature-Driven

Exploratory Coding

Early Coding Must be Done Carefully, But Can Be Useful

Prototyping – Throw-Away Connotation Sometimes Frowned Upon

Proof-of-Concept – Algorithms or Design Aspects Where Implementation is Expected to Be Large Challenge, Computationally Complex

Operational Specification – Best! Executable Design is the Goal.

CASE (Computer Aided Software Engineering) Tools– MySQL Workbench – Schema Analysis and Design, SQL

Generation

– GUI Builders, E.g. Qt, Java GUI Builders

© Sam Siewert 8

Page 9: SE310 Analysis and Design of Software Systemsmercury.pr.erau.edu/~siewerts/se310/documents/Lectures/Lecture-… · Agile –Manifesto that Hosts Spiral, XP, Scrum, Feature-Driven

Java Applet - AddressBook

Same Issue with Java Security (allow site)

© Sam Siewert 9

Page 10: SE310 Analysis and Design of Software Systemsmercury.pr.erau.edu/~siewerts/se310/documents/Lectures/Lecture-… · Agile –Manifesto that Hosts Spiral, XP, Scrum, Feature-Driven

Java Prototyping

If You Like Java and Want to Prototype Designs or build

PoC Apps, Try Dr. Java on Windows or use javac byte-

code compiler on PRClab

E.g. fibonacciSeq.java is a simple Example Class

© Sam Siewert 10

Page 11: SE310 Analysis and Design of Software Systemsmercury.pr.erau.edu/~siewerts/se310/documents/Lectures/Lecture-… · Agile –Manifesto that Hosts Spiral, XP, Scrum, Feature-Driven

Java DevelopmentDr. Java – for

Windows, Nice

IDE

Udacity Course

on Java -

https://www.udac

ity.com/course/cs

046

Absolute Java

Book

© Sam Siewert 11

Page 12: SE310 Analysis and Design of Software Systemsmercury.pr.erau.edu/~siewerts/se310/documents/Lectures/Lecture-… · Agile –Manifesto that Hosts Spiral, XP, Scrum, Feature-Driven

Traditional SA/SD – Useful, But Not OO

Data Flow Diagrams – Data [Messages] Between Processes and is Transformed

Entity Relationship Diagrams – Lacks Operations, but Defines Entities [Objects] and Relationships

SE300

State Machines [in Common, but Typically for Each Process in DFD]

Flow-Charts – Detailed Procedural Design [Interaction, Logic]

© Sam Siewert 12

Stores, Flows, Processes, External Entities

http://en.wikipedia.org/wiki/Finite-state_machine

http://en.wikipedia.org/wiki/Data_flow_diagram

http://en.wikipedia.org/wiki/Entity%E2%80%93relationship_model

http://en.wikipedia.org/wiki/Flowchart

Page 13: SE310 Analysis and Design of Software Systemsmercury.pr.erau.edu/~siewerts/se310/documents/Lectures/Lecture-… · Agile –Manifesto that Hosts Spiral, XP, Scrum, Feature-Driven

Code, Analysis, Design, Test - CMVCAny Non-Binary File (Binary Ok, but Less Useful)

SSH is Best Option with PRClab

See – Lecture-Notes-on-Git-for-CMVC.pdf

© Sam Siewert 13

Page 14: SE310 Analysis and Design of Software Systemsmercury.pr.erau.edu/~siewerts/se310/documents/Lectures/Lecture-… · Agile –Manifesto that Hosts Spiral, XP, Scrum, Feature-Driven

Architecture and Design Patterns

OO Has Goal of Design and Software Re-Use

– Encapsulation of Data and Operations

– Class Hierarchy and Object Instances

– Well Understand Use Cases

– Well Understand Interaction Between Objects

Study 4 Key System Types

1. Interactive – E.g. GUI, CLI

2. Event Driven – E.g. Anit-lock Breaking System Software

3. Transformational – E.g. Image Processing, Encode/Decode

[MPEG Digital Video, RAID]

4. Transaction Oriented – E.g. DBMS

© Sam Siewert 14

Page 15: SE310 Analysis and Design of Software Systemsmercury.pr.erau.edu/~siewerts/se310/documents/Lectures/Lecture-… · Agile –Manifesto that Hosts Spiral, XP, Scrum, Feature-Driven

Domain Models – Use Case Details

© Sam Siewert 15

Start Here! https://www.modelio.org/

OMG UML 2.5 Standard

Structural Diagrams

• Start with Class Diagram and CRC

• Then Object Diagram

• Package and Deployment

Behavioral Diagrams

• Start with Use Case Diagram

• Interaction Sequence Diagram after

Class and Object Done

• Add State Machine and Activity

Diagrams for concurrency and

statefulness

Helpful Validation and Verification Features for

Design

• Integrated Models

• Checklists – Completeness

• CPP and Java Code Generation

USE Modelio 3.7 SD as your DESIGN TOOL

UML is Universal Modeling Language [OMG, UML.org]

Use to Support Requirements Analysis

Page 16: SE310 Analysis and Design of Software Systemsmercury.pr.erau.edu/~siewerts/se310/documents/Lectures/Lecture-… · Agile –Manifesto that Hosts Spiral, XP, Scrum, Feature-Driven

Modelio Examples – Hands-on

Start with

Use Case

and/or

Level-0

Class

Diagram

Class

Diagram

(Level-0)

© Sam Siewert 16

Names and Relationships

Generalization (sub-class or type-of)

Composition (Elements of a Class that compose)

Association (Money comes from 1 cash dispenser)

Add Attributes

Leave Methods for Level-1

Page 17: SE310 Analysis and Design of Software Systemsmercury.pr.erau.edu/~siewerts/se310/documents/Lectures/Lecture-… · Agile –Manifesto that Hosts Spiral, XP, Scrum, Feature-Driven

Use CaseDefines What is “in Scope” – Must be Designed,

Subsystem in System

Interfaces to Users or External Agents

© Sam Siewert 17

Page 18: SE310 Analysis and Design of Software Systemsmercury.pr.erau.edu/~siewerts/se310/documents/Lectures/Lecture-… · Agile –Manifesto that Hosts Spiral, XP, Scrum, Feature-Driven

Navigation and Types

Indicate Level of Diagram (L0 –

specification only, L1 – spec +

methods, L2 – full detail)

Some CASE Tools support

Leveling, Some Do Not – if not,

use naming convention

Built-in Types

Derived Types (Classes)

© Sam Siewert 18

Page 19: SE310 Analysis and Design of Software Systemsmercury.pr.erau.edu/~siewerts/se310/documents/Lectures/Lecture-… · Agile –Manifesto that Hosts Spiral, XP, Scrum, Feature-Driven

Refine to Create ModulesGroup Classes into Modules (C++ Files)

© Sam Siewert 19

Page 20: SE310 Analysis and Design of Software Systemsmercury.pr.erau.edu/~siewerts/se310/documents/Lectures/Lecture-… · Agile –Manifesto that Hosts Spiral, XP, Scrum, Feature-Driven

Generating CodeFor Source Code Management, Verify Modelio C++

Designer or Java Designer Modules

Built-into SD Version (licensed) on SE Workstation

Not Available in Open Source Version

© Sam Siewert 20

Page 21: SE310 Analysis and Design of Software Systemsmercury.pr.erau.edu/~siewerts/se310/documents/Lectures/Lecture-… · Agile –Manifesto that Hosts Spiral, XP, Scrum, Feature-Driven

Modelio 3.x SD Academic VersionIncludes C++ Designer (C++, C#) for Code Generation

from Models

Includes Java Designer for Code Generation

Forward and Reverse Engineering

Auto-generation of Diagrams from UML XMI (XML

Metadata Interchange)

Can Target Windows, Linux, Unix

Can just use Modelio Community Edition (SD optional)

© Sam Siewert 21

Page 22: SE310 Analysis and Design of Software Systemsmercury.pr.erau.edu/~siewerts/se310/documents/Lectures/Lecture-… · Agile –Manifesto that Hosts Spiral, XP, Scrum, Feature-Driven

Code Generation from Class Model

Class kind

must be C++

Class (not

UML)

Use Code

Generation

and Code

View Buttons

on C++ Tab

Can

Generate a

Makefile

© Sam Siewert 22

Page 23: SE310 Analysis and Design of Software Systemsmercury.pr.erau.edu/~siewerts/se310/documents/Lectures/Lecture-… · Agile –Manifesto that Hosts Spiral, XP, Scrum, Feature-Driven

Code is Generated for Export to Target

Makefile (not working), but compile with g++

Can add “int main(void)” and start writing test driver

Bring back to model and “retrieve” updates to

synchronize

© Sam Siewert 23