100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Class notes

COS3711 – Theory of Computation: Comprehensive Not

Rating
-
Sold
-
Pages
144
Uploaded on
09-08-2025
Written in
2025/2026

These detailed and well-structured notes for COS3711 (Theory of Computation) cover all the core topics you need to master for the course. They are designed to help students understand complex concepts with ease, providing both theoretical explanations and practical worked examples. Topics include finite automata, regular expressions, context-free grammars, pushdown automata, Turing machines, computational complexity, and decidability. Whether you’re preparing for assignments, tests, or the final exam, this resource is perfect for deepening your understanding and improving your results. The material is organised in a logical, step-by-step format, making it ideal for both quick revision and thorough study.

Show more Read less
Institution
Course











Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Course

Document information

Uploaded on
August 9, 2025
Number of pages
144
Written in
2025/2026
Type
Class notes
Professor(s)
Cos3711
Contains
All classes

Subjects

Content preview

Design patterns




#design-
patterns

,Table of Contents
About 1

Chapter 1: Getting started with Design patterns 2

Remarks 2

Examples 2

Introduction 2

Chapter 2: Adapter 4

Examples 4

Adapter Pattern (PHP) 4

Adapter (Java) 4

Java Example 5

Adapter (UML & example situation) 6

Chapter 3: blackboard 11

Examples 11

C# Sample 11

Chapter 4: Bridge Pattern 15

Examples 15

Bridge pattern implementation in java 15

Chapter 5: Builder Pattern 18

Remarks 18

Examples 18

Builder Pattern / C# / Fluent Interrface 18

Builder Pattern / Java Implementation 19

Builder pattern in Java with composition 21

Java / Lombok 24

Advanced Builder Pattern With Java 8 Lambda Expression 25

Chapter 6: Chain of Responsibility 28

Examples 28

Chain of Responsibility example (Php) 28

Chapter 7: Command pattern 30

Examples 30

, Command pattern example in Java 30

Chapter 8: Composite pattern 33

Examples 33

Composite logger 33

Chapter 9: Composite pattern 35

Introduction 35

Remarks 35

Examples 35

pseudocode for a dumb file manager 35

Chapter 10: Data Access Object(DAO) design pattern 37

Examples 37

Data Access Object J2EE design pattern with Java 37

Chapter 11: Decorator pattern 40

Introduction 40

Parameters 40

Examples 40

VendingMachineDecorator 40

Caching Decorator 44

Chapter 12: Dependency Injection 46

Introduction 46

Remarks 46

Examples 47

Setter injection (C#) 47

Constructor Injection (C#) 47

Chapter 13: Facade 49

Examples 49

Real world facade (C#) 49

Facade example in java 49

Chapter 14: Factory 53

Remarks 53

Examples 53

, Simple factory (Java) 53

Abstract factory (C++) 54

Simple example of Factory that uses an IoC (C#) 56

An Abstract Factory 58

Factory example by implementing Factory method (Java) 59

Flyweight Factory (C#) 63

Factory method 64

Chapter 15: Iterator Pattern 65

Examples 65

The Iterator Pattern 65

Chapter 16: lazy loading 67

Introduction 67

Examples 67

JAVA lazy loading 67

Chapter 17: Mediator Pattern 69

Examples 69

Mediator pattern example in java 69

Chapter 18: Monostate 72

Remarks 72

Examples 72

The Monostate Pattern 72

Monostate-based hierarchies 73

Chapter 19: Multiton 75

Remarks 75

Examples 75

Pool of Singletons (PHP example) 75

Registry of Singletons (PHP example) 76

Chapter 20: MVC, MVVM, MVP 78

Remarks 78

Examples 78

Model View Controller (MVC) 78

Model View ViewModel (MVVM) 79
$3.04
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
zakmoodley

Get to know the seller

Seller avatar
zakmoodley University of South Africa (Unisa)
Follow You need to be logged in order to follow users or courses
Sold
0
Member since
3 months
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions