Friday, May 12, 2017

Getting the whole picture...MIT Library Project

So, I have been working on this MIT Library Project assignment #4 for our meetup group at the library.  I was using the same example from MIT Lecture 4 of the baby object to try to build code for the library project. It seemed no matter what order or variables I used to build the code I was getting one error or another. I reviewed the lesson a couple times, I googled objects and compared my code to a bunch of other objects but wasn't getting very far.

So, I took a couple days off and then came back and reattempted the project. I still had the same issues so, I decided to try a different resource. I had purchased a couple old Java books, and found the answer in the 2013 Introduction to Java Programming by Y. Daniel Lang.

The example on the left, is the same code from his book. It wasn't that the code was wrong, it was that I wasn't getting the whole picture. When I compared the circle code to mine, the items were in different order and the brackets and variables were setup differently. All it took was a different perspective, a full page of working code creating an object to help everything make sense. After I found this, I finished the library project in about fifteen minutes and all worked just fine. I realize now that some random bits of code sometimes aren't enough to get the whole picture on how some of the larger ideas work.

https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-092-introduction-to-programming-in-java-january-iap-2010/assignments/

No comments:

Post a Comment