Language Logic

esse quam videri
Revision as of 22:00, 8 September 2009 by Tyler.kendrick (talk | contribs) (Collections: - Populated empty descriptions.)
Jump to: navigation, search

Programming Club

Objects

Objects in any programming language are sections of memory in a computer that store data.

Variables

Variables are objects that store data, and are given names, values and sometimes object types. The purpose of variables, are to store data for later use in a program. To do this, the computer's processor takes up a part of its memory and remembers the data you put into the variable.

Examples
Language Type Name Value
C const char* name = "value";
JAVA final String Name = "Value";
C# const string VariableName = "SomeValue";

Pointers

Pointers are created to "point" to parts of the computer's memory and keep track of an object in memory. When a variable is created in one part of a program, and used in a different part, it is common for a pointer to be used in its place; This way, a new variable doesn't have to be created, and less memory is used.

Referencing

Pointers are references to an object's memory location - which store an object's data. Pointers can change the value of the object it is pointing to, and can keep an updated value from the object.

De-referencing

When an object is de-referenced, the original object still retains its data, but the pointer becomes empty, and retains a null(empty) value.

Collections

Collections are groups of objects that share an object type, and can be managed as a group. Anytime you are using multiple objects for the same purpose, it is usually preferred to use a collection.

Arrays

Arrays are a specific type of collection with a defined amount of items - meaning that it can only hold a maximum number of items.

Single-Dimensional Arrays

Single-Dimensional Arrays are among the most common collections in a program. These type of arrays simply keep an ordered, numbered collection of each object in the array - and are limited by a maximum defined number of objects they can hold.

Multi-Dimensional Arrays

Multi-Dimensional Arrays are less common, and more complex than their single-dimensional counter-parts. These arrays contain a matrix of objects and are also limited by a maximum defined number of objects they can hold.

Jagged/Nested Arrays

Jagged Arrays (a.k.a. Nested Arrays) are exponentially more complex than single-dimensional arrays. These arrays contain other arrays that contain data, instead of the data itself. These arrays are also limited by a maximum defined number of arrays they can hold.

Lists

Lists are a specific type of collection with an undefined amount of items - meaning that it can hold as many items as the computer's memory allows. Lists are dynamic, and the size can be changed dynamically.

LinkedLists

LinkedLists are complex structures that contain pointers to an object of the same structure type. The list is created by pointing to a new object of the same type, and creating a list where the pointers create a sequence of objects that they can then iterate through.

Doubly-Linked Lists

Doubly-Linked Lists contain two pointers in a structure. These pointers then point to a new object of the same type, just like linked-lists; However, one pointer will point to the next object in the list, and the other will point to the previous item in the list. This way, the list can be iterated through in both directions.

Circular-Linked Lists

Circular-Linked Lists are most like normal Linked Lists in that they iterate in a single direction, through the use of a pointer to a structure of the same type contained within the structure. The difference, is that the structure contains a pointer to the beginning of the list, once it reaches the end. This way, it will repeat from the beginning of the list if needed.

Custom Objects

Unions

Functions/Methods

Classes/Modules

Structs/Interfaces

Namespaces

Object Relationships

Inheritance (Is a...)

Single Inheritance

Multiple Inheritance

Virtual Inheritance

Conditional Inheritance

Containment (Has a...)

Association(Uses a...)

Modifiers

Object Types

Byte

Integral

Boolean
Floating-Point
Decimal

Generic

Anonymous

Type Modifiers

Virtual

Immutable/Mutable

Storage Classes

Internal/External

Static

Linkage Specifications

Access Modifiers

File

Method/Function

Class

Namespace

Global

Loops

Recursion

Repetition

Iteration

Programming Paradigms