Courses

https://www.linkedin.com/learning/software-design-modeling-with-uml/modeling-languages

https://www.linkedin.com/learning/programming-foundations-object-oriented-design-3/learn-object-oriented-design-principles


Model: a partial abstract representation - analyze, communicate, test, document, understanding of the system

  1. computational: time-varying behavior of a system

  2. analytical: math of relationship among variables in a system

  3. non-analytical/descriptive: describe components and their relationships in a system.

    1. application: UML models, sysML models, BPMN models

    2. Data: relational, network, hierarchical models - OO data models

UML: 2.5 (2015) - omg.org

https://plantuml.com/download


UML Diagrams

  • Structure: static view

    • Class diagram

      • classifiers

      • features

      • relationships

    • Component diagram

    • Object diagram

    • Composite structure diagram

    • Package diagram

  • Behavior: dynamic view

    • Deployment diagram

    • Use case diagram

      • use cases

      • systems

      • actors

      • associations

    • Activity diagram

    • State machine diagram

    • Interaction

      • Sequence diagram

      • Communication diagram

      • Timing diagram

      • Interaction overview

      • diagram

aggregation and composition


  • attributes = properties = characteristics = state = fields = variables

  • object = instance

  • defining a class = creating objects = instantiation

  • superclass=parent class=base class

  • subclass=child class=derived class


class components:

  • identity=name=type: glass

  • attributes=properties=data: color, size, fullness

  • behaviors=operations: fill(), empty(), clean() = method



  1. abstraction

  2. polymorphism

  3. inheritance

  4. encapsulation



@startuml farshid

left to right direction

package "High level definition for Image Processing interface" {

together {

interface output_data

{

*data

}

interface input_data

{

*data

}

interface image_processing_class {

*input_data

*output_data

}

}

input_data "1" *-- "many" image_processing_class : contains

output_data "1" *-- "many" image_processing_class : contains


}


newpage


interface output_data

{

*data

}

note top of output_data

<<struct>> DataNode

end note

@enduml


https://github.com/pirahansiah/cvtest

https://github.com/opencv/opencv/blob/4.x/modules/highgui/test/test_gui.cpp

functional requirements: The module must

  • test opencv input/output image

  • allow to check grand truth image and output image

  • maintain a library of all comparison SSIM, PSNR, ...

  • allow to choose different comparison algorithms: PSNR, SSIM, ...

non functional requirements: the module should be ... (maintainability, reliability, usability, availability)

  • simple library attached to project

  • fast

  • update-able

FURPS requirements:

  • functionality: SSIM, PSNR,

  • usability: attached to the project as a class test

  • reliability: assert in C++

  • performance: real-time

  • support-ability: simple class with all functions

use cases:

  • title: developer test image processing functions by see ground truth image and output image differences

  • primary actor: computer vision developer

  • success scenario: check and see differences between ground truth image and output image by different matrix such as SSIM, PSNR, ...


user story:

as a computer vision developer i want to test my output image so that I can see ground truth image and my output image differences



  1. classes - objects

  2. relationship between objects

  3. conceptual object model

  4. CRC card = CRH card

    1. Class (name of class) = Component : class test histogram

    2. responsibility = responsibility : test two image histogram and compare them

    3. collaboration = Helper= get ground truth image and compare it with output function



classA *myclass=new classA()

constructor : we want to set value at the beginning and not problem with null or 0 or ... initialization

destructor = finalizer

static variable: shared across all objects in a class = shared variable = class variable = classA.staticVariable

SubClass(int foo, int bar): SuperClass(foo){}

interface: list of methods = <<name>> = ---->


SOLID, DRY (don't repeat yourself), YAGNI (your ain't gonna need it), design pattern,