Takeaway Challenge
Today we undertook the Takeaway Challenge. Unfortunately it is much less delicious than it sounds, it involves no actual eating of takeaways! We had to build a takeaway application which could show a menu, take orders, show the costs and place an order. We were given relatively little direction on how to do this, so I went with a similar method to the student directory from a couple of weeks ago. I thought it might be easier to show it working rather than talk through it!







My app works, it met all the user functionality it needed to as well. I wrote a few tests for it, trying to follow the TDD process, however I know I probably should have written more than I did. My coverage is currently 83%, so definitely room for improvement. The main issue I had with testing was where I was asking for user input, the test would get stuck, and I couldn’t get it to accept input as a double!
The main difference between this and the student directory is the use of different classes and dependancy injection, trying to follow the single responsibility principle. I got it working quite well, most classes only did the minimum they had to. The biggest was the Menu class which had to display a menu, receive input and then process the input. Each input would go to a different class, but it was still quite long!
Todays song of the day is a song from the Borderlands 3 trailer which released yesterday. I am very excited for that game, and their trailers always have the best music, I would recommend listening to the music from all of them!

