2015年2月13日星期五

Week 6: Object Oriented Programming PLEASE MARK THIS!!!



       As I understood in last week's Object Oriented Programming(OOP) lectures, OOP is a programming method that our programmers define our data in terms of objects.  In OOP programming languages like Python and Java, lots of basic things are referred as objects: a list, a function, a class... And for more information, here is exactly what OOP is.



       And the interesting thing is within these objects, there are different attributes and properties that can pass down or change by other objects.  And there is a famous example that geeks uses a lot to explain the upper things: the dog picture.

       A dog has attributes or as the picture says, properties such as its color, height, length, weight, etc.  Every dog in the world has these properties, but how do we introduce the dog you have, the unique one called Rayne?  We know it has gray, white, and black fur, its eye color is blue and brown... Yes, we use the methods to feed those values in to the properties of "every dog" to describe or introduce an unique one.  And these unique objects with values in them are usually called classes.

       The primary concept of OOP is the inheritance relationship between two separate classes. OOP's inheritance allows the programmers link these separate classes together, and pass down one's data and value to another: the class that passes the value is called a super class(mother class), and the class that receives the value is called a sub class(child class). And with the help of OOP, coding can be much easier, since the sub class inherits all the methods and properties from the super class.
       Since OOP is such a good way to analyze data and different classes, I believe I will try my best to understand more about this effective and efficient method.

没有评论:

发表评论