Software Engineering Review *5pt Craig Reilly
Software Engineering Review
Craig Reilly
Overview of today
10 till 11 we’ll have this talk.
Then a little break.
11 till 12 we’ll go through exam questions.
Then we’ll have a big break.
Then the lab can be used for asking tutors questions, on
everything and the assessed exercise.
Software Engineering Review Craig Reilly 1 / 16
Overview of this talk
I have no idea what’s in the exam.
Really, not a clue.
. . . seriously.
This review covers what I’d consider to be the “harder” parts
of the course.
The course was about:
UML
Coupling and Cohesion
Design Patterns
Testing
(Am I missing anything?)
Software Engineering Review Craig Reilly 2 / 16
Coupling and cohesion
Coupling and cohesion are two software quality metrics, and are
somewhat related. It wouldn’t be too hard to write an exam
question on coupling and cohesion:
You can show you’ve learned the types of coupling and cohesion
in the book.
You can apply your knowledge to spot coupling and cohesion in
the wild.
They’re also common job interview questions for some
companies.
Software Engineering Review Craig Reilly 3 / 16
What is coupling?
A measure of interdependence between modules and routines in
a software system.
Can you name different types of coupling? You’ve seen at least
a few in the labs.
Software Engineering Review Craig Reilly 4 / 16
What is coupling?
The book says there are the following types of coupling:
Content
Common
Control
Stamp
Data
Routine call
Inclusion/import
External
Software Engineering Review Craig Reilly 4 / 16
What is cohesion?
A measure of how well elements inside a module “belong
together”.
Can you name different types of cohesion? You’ve also seen at
least a few in the labs.
Software Engineering Review Craig Reilly 5 / 16
What is cohesion?
The book says there are the following types of cohesion:
Functional
Layer
Communicational
Sequential
Procedural
Temporal
Utility
Software Engineering Review Craig Reilly 5 / 16
Describe cohesion
Name a type of cohesion that facilitates code reuse.
Software Engineering Review Craig Reilly 6 / 16
Compare types of cohesion
What is the difference between Sequential Cohesion and
Procedural Cohesion? In what way are they similar?
Software Engineering Review Craig Reilly 7 / 16
Design Patterns
Design patterns are a key part of “lower level” software
engineering, and it’s easy to write exam questions about them.
You can show you’ve learned the patterns in the book.
You can apply your knowledge to a given problem.
You can contrast and evaluate different design patterns and
solutions.
They’re also common job interview questions for some
companies.
Software Engineering Review Craig Reilly 8 / 16
What is a Design Pattern?
Two of the elements that make up a design pattern are a name,
and a list of related patterns. What are the other elements?
Why is each element important?
Software Engineering Review Craig Reilly 9 / 16
What is a Design Pattern?
The book says:
Name
Context
Problem
Forces
Solution
Antipatterns
Related patterns
References
Software Engineering Review Craig Reilly 9 / 16
Describe a Design Pattern
Describe the Composite / General Hierarchy pattern.
Give an example of when you might use it.
Software Engineering Review Craig Reilly 10 / 16
What are Patterns Good For?
Name three patterns that facilitate code reuse. Briefly justify
your answers.
Software Engineering Review Craig Reilly 11 / 16
Compare Two Patterns
What is the difference between an Adapter and a Proxy?
Software Engineering Review Craig Reilly 12 / 16
Apply a Design Pattern
We are modelling staff members in a University.
All staff members have a name and an employee number.
Some staff members may be Lecturers. A Lecturer may run a
course, and only a Lecturer may do this.
Some Lecturers may be Senior Lecturers. A Senior Lecturer
may conduct a PhD viva, and only a Senior Lecturer may do
this.
Some staff members may be Tutors. A Tutor may deliver a
tutorial, and only a Tutor may do this.
Some staff members may be Invigilators. An Invigilator may
supervise an exam, and only an Invigilator may do this.
Software Engineering Review Craig Reilly 13 / 16
Apply a Design Pattern
StaffMember
+ name
+ employeeNumber
Lecturer
+ deliverLecture()
SeniorLecturer
+ conductPhDViva()
Tutor
+ deliverTutorial()
Invigilator
+ superviseExam()
Software Engineering Review Craig Reilly 13 / 16
Apply a Design Pattern
But a staff member may be more than one of a Lecturer, a
Tutor and an Invigilator. Staff members may also take on extra
duties over the course of their careers. . .
Software Engineering Review Craig Reilly 13 / 16
Apply a Design Pattern
rolesI *
StaffMember
+ name
+ employeeNumber
StaffRole
Lecturer
+ deliverLecture()
SeniorLecturer
+ conductPhDViva()
Tutor
+ deliverTutorial()
Invigilator
+ superviseExam()
Software Engineering Review Craig Reilly 13 / 16
Deliberately Awkward Interview Question
Also, some staff can be First Aid Officers. First Aid Officers
can give first aid, and only First Aid Officers may do so.
Some staff members who are both Lecturers and First Aid
Officers may be Field Trip Leaders. Field Trip Leaders can lead
a field trip, and only Field Trip Leaders may do so.
Software Engineering Review Craig Reilly 14 / 16
Deliberately Awkward Interview Question
Also, some staff can be First Aid Officers. First Aid Officers
can give first aid, and only First Aid Officers may do so.
Some staff members who are both Lecturers and First Aid
Officers may be Field Trip Leaders. Field Trip Leaders can lead
a field trip, and only Field Trip Leaders may do so.
Software Engineering Review Craig Reilly 14 / 16
And all the stuff I left out. . .
Please don’t think I’m suggesting this be the extent of your
revision.
If I’ve missed out something you really hoped would be covered
come talk to me in the lab.
Software Engineering Review Craig Reilly 15 / 16
http://dcs.gla.ac.uk/~creilly
c.reilly.2@research.gla.ac.uk
Software Engineering Review Craig Reilly 16 / 16
http://dcs.gla.ac.uk/~creilly
mailto:c.reilly.2@research.gla.ac.uk