3.5 months

2/5

2/19

2/26

3/26

5/21

Team Selection

Client Presentations

Project Proposal

Revised Project Proposal

Final Project Documentation

No class

No class

No class

Project Presentations

5/03

No class

Implementation / Testing / Deployment

94 Days

3.5 months

2/5

2/19

2/26

3/26

5/21

Team Selection

Client Presentations

Project Proposal

Revised Project Proposal

Final Project Documentation

No class

No class

No class

Project Presentations

5/03

No class

Implementation / Testing / Deployment

94 Days

Project Proposal Template

This Friday!

03/01/2020

Guest Lecture by Professor Nam Wook Kim

Human-centered Design

The MVC Pattern

Model

View

Controller

Logic and calculations separate from any data storage or user interface

User interface

Data access / Data storage

``````Equation = function() {

this.numbers = [];
this.operators = [];

}

Equation.prototype.toString = function() {

var output = "";
for (var o in this.operators) {
var n = this.numbers[o];
output += n + this.operators[o];
}
output += this.numbers[this.numbers.length-1];

return output;

};``````
``````var eq = new Equation();
eq.numbers = [22, 33.4, 55];
eq.operators = ['+', '-'];``````

Jupyter Notebook ("glue"-code)

Package structure

Package structure

``````from .controller import *
from .view import *``````
``from .mathengine import MathEngine``
``````class MathEngine:

def __init__(self):
'''
A constructor.
'''

print('Really new Math Engine instance.')

'''
Takes 2 integers, and adds them.
'''

return number1 + number2``````

No user interaction here! Just Logic!

``from .ui import UI``
``````class UI:

def __init__(self):
'''
'''

print('New UI')

def start(self, controller):
'''
We ask the user for 2 numbers.
'''

number1 = input()

number2 = input()

print('Result:', result)``````

UI stuff here that calls the logic!

Package structure

Controller is separate! (All calculations, logic, algorithms  etc.)

View is separate! (All user interactions)

Everything is bundled as one package!

We can import the package and use it!

This was the VC (View and Controller) part of the MVC pattern!

Why structure the code like this?

Architecture is more important than features!

Remember this!

Properties

Methods

Class Diagram

Use Case Diagram

Activity Diagram

Sequence Diagram

Keep it simple!

Divide and Conquer

Problem

Sub-Problem

Sub-Problem

Sub-Problem

Solved

Sub-Problem

Solved

Solution

Divide

Divide

Conquer

Conquer

It's a lifestyle!

Modularity

Split things up...

Subsystem

Module

vs.

independent value

can not function on its own

Information Hiding

treat stuff as black boxes!

Information Hiding

``````class MathEngine:

def __init__(self):
'''
A constructor.
'''

print('Really new Math Engine instance.')

'''
Takes 2 integers, and adds them.
'''

return number1 + number2``````
``````....

controller = MathEngine()

....``````

By Daniel Haehn

# CS410 Lecture 10

Slides for CS410 Software Engineering at UMass Boston. See https://cs410.net!

• 174