CSE 1325 Exam 1

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Namespace

A named scope

Instance

An encapsulated bundle of data and code

filled diamond

Composition

Data Validation

Ensuring that a program operates on clean, correct and useful data

Base Class

The class from which members are inherited

Attribute

A class member variable

Setter

A method that changes the value of a private variable

unfilled diamond

Aggregation

line

Association (interact)

Copyright†

Exclusive right to print, publish, perform, execute, or record a creative work or its derivatives, and to authorize others to do the same

unfilled arrow

Inheritance

Derived Class

The class inheriting members

Version Control†

The task of keeping a system consisting of many versions well organized

pass by const reference

const Foo& foo, compiler will prohibit changes to the parameter. Best for large parameters that need not change

Trade Secret

typically restricts use to the copyright holder

header skeleton

#ifndef __NAME_H #define __NAME_H #endif

Protective

(GPL 2, 3, Lesser GPL, EPL) permits use, copying, distribution, and derivatives with share-alike rules (Linux, Gimp). GPL 3 also includes important patent clauses.

permissive

(MIT, BSD, Apache) permits use, copying, distribution, and (usually with attribution) derivatives, even proprietary derivatives (BSD Unix, Apache)

Variable

A block of memory associated with a symbolic name that contains an object instance or a primitive data value

Friend

A class or a function (NOT a method!) that is granted access to its friend class' private members

Enumerated type

A data type consisting of a fixed set of constant values called enumerators

Primitive type

A data type that can typically be handled directly by the underlying hardware

Definition

A declaration that also fully specifies the entity declared

Multiple Inheritance

A derived class inheriting class members from two or more base classes

Override

A derived class replacing its base class' implementation of a method

Method

A function that manipulates data in a class

Getter

A method that returns the value of a private variable

Algorithm

A procedure for solving a specific problem, expressed in terms of an ordered set of actions to execute

Operator

A short string representing a mathematical, logical, or machine control action

Destructor

A special class member that cleans up when an object is deleted

Constructor

A special class member that creates and initializes an object from the class

Declaration

A statement that introduces a name with an associated type into a scope

object-oriented programming

A style of programming focused on the use of classes and class hierarchies

Class

A template encapsulating data and code that manipulates it

Shadowing†

A variable declared in a narrower scope than that of a variable of the same name declared in a broader scope

Validation Rules

Algorithmically enforceable constraints on the correctness, meaningfulness, and security of input data

Assertion†

An expression that, if false, indicates a program error (in C++, often via the assert keyword)

Object

An instance of a class containing a set of encapsulated data and associated methods

Exception

An object created to represent an error or other unusual occurrence and then propagated via special mechanisms until caught by special handling code

line with symbols

Association with multiplicity and roles

Encapsulation

Bundling Data and code into a restricted container

Invariant†

Code for which specified assertions are guaranteed to be true (often, a class in which attributes cannot change after instantiation)

Public Domain

Creative work that's not copyrighted and therefore free for you to use whenever you want.

dotted arrow

Dependency

normal arrow

Directional Association

Intellectual Property†

Exclusive right to authors and inventors to their writing and discoveries

Patent†

Exclusive right to make, use, or sell an invention, and authorize others to do the same

pass by reference

Foo& foo, changes will be reflected in the calling program. Use only when calling program values must change

Rule of three

If you need to define a copy constructor, copy assignment operator, OR destructor for a class, you almost certainly need to define all three.

Operator Overloading

Providing a user-defined meaning to a pre-defined operator (e.g., +, ==, <<) for a user-defined type (e.g., a class)

Inheritance

Reuse and extension of fields and method implementations from another class

Abstraction

Specifying a general interface while hiding implementation details

Trademark†

Symbol or name established by use as representing a company or product

Unified Modeling Language (UML)†

The standard visual modeling language used to describe, specify, design, and document the structure and behavior of object-oriented systems

Struct

all members public by default, identical to class except default visibility, traditionally has no methods but they are permitted exactly like a class. But avoid struct in CSE1325. Use class instead.

Enum class

all members public, NO methods, but type checking is enforced. NOT interchangeable

Enum

all members public, NO methods, just a list of int constants.

Scope resolution operator

define a function outside a class or when we want to use a global variable but also has a local variable with the same name.

Rule of three (why)

if one of these had to be defined by the programmer, it means that the compiler-generated version does not fit the needs of the class in one case and it will probably not fit in the other cases either

pass by value

int x, changes will not be reflected in the calling program

Virtual inheritance

is a C++ technique that ensures only one copy of a base class's member variables are inherited by grandchild derived classes. if two classes B and C inherit from a class A, and a class D inherits from both B and C, then D will contain two copies of A's member variables

The Diamond Problem

may be ambiguous as to which parent class a particular feature is inherited from if more than one parent class implements said feature

Proprietary

permits (often restricted) use (Windows, Photoshop)

Shareware

permits (sometimes limited) use, copying, and (usually) distribution (Irfanview, early WinZip releases)

-

private

#

protected

+

public

what happens if an exception is not caught

the program is terminated


Set pelajaran terkait

Radiohead's 'Idioteque' and Environmental Themes

View Set

CSC 202 Final (Made with Parkinson's Quiz questions)

View Set

skabidi toilet only in ohio kai cenat baby gronk w grimace shake rizz skibidi ohio rizzler gyattt ohio rizzler baby gronk skibidi toilet ohio rizz

View Set

PAD 4144 Intro to Non Profit FINAL

View Set

CIS 330 Chapter 9, 10, 11 (Final Exam)

View Set