• 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/21

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;

21 Cards in this Set

  • Front
  • Back

Features of an array?

Original data structure based on index.


Uses less memory than vectors as no need for extra room than necessary.


Fixed size length.


Usage - frequent element access.


Access is constant time operation no matter location.


Contiguous memory location.(consecutive)


cannot make a copy automatically.

Features of a vector

Sequential container to store elements


Occupies more memory than array as variable


Dynamic in size can change easily.


Usage: frequent insertion and deletion.


Contiguous but more costly as requires copying of data if overflowing the memory block.


First and last position is constant but middle data is linear based on size of vector.


Automatic memory management

Allocates exactly the memory needed to store variables declared


Memory use is predetermined from code.


Memory use cannot be dependent on run time behaviour


Uses stack memory-limited in size


Best for smaller items used within a function m

Dynamic memory management

Programmer has to explicitly manage allocation and deallocation.


Can adapt to runtime event


Uses heap memory. Much larger


Good if unsure how much memory is needed like reading the contents of a file.


Best for larger items that need to persist overtime

Waterfall

Softwares development process divided into different phases. Sequential in nature.


Structured and rigid


Can't change requirements when development has started


Each phase is completed once


Testing phase after building


Internal process doesn't require customer participation


Best for projects that have clearly defined requirement's unlikely to change


Agile

Segregates project development lifecycle into sprints


Known for flexibility


Allows for changing of project development requirements after initial planning


Each phase can be visited multiple times


Testing is performed concurrently with programming


Focuses on customer satisfaction and involves customer participation.


Best for software that requires frequent overhauls or evolution


Waterfall model answer

Sequential design process, 8 stages(conception, initiation. Analysis,design, construction, testing, implementation and maintenance).


Once one is done, move to next. No going back unless starting from beginning. no room for changes or errors so extensively planned and followed.

Agile model answer

Came as solution to dis of waterfall. Incremental design. Developers start simplistic project design and start small modules. Done in sprints. End of sprints priorities evaluated and tests are run. Sprints allow bugs to be discovered and customer feedback incorporated before next sprint.

Define polymorphism

Polymorphism means that some code or operations or objects behave differently in different contexts

Define ad-hoc polymorphism overloading

Functions with the same name act differently, + operator adds integers and concatenates strings in cpp

Define subtype polymorphism (runtime)

Ability to use derived classes through base class pointers and references. Subtyping via virtual methods in cpp

Define parametric polymorphism (compile time)

Executed the same code for any type. Templates in cpp

Coercion polymorphism casting implicit

An object of primitive is cast into another object type or primitive type. Int promoted to float or float demoted to int.

Define inheritance

The capability for one class to derive properties and characteristics from another class.

Public inheritance

Child inherits public members as public and protected members as protected

What is a pure virtual function

A pure virtual function is a virtual function whose declaration ends in =0. Makes the class defined as abstract.

Black box testing

Tester doesn't know internal structure of code of the program. Nothing is known.


Mostly done by software testers


No knowledge of implementation needed


Functional test of software


External testing


Behaviour testing of software


Least time consuming

White box testing

Tester has knowledge about internal structure and code of software



Mostly done by software developers


Knowledge of implementation is required


Internal software testing


You need programming experience


Most time consuming

Private inheritance

Child inherits public and protected members as private

Protected inheritance

Child inherits public and protected members as protected members

Why is cpp good for low level

Zero overhead abstractions. Code executes directly on machine rather than a virtual machine like some languages.


Pointers allow you to access hardware direct without any additional layers.


Memory management. Allows for dynamic memory management so you can be as stringent with memory as needed.