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;
49 Cards in this Set
- Front
- Back
Category: Interface Patterns |
Adapter Facade Composite Bridge |
|
Category: Responsibility Patterns |
Observer Singleton Chain of Responsibility Flyweight Mediator |
|
Category: Construction Patterns |
Factory Builder Proxy Abstract Factory Prototype State(?) |
|
Adapter Pattern |
Combines ability of two separate interfaces. A bridge between 2 incompitable interfaces. |
|
Facade Pattern |
Used to hide complexity of the system. Provides a simple interface to make the subsystem easy to use.
"Simplifier" |
|
Composite Pattern |
For treating a group of objects in a similar way to a single object. Creates a class that contains groups of its own (Files & Folders for examples) |
|
Bridge Pattern |
Decouple an abstraction from its implementation so the two can vary independently.
Example: Replacing existing version, but keeping older version running. Client code won't have to change, but has to say which version to use. |
|
Observer Pattern |
Used when there is one-to-many relationship between object, such as if one object is modified, its dependent objects are to be notified automatically.
Push and pull-notifications for example. |
|
Singleton Pattern |
Involves a single class which is responsible to create an object while making sure that only a single object gets created. |
|
Chain of Responsibility (CoR) Pattern |
Normally each receiver contains a reference to another. If one object cannot handle the request, it passes the request to the next receiver. |
|
Flyweight Pattern |
Decreases the amount of memory used and processing requried by saving intrinsic data in a common object.
For example, saving recurring information separately. |
|
Mediator Pattern |
Reduces communication complexity between multiple objects or classes by handling all communication between them. |
|
Factory Pattern |
Creates the object without exposing the creation logic to the client and refer to newly created objects using a common episode. |
|
Category: Structural Patterns |
Decorator |
|
Category: Operation Patterns |
Strategy |
|
Category: Extension Patterns |
Iterator Template(?) |
|
Builder Pattern |
Allows the creation of a complex object by providing the information on only its type and content, keeping the details of the object creation transparent to the client. This allows the same construction process to produce different representations of the object. |
|
Proxy Pattern |
The intent of the this pattern is to provide a surrogate or placeholder for another object to control access to it. |
|
Abstract Factory Pattern |
This pattern is a class that provides an interface to produce a family of objects. In the context, there exist suites or families of related, dependent classes. |
|
Prototype Pattern |
This pattern is a construction Pattern which addresses the same problem as the Factory Method and Abstract Factory patterns but offers a different, more flexible way of achieving the same result. |
|
State Pattern |
This pattern is useful in designing an efficient structure for a class, a typical instance of which can exist in many different capacities and exhibit different behavior depending on the state it is in. In other words, in the case of an object of such a class, some or all of its behavior is completely influenced by its current form. |
|
Decorator Pattern |
This is a structural Pattern that extends the functionality of an object in a manner that is transparent to its clients without using inheritance. |
|
Strategy Pattern |
Thispattern is categorized as a Operations pattern. The pattern allows each of a family of related algorithms to be encapsulated into a set of different subclasses of a common superclass. |
|
Command Pattern |
This is an Operation Pattern. It allows a request to be encapsulated into an object giving control over request queuing, sequencing and undoing. |
|
Iterator Pattern |
This is an extension Pattern. The pattern allows a client to access the contents of an aggregate object (collection of objects) in some sequential manner, without having any knowledge about the internal representation of its contents. |
|
Template Pattern |
This pattern is used in situations when there is an algorithm, some steps of which could be implemented in multiple different ways. |
|
Visitor Pattern |
This is an extension Pattern. The pattern allows an operation to be defined across a collection of different objects without changing the classes of objects on which it operates. |
|
Software testing |
Execution of part of a system or systems to detect failures and improve quality. Ensures that software requirements are met. Involves code inspection and document review. |
|
Test Scenario |
Executing a number of test cases in a sequence such that outputs of test case(s) are used as input of other test case(s). |
|
1: Testing 2: Debugging |
Comparison: 1: Involves detecting possible failures 2: Involves localizing defects and correcting them |
|
Test Suite |
A complete set of test cases that can be run at any time. Requires a lot of programming effort but improves software quality by reducing defects in the software and makes it more maintainable and refactorable. |
|
JUnit |
The set of classes that form a framework that enables you to write and run tests for each method. |
|
Test Naming Convention |
Test classes should be named with the same name as the class being tested as suffix. Should have the word "Should", name should explain what the test does. |
|
Annotation: @Test |
Annotation: Identifies a test method |
|
Annotation: @Test (expected = Exception.class) |
Annotation:Identifies a test method that should throw a named exception. |
|
Annotation:@Test(timeout=100) |
Annotation:Identifies a test method that should execute within 100 milliseconds. |
|
Annotations: @Before, @After |
Two annotations: Identifies a method that should be executed before or after each test to prepare or clean up test environment |
|
Annotations: @BeforeClass, @AfterClass |
Two annotations: Identifies a static method that is executed once, before start or after the end of all tests |
|
Annotation: @Ignore |
Identifies a test method that should be ignored. |
|
Assert class |
Methods of this class in Junit test framework can be used to check if the expected output is created by the tested method. Most method take three arguments: error message, expected output, and actual output. Methods throws an <This word>Exception if the actual output is not as expected. |
|
Statement: fail(String) |
Fails atest method. String argument is optional. |
|
Statement: assertTrue([message], boolean condition) |
Tests if a boolean condition in a test method is true. |
|
Statement: assertFalse([message], boolean condition) |
Tests if a boolean condition in a test method is false. |
|
Statement: assertEquals([String message], expected, actual) Overloaded: Statement: assertEquals([String message], expected, actual, tolerance) |
Tests if two values in a test method are equal. Has overloading method for number of decimals to compare. |
|
Statement: assertNull([message], object) |
Tests if object in a test method is null. |
|
Statement: assertNotNull([message], object) |
Tests if object in a test method is not null. |
|
Statement: assertSame([String], expected, actual) |
Tests if both references in a test method point to the same object. |
|
Statement:assertNotSame([String], expected, actual) |
Test if references in a test method point to different objects. |
|
* Be public * Return void * Have no arguments |
A test method needs to do/be these three things to run as a test case. |