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

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;

67 Cards in this Set

  • Front
  • Back

Describe a Petri Net.

Used to model concurrent activities and their interaction.


Circles (places) represent activities or conditions.


Bars represents transitions.


Arcs connect a transition with its input places and its output places.


The places are populated with tokens, which act as enabling conditions for the transitions.

Verification vs Validation?

Verification: Are we building the product right?


(the software should conform to its specification)




Validation: Are we building the right product? (The software should do what the users really require)

What is the purpose of verification and validation?

First, discovery of defects in a system, second, an assessment of whether or not the system will be usable in an operational situation.

What are the two types of verification?

static: inspections, reviews, walkthroughs, and the like.




dynamic: running an operational software system, observing its behavior, and focusing on discrepancies between observed and expected behavior.

What are 3 inspection pre-conditions?

1. A precise specification must be available.




2. Team members must be familiar with the organization standards.




3. Management must accept that inspection will increase costs early in the software process.

Name 2 inspection checks and describe them.

Input/output faults:Are all output variables assigned a value before they are output? (trying to output null).




Control faults: Are compound statements correctly bracketed?

What are the 2 different types of testing?

Defect testing (successful if it finds defects) and statistical testing (relative frequency of user inputs, used for reliability estimation).

What is the difference between defect testing and debugging?

Defect testing is used to find defects in the software, while debugging is used to find and correct errors.

What is white box testing?

Execute all (reachable) statements, execute all branches of logical decisions, including boundaries of loops, execute all data paths in order to find which behaviors are acceptable and incorrect.

What are the tests for simple loops?

Skip loop entirely,m passes through loop, where m= n-1, n, n+1 passes through loop (where n is, the “regular” or “expected” number of passes) or cover branching paths within loop.

What is black box testing?

Testing as though a customer was using the product, with no knowledge of code or using purely the specification document.

What is equivalence partitioning (response)?

Assume similar inputs will evoke similar responses, in the sense of detecting same flaw.




Range equivalence classes: Arbitrary value below range / within range / above range.




Set equivalence classes: Member of set / not a member of set.

What are the 2 integration approaches to testing and their side effects?

“Big Bang” Approach: unit test all modules, then link everything together and run (difficult to track down errors because bug could be anywhere).




Incremental Approaches: put a few units together at a time, ideally add only one unit at a time, test successively (limits scope of errors).

What is regression testing?

Tests that are rerun (previously successful cases) that cover as much of the system functionality as possible.

What is mutation testing?

Where you run a black box test, change the code semantics (> or <, constants, +-) to see if the result changes.

Give 2 orthogonal defect types and describe them. An orthogonal defect classification is trying to determine the type of defect.

Documentation Fault that affects publications and maintenance notes.


Algorithm Fault involving efficiency or correctness of algorithm or data structure but not design.

What can happen to a class if too many faults are discovered during testing?

It can be discarded, redesigned, or recoded.

What are some patterns of faults?

A minority of modules contain a majority of faults. Code metrics, like size and complexity are not good predictors of fault proneness –at most, size have been shown to explain 40% of the variation.

What is test driven development (TDD)?

Where you code tests before the actual code, with the goal of the code to pass the tests.

What happens in the TDD testing cycle?

Write tests, develop enough code to make those tests compile, and pass the test. This process is repeated until everyone is happy with the production code.

List some principles of TDD.

Isolation: look at the module (class) apart from everything else.




Avoid writing any decision or branching statements unless you have a test for it.




Get rid of unnecessary/outdated tests.

How are specific sections (GUI, embedded systems, concurrency and database transactions) tested?

GUI: separate the functionality.


ES: hardware simulations.




Concurrency: exhaustive testing (getting the system to go through as many states as possible)


DT:create an interface that represents the database

What is an acceptance test?

Acceptance tests correspond to user stories, which can be a problem because they are generally written by non-technical people.


The developer is responsible for automating their execution and unit testing, while the customer is responsible for writing and executing them.

Why does code decay?

New features are added, often hastily, data structures become more complex, and code becomes more difficult to understand.

What is refactoring and why do we do it?

Changing the internal structure of software to improve readability, modifiability and reuse without changing its observable behavior. Refactoring is the way to keep the clarity and simplicity of the code, because things aren't done the best the first time.

What is a pro and con of refactoring?

Pro:Promotes a deeper understanding of the code –thus helps in finding existing bugs and anticipating potential bugs.




Con: Refactoring can break code that previously worked.

Give 2 examples of things that should be refactored.

Large Class: tries to do too much, which reduces cohesion




Speculative Generality, as in “we need the ability to do this kind of thing someday”.

What is the extract method when refactoring?

Create a new method for the functionality, transfer the relevant code, common variables between the old and new become parameters in the new and unique variables to the new are moved to the new. Somehow send any information changed to the original and replace the old code with the new method call.

What is the move method when refactoring?

If a method you are using is interacting with another object more than the one it is declared in, or classes are collaborating too much than that is a sign that you should move your method.




You want to declare the method in the new class (after checking for repeating names), copy the code to it, give it a reference to its previous class if needed and handle any exceptions. Then compile the target class.

What does replacing a temporary variable with a method accomplish?

This refactoring creates a method that returns the computation previously held by the Temp so that it can be called from ANY method instead of being local

What is a Design Pattern?

A pattern is the outline (skeleton) of a reusable solution to a general problem encountered in a particular context.

What are the different pattern levels?

The level increases as follows: idioms (ways of doing things in particular programming languages), data structures and algorithms, design patterns (interacting classes), architecture patterns (entire systems and sub-systems).

What is a façade pattern?

It allows you to create a closed architecture when dealing with a complex packages. Façade provides a unified interface to a set of interfaces to entities in a subsystem. A façade is used to simplify access to packages in the system.

What is open architecture?

Where everything is visible, and any client can invoke any operation at will.

What is a bridge pattern?

To decouple an abstraction from its implementation so that the two can vary independently.To publish interface in one inheritance hierarchy, and bury implementation in an inheritance hierarchy of its own.

How and why do you implement the bridge pattern?

You separate the the logic hierarchy behind the interface and the implementation hierarchy of the interfaces. You do this when you want to share an implementation among multiple objects.

What is the adapter pattern and what are the different types of adapters?

Adapter pattern converts the interface of a class into another interface that the clients expects. You want to create a reusable class that cooperates with unrelated or unforeseen classes (class adapter). An object adapter (used when there are too many subclasses to adapt every interface) acts as a link between classes instead of converging all the parent classes.

What is the difference between an adapter and a bridge?

If multiple classes do similar jobs, but do not have a unified interface an adapter acts as the uniform interface between the two. Bridge on the other hand is used to separate interface from implementation.

What is a proxy?

It is a lightweight implementation that can access methods from the heavyweight.

What are the 4 different types of proxies?

A virtual proxy creates expensive objects on demand (e.g., ImageProxy).


A remote proxy provides a local representative for an object in a different address space.


Protection proxy controls access to the original object(useful when objects should have different access rights.


A smart reference is a replacement for a bare pointer that performs additional actions when an object is accessed (loading a persistent object into memory when it's first referenced)

What are the 2 approaches on reuse, and what is their goal?

Composition (also called Black-box Reuse), where new functionality is obtained by gathering.




Inheritance (also called White-box Reuse), where new functionality is obtained by inheritance (implementation, interface and delegation).




These are used to use knowledge from previous experience to solve a problem.

Describe implementation inheritance.

If a class does almost the same thing as another class, just make it a subclass of the other class and give it the additional features needed to make it work.

What is the delegation pattern?

You are designing a method in a class, realise that another class has a method which provides the required service, let that class do the work for the class that has the different functionality.

What are the different components of a pattern?

Context: environment of the pattern?


Problem: what needs to be solved?


Forces: issues to consider when solving the problem.


Solution: how you would solve the problem in this context.

What are the advantages and disadvantages of delegation and inheritance?

Delegation: flexible (any object can be replaced at run time by an object of the same time), inefficient (takes more time to execute).



Inheritance: easy to implement new functionality, any change in the parent class forces the child class to change (both must be compiled again).

What is the mediator pattern?

Classes interact only with a mediator class rather than with each other, centralised control of an interaction that works both ways.

What are the 2 different shared data-styles?

Blackboard style: the shared data-stores activate the accessors when the stores change.




Repository style: the shared data-stores are passive and manipulated by the accessors.

What are the pros and cons of shared-data styles?

Pros:they are easy to change, replace, remove, or add to.Placing all data in the shared-data store makes it easier to secure and control.




Con:may degrade performance, if the shared-data store fails, the entire program is crippled.

Describe the strategy pattern.

Program for an interface, not implementation, encapsulate the concepts that are different. Design your interface so that you select the best strategy for the context.

What are difficulties and risks with patterns?

Not the universal cure for all problems in software design, use of patterns leads to inefficient solutions.

What should be prioritised when developing software?

Understandability, correctness, and robustness, should be designed in right from the start, otherwise it’s difficult to make any progress with the others.

List 2 ways you address a correctness defect.

Static analysis: low cost, high efficiency tools to detect certain kinds of errors.




Testing: time-honoured (but also time-consuming) approach to find certain kinds of defects.

What is design by contract?

A discipline for defining precise check-able interface specifications for software components based on ADTs. Has PRE-CONDITIONS: both input sequences must be sorted already, and the ensure clause lists the obligation of the supplier (POST-CONDITION).

What is an invariant?

A value that does not change before and after invoking a routine.

What is an iContract?

iContract has constraints along inheritance, interface implementation, relationships between classes, and interfaces

What are some desirable properties user-interface?

Commands must function as specified, data displayed must reflect the actual state in the database, and ensure user privacy and prevent unwanted access.

What goals should a user-interface have?

It should be standardised, integrated, consistent (compatible across platforms, non-computer based systems, and use common action sequences) and portable.

List 3 human factors regarding user-interfaces.

Time to learn, speed of execution, and rate of errors.

What are the levels according to to Foley and van Dam?

Conceptual level: user's mental model.


Semantic level: meanings conveyed by the user’s input and computer's output.


Syntactic level: how the semantic units form complete sentences and instructions.


Lexical level: device dependencies and mechanisms by which a user specifies the syntax.

What is usability?

Usability is a measure of the effectiveness (can users achieve their goals), efficiency (how much effort did it take) and satisfaction (was the act of using it pleasant or unpleasant).

What are affordance and constraints?

Affordance: Properties of an object that determine how it can be used.




Constraints: Properties of an object that limit the way it can be used.

What is [natural] mapping?

Mapping: relationship between controls and the way they operate.




Natural mapping takes advantage of physical analogies and cultural standards

What are conceptual models?

They are systems are understood by people, based on affordances, constraints, mappings, visibility and feedback.

What are the gulf of execution and evaluation?

Gulf of execution: distance between user’s goals and the means of achieving them through the system.




Gulf of evaluation: the amount of effort required to determine the system state.

What are the 4 points where user failures can occur?

Users can form an inadequate goal, cannot find the correct interface object (incomprehensible label/icon). They may not know how to do a specific action, or they may get misleading feedback.

Four principles of good design?

State of the system and action alternatives should be clearly visible. System has a consistent image, good mappings revealing the relationships between stages and users get good feedback.

List 2 rules of interface design.

Strive for consistency and enable frequent users to use shortcuts.