• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/56

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

56 Cards in this Set

  • Front
  • Back

What is abstraction?

Abstraction is when knowledge of the inner workings of a project is not required to use it.

What it encapsulation?

Encapsulation is the ability to control access to the inner state of the object.

What is interchangeability?

Interchangeability is the ability to change the inner workings in an object without affecting its interface and code depending on it.

What are constructors?

These are special methods which are always invoked upon creation. This is the place where the internal state if the object can be initialised. They typically carry the same name as the class and can take parameters, which allow user-defined initialisation.

What are destructors?

Destructors are methods that are automatically invoked upon object destruction.

What are instance variables?

Variables where values may differ for different objects of a given class.

What are class variables?

Variables which are shared by all objects of a given class.

What are instance methods?

Methods invoked on an object, Typically depend on (read or write) the values of instance variables. The message is sent to the object.

What are class methods?

Methods that can be used without creating an object, cannot depend on instance variables. The message is sent to the class.

What happens when you create an object


instance?

First, you create an object reference/pointer, then you create an object instance and set the


reference value so it points to the address where


the object is located.

What happens when you assign an object reference to another reference?

Two references point to the same object instance - operation through either reference changes the state of the object.

What happens when you create a copy of an object?

Create a new object instance and copy the values of all instance variables.

What happens when you assign an object copy to another copy?

Two references point to different object instances - operation through one reference does not affect another object associated with the other reference.

What is a shallow copy?

A shallow copy only copies it's reference.

What is a deep copy?

A deep copy creates a new instance of the internal object and copies the state.

What is inheritance?

Inheritance is the creation of a subclass from a previously existing class. It allows us to re-use code by adding new methods, modifying or overriding existing methods i.e is-a relationship.

What are subclasses and superclasses?

Subclasses extend superclasses, methods are inherited by subclasses along with instance variables.

Why use inheritance?

Specialisation - subclass is a more specialised form of its parent.



Specification - subclass implements behaviour described, but not implemented by its parent.



Extension - subclass provides new behaviour and capabilities.



Limitation - subclass restricts behaviour of parent class.



Generalisation - subclass modifies behaviour of parent.

What is private view?

Not accessible outside the code that implements class.

What is public view?

Accessible by object user and the subclass implementation

What is protected view?

Variables and methods of the parent are accessible from code implementing subclass, but not by the object user.

What is overriding (inheritance)?

When a subclass can implement a method already defined/implemented by its superclass.

What is multiple inheritance?

A scenario where a subclass as multiple parents.

Why don't many languages support multiple inheritance?

Diamond of Death. If one subclass has multiple parents, it wont know which one to inherit.

What is composition?

Composition is where a class includes another class as its instance variable i.e. has-a relationship.

What are the benefits of inheritance?

Code reusability - no need to implement methods inherited from parent.



Interface consistency - easy to conform to generic requirement for an interface while implementing only few methods.



Code portability - low level routines (superclasses at the top of the tree) can be used in different projects.

What are the costs of inheritance?

Weakens encapsulation - need to understand how the superclass works in order to uses the subclass.



Execution speed - especially at initialisation time, when a series of constructors(initialisation routines) gets invoked.



Memory usage.

Inheritance vs Composition?

There should be little need of subclassing [of this class]. If you need to customise behaviour, is it often better to consider composition instead of subclassing.

What is mandatory inheritance?

When initialising, it is important to call the initialisation method of the superclass before doing anything to the instance variables

What is single inheritance?

A class can extend only one superclass - it can only have one parent.

What is a stack?

A stack is typically used for arguments and local variables within functions and variables.


The stack is a part of memory that is managed Last-In-First-Out.

What is a heap?

A heap is used for objects and large/persistent


data structures such as C arrays. The heap is a part of memory that is managed more generically.

What is automatic reference counting?

It is when the compiler keeps track of objects and figures out when to release them when they are no longer needed.

What is manual reference counting?

Is it when you explicitly free up(deallocate) any memory that you allocated to the heap.

What is garbage collection?

Garbage collection is when the run-time environment scans through your program and removes objects that aren't being used.

What is a weak reference?

A weak reference is when the object gets created, it has a retain count of 0.

What is a strong reference?

A strong reference is when the object gets created, it has a retain count of 1. It is the default behaviour for object pointers.

What is overloading (polymorphism)?

Is is when a method or function has the same name but different implementations for different numbers of parameters or parameter types.

What is overriding (polymorphism)?

Overriding refers to the ability to send the same message to instances of different classes. The methods operate in different ways but provide analogous behaviour. The internal behaviour may differ but the external interface is the same.

What is static typing?

A data type that is derived from variable definition. Static typing is more readable and allows compiler to do error-checking.

What is a polymorphic variable?

A variable that can hold values of different types.


e.g. id, super, self.

What is dynamic typing?

A data type that is derived from its value. Data typing is more flexible but you must do error-checking.

What is dynamic binding?

Run-time determination of which method to use is called dynamic binding.

What are generics?

Also referred to parametric polymorphism, templates provide ability to operate on generic data types.

What is coupling?

Coupling is how much different components of a system, such as objects in a program depend on each other.

What is cohesion?

Cohesion is how well components, such as instance variables of the class belong together.

What are the 7 steps of object-oriented design?

1. Requirements - first understand the problem in terms of requirements.



2. Use cases - next understand how the system might be used to perform a particular task.



3. Determine classes - often suggested by use cases.



4. CRC cards - how the classes interact.



5. Assigning responsibilities - to classes.



6. Sequence diagrams - dynamic interaction between classes.



7. Class diagrams - static interaction between classes.

Object oriented design patterns.


(try to remember at least 5)

Creating Objects:


1. A software factory provides the ability to make objects.


2. A singleton class insures only one instance of the class exist.



Object Structure:


1. A composite object is a combination of different objects.


2. An adapter allows objects with incompatible interfaces to interact.


3. A proxy provides an interface with a server.


4. A facade farms out work to multiple objects.



Object Behaviour:


1. The chain of responsibility selects appropriate object for a message.


2. A command encapsulates messages for queues etc.


3. A mediator manages communication between loosely coupled objects.


4. An observer patter allows loose communication from on-to-many.


5. An iterator allows enumeration of objects in a collection.

What is an event loop?

It waits for events from the OS and dispatches them to appropriate handlers.

What is XIB?

"Xcode/XML Interface Builder" - The xml file in your project that contains description of all visual components added in the interface builder.

What is NIB?

The compile code corresponding to the XIB file. A binary file that saves all the objects corresponding to the AppKits classes specified in the XIB file.

UI Design Patterns.


(try to remember atleast 5)

Safe Exploration - undo/redo, back/forward



Instant Gratification - predict the first thing users want to do.



Satisficing - satisfying + sufficing, "this is good enough. I dont want to spend more time learning to do it better."



Changes in Midstream - Don't lock users into interactions they have to finish.



Deferred Choices -“I don’t want to answer that now; just let me finish!”.



Incremental Construction - creative activities require incremental improvements and constant testing.



Habituation - Consistency across applications and within applications.



Spatial Memory - Keep buttons and tools in the same relative location withing your application.



Prospective Memory - Provide flexibility to allow users to implement their own reminder system.



Streamlined Repetition - Automate repetitive tasks.



Keyboard Only - Implement keyboard alternative to most application functionality.

UI Content Organisation Patterns.

Two-Panel Selector



Canvas + Palette



One-Window Drilldown



Alternative Views



Wizards



Extras on demand



Multi-Level Help

Navigation Patterns.

Clear Entry Points - few options on startup.



Global Navigation - Repeated motif/toolbar on each window.



Hub and Spoke - organises discrete task from central hub.



Pyramid - use back/next/up to organise documents.



Modal Panel - dialog box that must be resolved now.



Sequence Map - "you are here" indicator in a sequence.



Breadcrumbs - for hierarchies, show parent pages.



Annotated Scrollbar - provide information in scrollbar.



Colour-coded sections - use colour to identify locations.



Animated Transition - Show next location by animation.



Escape Hatch - cancel current action.

Gestalt Principles.

Proximity - Things close together are associated.



Similarity - Things of the same shape, size, colour or orientation are associated.



Continuity - Things which together form lines and curves are associated.



Closure - Simple closed forms like rectangles or white space are associated, even if actual rectangles aren't drawn.

UI Layout Design Patterns.

Visual Framework - consistency between windows/dialogs in your application.



Central Stage - Make the most important window large.



Title Sections - categories with obvious titles.



Card Stack - use tabs to organise information.



Closable Panels - tabs that that can dynamically size.



Movable Panels - let users move panels around the window.



Right/left alignment - align columns to provide vertical lines.



Diagonal Balance - balance from top left to bottom right.



Responsive Disclosure - show only what needs to be shown.



Responsive Enabling - allow only relevant responses.



Liquid Layout - change window contents during resize