Short Answer Reviews Flashcards

1
Q

What is Dependency Injection

A
  • Dependency injection is providing objects with their dependencies instead of having them construct them themselves.
  • Dependencies can be injected by any means, constructor injection or setter injection.
  • Dependency injection makes testing easier. It decouples the creation of an object and gives the ability to replace dependencies
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Front End Load Time Techniques

A
  • Minification: Combine Scripts and CSS to minimize bloated files. Load one single file
  • Caching: Reduce server calls, storing certain files in the cache.
  • CDN: Load from nearest server and compressed for delivery
  • Optimize Assets and Smart Comprehension: Scale assets based on user case
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Front-End Testing

A
  • Implement useability and accessibility Standards
  • Test tools that allow you to see all end users testing.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Code Structure and Efficiencies

A
  • Segment and Organize code for increase comprehension
  • Mark with Appropriate Docstrings and variable names
  • Indicate constraints and edge cases.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Inheritance

A

Inheritance is when a child’s class inherits from all properties and characteristics from the parent’s class, creating a class hierarchy.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Composition

A

Composition enables the creation of complex types by combining objects of other types, rather than inheriting from base or part. It contains instances of other classes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Procedural Programming

A

Operates on functions, where the entire program operates on a sequence of functions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Object-Oriented Programming

A

Focuses on real-world objects that encapsulates data and priorities the states and behaviors of objects

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Abstraction

A

Abstraction helps simplify the programming process and displays data that are relevant and hides complexity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Polymorphism

A

Polymorphism in Java is the ability of an object to take many forms. To put it simply, polymorphism in Java allows us to perform the same action in many different ways. Any Java object that can pass more than one IS-A test is polymorphic in Java. Polymorphism takes two forms:

  1. Runtime polymorphism
  2. Compile-time polymorphism
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Encapsulation

A

Encapsulation is a class that conceals data fields and methods that achieve functions, though they become accessible through access modifiers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Manipulators

A

Similar to helping functions, Manipulators modifies input/output stream using an objects’ insertion and extraction operators.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Constructor Rules

A
  • A constructor does not have return type
  • The name of the constructor is the same as the name of the class
  • A constructor cannot be abstract, final, static, and synchronized
  • You can use access specifiers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Abstract class / methods

A

An abstract class is a class that is declared abstract—it may or may not include abstract methods. Abstract classes cannot be instantiated, but they can be subclassed.

An abstract method is a method that is declared without an implementation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Static and Dynamic Binding

A

Association of method call to the method body is known as binding. There are two types of binding: Static Binding that happens at compile time and Dynamic Binding that happens at runtime.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Advantages of OOP

A
  • Maintains objects in an isolated capacity
  • Allows for future modifications without affecting other parts of the program
17
Q

Types of Constructors

A
  1. Default Constructor: does not have parameters
  2. Parameterized Constructor: takes in pararmeters
  3. Copy Constructor
  4. Static Constructor
  5. Private Constructor
18
Q

How do structure and class differ?

A

A structure is public by default and only used when grouping data, while the access type of a class is automatically private and has more uses, including data grouping and other methods. Classes can encapsulate and inherit data and need strict validation.

19
Q

Destructor

A

A destructor is a member function that is invoked automatically when the object goes out of scope or is explicitly destroyed by a call to delete .

20
Q

Different Levels of Testing

A
  1. Unit Testing
  2. Integration Testing
  3. System Testing
  4. Acceptance testing
21
Q

Functional vs Non-Functional Test

A

Functional: Performed before non-functional testing, based on customer requirements, describes what the product does

Non-Functional Testing: Performed after functional testing, based on customers expectations, describes how the product works

22
Q

Coverage

A

The parameter used in software testing to describe the extent to which the source code is tested is known as coverage.

  1. Statement coverage: it ensures that each line of source code has been executed and test
  2. Decision coverage: it assures that every decision in the source code has been executed and tested
  3. Path coverage: ensures that every possible route through a given part of the code is executed and tested