Domain Modeling and Activity Diagrams in Software Design

Object Interaction (Continued)

Constructing a Domain Model

Shows the object relative to the other subsystems. Interconnections help to identify events your object will receive, as well as expected outputs.

Constructing State Transition Tables

Columns are Events, Rows are States. Cells represent a transition to another state in response to an event.

State Transition Table Advantages

  • Systematic construction of the state model, ensuring every state-event is accounted for
  • Automatic generation of state diagrams
  • Allows
Read More

Data Structures: Algorithms for Points, Strings, and Compression

Given points in a plane, we can construct a geometric graph. Its vertices correspond to the points, and each edge has a weight equal to the distance between its endpoints. (We might have all “n choose 2” possible edges, or maybe a sparser subset of edges.)

  • The EMST (Euclidean Minimum Spanning Tree): Given n points in the plane, find the lightest possible spanning tree made up of such edges.

We go over the definition (saying which edges are present), and also see a demo here: share/0326/delaunay/

  • An
Read More

Comprehensive Data Structures and Algorithms in C

1. Binary Search

Binary Search Using Recursion

#include <stdio.h>
int binser(int [], int low, int high, int key); // declaration
int main() {
    int n;
    printf("Enter array size: ");
    scanf("%d", &n);
    int arr[n];
    printf("Enter array in sorted order:\n");
    for(int i = 0; i < n; i++) {
        scanf("%d", &arr[i]);
    }
    int key;
    printf("Enter element to search: ");
    scanf("%d", &key);
    int found = binser(arr, 0, n - 1, key);
    if(found == -1) {
Read More