Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4,6 TrustPilot
logo-home
Class notes

Software Development (Computer Science ECM2414) Lecture Notes

Rating
-
Sold
-
Pages
19
Uploaded on
12-01-2021
Written in
2020/2021

Lecture notes for year 2 computer science, covering weeks 6-12.

Institution
Course

Content preview

Software Development Summary



Design Patterns

- Provide general reusable solutions to one type of problem during software development,
provide an architecture
o Develop classes, interfaces, relationships, inheritance hierarchies
o Design must be specific to problem but flexible to reuse
o Recommended use of existing design patterns by experienced OO programmers –
avoid reinventing the wheel, experience, not code reuse (add to repository)

OO design principles
o Identify aspects of application that vary + stay same
o Program to interface (supertype/abstract class, by exploiting polymorphism), not
implementation
o Favour ‘object composition’ over class inheritance – more flexible, change
behaviour/object at runtime
o Open/close principle – classes open for extension, closed for modification
o Dependency inversion principle – depend upon abstractions, not concrete classes



o Polymorphism – code working with an interface can work with other classes
implementing interface instead of programming to concrete example making
codebase susceptible to change



- Creational – abstraction of instantiation process

o Factory o Abstract o Prototype
factory o Builder
o Singleton

- Structural – composition of classes + objects

o Adapter o Decorator o Proxy
o Bridge o Façade
o Composite o Flyweight

- Behavioural – interactions between objects

o Chain of o Iterator o State
responsibili o Mediator o Strategy
ty o Memento o Template
o Command o Observer o Visitor
o Interpreter

,Software Development Summary


Factory pattern
- Defines interface for creating object, lets subclasses decide which class to instantiate, lets
class defer instantiation to subclasses
- Varying argument to shop constructors




-
- createPizza() – abstract method
- Creator – abstract class
- Concrete classes – extend creator, provide concrete implementation of factory method
(often parameterised)
- Uses inheritance (extends class + overrides factory methods), gives complete object in one
shot



Abstract factory pattern
o Uses composition (defines abstract type for creating family of products + lets
subclasses decide how produces) + returns family of related classes
o Provides interface for creating families of related/dependent objects without
specifying concrete classes
o Decouples code from factory
o Reduces dependencies on concrete classes
o Useful when creating multiple families of one product/ providing library of products
without exposing details

, Software Development Summary




Builder pattern
o Encapsulates product, can be built in steps
o Separates construction of a complex object from its representation so construction
processes can create different representations
o Exposes attributes, hides how to set them




o
o Builder – specifies interface for creating parts of complex object
o ConcreteBuilder – objects of create and assemble parts making up the Product
through Builder interface
o Director – object responsible for construction of complex object, delegates actual
creation and assembly to Builder interface
o Product – complex object created by ConcreteBuilder objects, consists of multiple
parts of these
o Advantages:
 Encapsulates way constructed
 Allows object construction in mutli-step and varying process
 Hides internal representation from client

Written for

Institution
Study
Course

Document information

Uploaded on
January 12, 2021
Number of pages
19
Written in
2020/2021
Type
Class notes
Professor(s)
Dr yulei wu
Contains
Week 6 to 12

Subjects

R161,39
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
samsmith123

Get to know the seller

Seller avatar
samsmith123 University of Exeter
Follow You need to be logged in order to follow users or courses
Sold
1
Member since
5 year
Number of followers
1
Documents
3
Last sold
5 year ago

0,0

0 reviews

5
0
4
0
3
0
2
0
1
0

Trending documents

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 exams and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT 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