Object-Oriented Programming

Logic Gates and Finite State Machines

The last week I have had to befriend research, this is because we were given a task and told to understand it. So, I did what any sensible programmer would do, and researched about the things that required understanding.

Firstly, we had to read this page and understand it, I was a bit confused about it at first, but after reading it many times, I was able to understand it mostly. In simple terms, it is a webpage that talks about Object-Oriented Programming in Python, using classes. The page is useful after reading/understanding it, I like how it had a lot of examples and explanation behind each.

After understanding it, we had to copy the code, and implement some more classes (so you really need to know the document). This part was not that hard, just a bit tedious, only because of its repetitiveness. But I managed to complete it, and once it was all copied I played around with the code, this helped me understand the code better.

After that we needed to read another page (I know lots of reading), and understand Finite State Machines (read my older post on it). But simply put, it is something that's output is dependent only by its current inputs.

One we finished understanding them, we had to implement JK Flip-Flops, and make it work (that part wasn't easy). Because of the recursion, we had to fix it, but I won't explain it here, read recursion (post) instead.

Work done here: the file that contains the completed code.


I believe we are learning this because knowing about object-oriented programming is very important when making good programs. I did find the reading part frustrating, mainly because it is a complicating task to understand/grasp. I plan to deal with the frustrations by reading more (for better knowledge), and coding more (so these parts can be quicker), and hopefully learn more about python. I found peers/friends one of the more helpful parts of completing this task.