Comp40070 Design Patterns comprises an introduction to Design Patterns, mainly from the ‘Gang of Four’ catalogue. The primary language used is Scala 3. This module will run online starting on September 9, 2024.
Essential Preparation
Become familiar with the basics of general-purpose Object-Oriented Programming in Scala 3 (classes, methods, inheritance, polymorphism etc.). We’ll cover some of the more idiosyncratic constructs (e.g. case classes, pattern matching) during the module itself.
Recommended Reading
There are many useful resources online to help you learn Scala. On the patterns side of things, I’ll provide some links during the module. There’s no essential reading for this module.
Programming Preparation
To gain some Scala practice, complete this programming exercise and submit your solution by September 15, 2024 (submission details will be provided). This in an undergraduate programming assignment, but serves well as a warm-up exercise for the module. Details on setting up Scala for this module.
I am also using this exercise to see how you approach software design. Please design this program as best you can, as if you were writing code that your colleagues would also have to work with. No need for unit testing or dependency injection, but I’d like the design of your program, i.e. what functionality goes into which class, to be your best effort.
Develop your solution under Git source code control. Write a few lines in the readme file justifying briefly any design decisions that you reflected on. If you write nothing, this means you thought there were no design decisions to be made. Really? 🙂
Please note that completing this exercise is compulsory.
Submission details: You’ll be sent details of a GitHub repo to push to in early September. Just use a local Git repo in the meantime. You must submit a genuine Git repo of your work, not simply a completed project.
Study Material
Here are slides from an undergraduate programming module that I use to introduce Scala to Java programmers. Don’t get hung up on details, but scanning these should help you in getting used to Scala. Apart from the basic OO features of Scala, the topics that would be useful to have a notion of before the module starts include: use of val & var, basic higher order functions like filter and map, immutable data structures, constructors, the object syntax and the companion object, the apply method and trait basics.
Technology Used
I recommend the IntelliJ IDEA. You can get an educational licence after you get a UCD email address, or use the demo version until then. Using another IDE, or no IDE, is fine too.
You will also want to draw basic UML diagrams during the module. I recommend the simple Violet editor (all platforms), or for a text-based alternative, try PlantUML.