Object-Oriented Programming: Difference between revisions

From Computer Science Wiki
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 5: Line 5:
A feature of objects is that an object's procedures can access and often modify the data fields of the object with which they are associated (objects have a notion of "this" or "self"). In OOP, computer programs are designed by making them out of objects that interact with one another.  There is significant diversity of OOP languages, but the most popular ones are class-based, meaning that objects are instances of classes, which typically also determine their type.<ref>https://en.wikipedia.org/wiki/Object-oriented_programming</ref>
A feature of objects is that an object's procedures can access and often modify the data fields of the object with which they are associated (objects have a notion of "this" or "self"). In OOP, computer programs are designed by making them out of objects that interact with one another.  There is significant diversity of OOP languages, but the most popular ones are class-based, meaning that objects are instances of classes, which typically also determine their type.<ref>https://en.wikipedia.org/wiki/Object-oriented_programming</ref>


== Why oop? ==
== A video to get you started ==
Please wait for this video to load. In case it doesn't, the direct URL is here: https://www.youtube.com/watch?v=POrU7vcKB_k
 
<html>
<iframe width="560" height="315" src="https://www.youtube.com/embed/POrU7vcKB_k" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</html>
 
== Why OOP? ==


Object-oriented programming is another way of organizing the same properties, methods (functions), and events you work with in procedural languages.
Object-oriented programming is another way of organizing the same properties, methods (functions), and events you work with in procedural languages.
Line 13: Line 20:
# oop introduces structure intended to avoid scaling and maintenance problems
# oop introduces structure intended to avoid scaling and maintenance problems
# oop is abstract.  Data and program structures are defined using a representation of meaning, while hiding the implementation itself. This allows for the use of human readable terminology to be used as part of the software.
# oop is abstract.  Data and program structures are defined using a representation of meaning, while hiding the implementation itself. This allows for the use of human readable terminology to be used as part of the software.
== UML ==
The Unified Modelling Language (UML) is a general-purpose, developmental, modelling language in the field of software engineering, that is intended to provide a standard way to visualize the design of a system.<ref>https://en.wikipedia.org/wiki/Unified_Modeling_Language</ref>
* [[UML]]


== Helpful links ==  
== Helpful links ==  
* [https://brilliant.org/wiki/classes-oop/ This is a good link with VERY BASICS of oop in Python]
* [https://brilliant.org/wiki/classes-oop/ This is a good link with VERY BASICS of oop in Python]


== Standards ==  
== Standards ==  
 
These standards come from the IB<ref>IB Diploma Programme Computer science guide (first examinations 2014). Cardiff, Wales, United Kingdom: International Baccalaureate Organization. January 2012.</ref>.
I don't teach to the standards for OOP, as we don't cover OOP as a computer science option. However, as a '''guide for knowing''', these standards are a decent-enough look. These standards come from the IB<ref>IB Diploma Programme Computer science guide (first examinations 2014). Cardiff, Wales, United Kingdom: International Baccalaureate Organization. January 2012.</ref>.





Latest revision as of 13:34, 29 June 2019

Object-Oriented Programming[1]

Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which may contain data, in the form of fields, often known as attributes; and code, in the form of procedures, often known as methods.

A feature of objects is that an object's procedures can access and often modify the data fields of the object with which they are associated (objects have a notion of "this" or "self"). In OOP, computer programs are designed by making them out of objects that interact with one another. There is significant diversity of OOP languages, but the most popular ones are class-based, meaning that objects are instances of classes, which typically also determine their type.[2]

A video to get you started[edit]

Please wait for this video to load. In case it doesn't, the direct URL is here: https://www.youtube.com/watch?v=POrU7vcKB_k

Why OOP?[edit]

Object-oriented programming is another way of organizing the same properties, methods (functions), and events you work with in procedural languages.

  1. oop organizes projects into consistent and manageable pieces
  2. procedural programs are linear and can become hard to manage when programs gets bigger (scale up)
  3. oop introduces structure intended to avoid scaling and maintenance problems
  4. oop is abstract. Data and program structures are defined using a representation of meaning, while hiding the implementation itself. This allows for the use of human readable terminology to be used as part of the software.

UML[edit]

The Unified Modelling Language (UML) is a general-purpose, developmental, modelling language in the field of software engineering, that is intended to provide a standard way to visualize the design of a system.[3]

Helpful links[edit]


Standards[edit]

These standards come from the IB[4].


  • Outline the general nature of an object
  • Distinguish between an object (definition, template or class) and instantiation
  • Construct unified modelling language (UML) diagrams to represent object designs
  • Interpret UML diagrams
  • Describe the process of decomposition into several related objects
  • Describe the relationships between objects for a given problem
  • Outline the need to reduce dependencies between objects in a given problem
  • Construct related objects for a given problem
  • Explain the need for different data types to represent data items
  • Describe how data items can be passed to and from actions as parameters
  • Define the term encapsulation
  • Define the term inheritance
  • Define the term polymorphism
  • Explain the advantages of encapsulation
  • Explain the advantages of inheritance
  • Explain the advantages of polymorphism
  • Describe the advantages of libraries of objects
  • Describe the disadvantages of OOP
  • Discuss the use of programming teams
  • Explain the advantages of modularity in program development
  • Define the terms: class, identifier, primitive, instance variable, parameter variable, local variable
  • Define the terms: method, accessor, mutator, constructor, signature, return value
  • Define the terms: private, protected, public, extends, static
  • Describe the uses of the primitive data types and the reference class string
  • Construct code to implement assessment statements
  • Construct code examples related to selection statements
  • Construct code examples related to repetition statements
  • Construct code examples related to static arrays
  • Discuss the features of modern programming languages that enable internationalization
  • Discuss the ethical and moral obligations of programmers

References[edit]

  1. http://www.flaticon.com/
  2. https://en.wikipedia.org/wiki/Object-oriented_programming
  3. https://en.wikipedia.org/wiki/Unified_Modeling_Language
  4. IB Diploma Programme Computer science guide (first examinations 2014). Cardiff, Wales, United Kingdom: International Baccalaureate Organization. January 2012.