Structured Programming Exam 20211
Structured Programming Exam 20211
HUST
Duration: 75’ Course ID: IT4492E
Documents are not allowed
Question 1. Good software design has high cohesion and low coupling. Briefly explain the
meaning of this idea.
Question 2. What is a design pattern? Present one design pattern and indicate when that design
pattern should be used.
Question 3. Point out the code smells in the code shown below. Then briefly describe what
refactoring steps you would take to refactor the code.
Note: You don’t need to write down the refactored code, it’s sufficient if you say how you
refactor the code to remove the code smells.
Page 1/2
Question 4. The bakery chain Bread King plans to develop (from system analysis to operation
testing) the website for selling bread and cakes online to customers and to form the new whole
system as follow:
Decompose the bakery selling website using three approaches: functional, algorithmic, and
object-oriented.
Page 2/2