Monday, September 19, 2016

CST 338 Week 3

Week 3

I've really enjoyed the time that we've been given in this course to focus on programming assignments. This assignment was surprisingly time-consuming and required a lot of focus. The assignment prompt wasn't as explicit as it had been in the past. It's been really great though because my group has been very on it and we are continuing to finish prior to the due date, which allows me to be obsessive (I am about everything) and check everything again before we submit it. I'm after those points!

The assignment focused mostly on loops and arrays, from what I can tell. We implemented 3 classes that work together (Card, Hand, and Deck). I like that this assignment was just the foundation for a future game and can be used with any card game. I think it displays the potential benefit of OOP very well.

Specific prompts

What is the largest multi-dimensional array that you have used?

A 3x3 array is likely the largest multi-dimensional array that I've used and it was most likely for an assignment. I find myself using objects the most frequently and don't usually need to model anything larger than a 2x2.

What is the largest that you think would be unwieldy and why?

I would definitely say that a 3x3 and up would be considered unwieldy. As multi-dimensional arrays grow, they quickly become more and more difficult to contain in your head. If the person writing them struggles to understand what they are, the person reading them will likely have a much more difficult time. I like to think I'm constantly writing for a future reader. That helps me keep my code in line and (hopefully) legible.

What does inheritance do for your classes? Have you used it in the past? How?

Inheritance allows like objects to share the same code through a base class. This can be useful, but it often leads to giant messes of hard-to-follow hierarchies. I very seldom use inheritance and, in my specific profession, generally just define completely separate classes. Sometimes I will extend classes, but I can't think of a specific example for when I used inheritance outside of course work.

1 comment:

  1. I'm glad you've been enjoying the programming assignments so far!

    ReplyDelete