OOPs

Hey boys and girls! Today I’m going to talk about the most software heavy paper we do this year, COMPSYS202. The lecturers are great, the people who didn’t get into software are now happy and we get to do this paper with mechatronics students which is pretty dope too.

COMPSYS202 basically extends what you learn in ENGGEN131 but we use C++ instead of C as C++ supports Object Oriented Programming. But what the heck is that? Object Oriented Programming, or OOP for short, is just another form abstraction we use to simplify our code. This leads into why we need engineers to write code, as with OOP the focus is less on coding and more about the design of the program.

As the name implies, OOP has us make ‘objects’ which have attributes that store data. An object could be a Cookie cutter which would have attributes like shape, size or color. Then, in our code, we could make multiple cookie cutters with different shapes, sizes or colors. An example of why this is useful was demonstrated in our assignment where we had to design an emergency  service system that had objects like victims, suspects, police officers, paramedics and firefighters which could be allocated to an emergency object (an object in an object, lmao what?).

The emergency service system decided how many police officer, paramedic and firefighter objects get allocated to the emergency object to help the victim and suspect objects. Yea, it was a pretty hard assignment. Make sure you get started with these as early as possible and test them on the University computers a couple of days before they’re due. If you found my explanation confusing, it’s alright because there’s a lot of content online that teaches you how to use OOP in C++. Here’s a tutorial series on YouTube I found pretty useful:

https://www.youtube.com/watch?v=xnh7ip5gpzc&list=PLfVsf4Bjg79DLA5K3GLbIwf3baNVFO2Lq

So how does all of this help a computer systems engineer? computer systems engineering isn’t software engineering but it’s still important for us to have and use good software practices. This is because whenever we program something like a microcontroller, it’s important we make the correct software design decisions like making sure we’re not wasting too much memory and that our code doesn’t take too long to run. Currently, my project paper (ELECTENG 209) doesn’t really require me to do much ‘abstract’ coding but next year there’s a project paper that requires you to program a robot with a shortest path algorithm. This is because the robot, using a light sensor circuit that you design, has to navigate a maze that is constructed by a projector. Here’s a video of the third years robots navigating a maze, and for now that’s all from me 🙂 .

You may also like...

Skip to toolbar