Thursday, January 15, 2015
Chapter Two: A Trip to Objectville
This chapter really emphesized Javas features as an object oriented programming language. Most of the reading was a story about two programmers assigned to accomplish a task. One programmer prefered to use procedureal based program, and the other liked OO. In the end the OO programmer had the advantage because he had the ability to program without having to touch a single piece of previously tested code, whereas a procedural programmer would have to rewrite the whole code to accomidate for the new specifications.
Later on you also begin to read that all of Java code is defined as a class. One analogy that the book made to the setup is that a Class is to and Object, as a Recipee is to a Cookie. Objects can store information, and also execute tasks. Things objects know about themselves are known as instance variables. These variables represent the status of an object. Like functions in Python, things objects do are called Methods. Different classes can inherit conditions from other ones.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment