Program Design

Table of Contents

Coupling vs Cohesion

Coupling

Cohesion

Functional Cohesion

open(file)
read(file)
close(file)

Communicational Cohesion

send_mail(mail, message)
verify_mail(mail)
get_user(mail)
get_domain(mail)

Sequential Cohesion

read(file) => content
parse(content) => object
handle(object) => ...

Procedural cohesion

check_permission(file)
open(file)
is_file_empty(file)
read(file)

Others