So here goes my first entry of my slog. I've been programming for a little under 2 years now and I found csc108 to be more of a review and slight extension to what I had previously learned. Three weeks into csc148 and I am already feeling a sense of challenge which is a nice change. Now, onto object-oriented programming…
Object-Oriented Programming (OOP) is a programming paradigm where everything is categorized as 'objects'. These objects can have instance variables and methods related to them which perform specific tasks. For example, an object 'Dog' can have an instance variable that contains the 'Dog's name and can have a method that when called can make the 'Dog' sit. These objects are created through classes. A class is basically a blueprint of the object and it is where it is created. The class holds the information of the object such as the name, methods and properties. In OOP there is the concept of inheritance, where a subclass can be created by inheriting it's properties and methods from other classes. Programmers use inheritance to avoid replicating code that could easily be reused or just slightly modified. In lecture and any computer science course for that matter, the idea of being lazy seems ideal, which makes sense for programming. Why recreate something that you already have or have access to?
No comments:
Post a Comment