1/20
Flashcards covering the key concepts in Object-Oriented Programming and the Ruby programming language as discussed in the COMP 3520 lecture.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
Object-Oriented Programming (OOP)
A programming paradigm based on the concept of objects that can contain data and code.
Ruby
A pure object-oriented programming language created in 1993 by Yukihiro Matsumoto.
Scripting Languages
Languages used for writing scripts that automate tasks; examples include Perl, Python, and Smalltalk.
Dynamic Typing
A feature of Ruby where variables can hold values of different types without declaring a specific type.
Getters and Setters
Methods in Ruby for accessing and modifying instance variables.
Inheritance
A mechanism in OOP where a new class can inherit properties and methods from an existing class.
Polymorphism
The ability to present the same interface for different data types in OOP.
Syntax
The set of rules that defines the structure of statements in a programming language.
Containers in Ruby
General classes like arrays and hashes used to store collections of data.
Array
An ordered collection of values indexed by position, starting from 0.
Hash
A collection of key-value pairs, also known as associative arrays or dictionaries.
Blocks
A sequence of statements in Ruby that can take parameters and be executed within the context of a method.
Access Control
Mechanisms in OOP that restrict access to class members, used to enforce encapsulation.
Instance Variable
A variable that is accessible only within the instance of a class, usually prefixed with '@'.
Class Variable
A variable shared among instances of a class, prefixed with '@@'.
Global Variable
A variable accessible from anywhere in the program, prefixed with '$'.
Nil
A special object in Ruby representing 'nothing'; an instance of class NilClass.
Message Passing
The process of invoking methods and exchanging data between objects in OOP.
Dynamic Binding
The process of method resolution at runtime based on the object's actual class.
Accessor/Mutator Methods
Methods defined in a class to get and set the values of instance variables.
Ruby Community
The community of developers and users who utilize and contribute to the Ruby programming language.