Programming impulse: library assignment

I had a kind of programming impulse, and instead of only doing the library assignment, I worked out the first four programming assignments of the link that Ken sent us. This four assignments are: Gravity Calculator, Foo Corporation, Boston Marathon, and of course the Library assignment.

In the first two I had no problems doing them, and adapting them to the most possible Objected Oriented path I could. The problems started in the Marathon program, and not because it was a difficult task, but I tried really hard to make it Object-Oriented, but I think I fail in this mission. I had a really hard time trying to call a method of an array. I searched in the internet, I searched everywhere, and I couldn’t find the answer of how can I call a method out from an array list. Eclipse kept me displaying the error message that the method didn’t recognize the type array, so I did it old school by only calling out functions without calling methods out of my array list. (not so objected oriented 😦 )

Finally I get to the library assignment. This was a challenge. First I had no idea of what to do, but after a couple of hours of analyzing it (and doing other stuff) I began to more less have an idea of what was the path I needed to follow. When I was almost finished, I found out two mistakes: the title of my movie wasn’t showing correctly, and the method borrowed didn’t really work. That’s why I searched in my classmates blogs, and found Miguel’s blog of the task. In his blog I found the answer to my mistakes, and I finally finished the library assignment!

Unfortunately my Egit in Eclipse decided to sleep in the most important moment because it was not working, and I could not push my code to GitHub, but here I leave screenshots of my codes:

Gravity Calculator

GravityCalculator

FooCorporation

FooCorporation

Marathon

Marathon

Library assignment

Library

Library2

Eclipse Essential Training

Jajajaja many people would think that I’m a lazy person because I have just seen the Lynda videos on Eclipse Essential Training, but actually a was not aware of those videos until this weekend, and I install and practice in Eclipse on my own.

The series of videos that the website Lynda shows about the essential training of Eclipse are just for getting started, giving some format to the code, and the use of some practical tools that the platform offers.

I think that the information in those videos is going to be useful in the future when the things in Eclipse start getting a little bit more serious and complicated. I specially liked the video on Formatting because sometimes I struggle with the indentation and braces/brackets of the codes, so is good to know that I can adjust my own format and ensure all my codes have the same indentation and stuff.

 

Objects, methods & attributes

Well, in order to accomplish the goal of mastering the several topics that I should know by the end of the course, I saw a video in Youtube of a guy that has a channel named «Today’s IT». This video called «Objects, methods, attributes and classes» explains the definitions of objects, methods and attributes (the first mastery topic of the semester). I learned that an object is pretty much everything: numbers, letters, strings, variables, etc. In a more adequate definition, an object is everything that has two characteristics: an state and a behavior. In real life the state of an object is the real-time condition in which it is: color, name, turn on, turn of, shape. As well, the behavior of an object is the stuff that it can perform: turning on, turning of, receive messages, talk, increase volume. In object-oriented programming this two states are called attributes (or fields) and methods respectively. An attribute is the description of an object, while the method is the things that an object can do. This video helped me a lot to understand these concepts because this guy uses many real life comparisons, so the explanation is clearer. 

Here I leave the video. Hope this help other of my classmates 🙂