PRC2 Quizzs : Week 02 -> https://quizizz.com/join/quiz/63eabef623f7d6001ef3c2bf/start/?studentShare\=true Week 03 -> https://quizizz.com/join/quiz/63fd354818c111001dda84b0/start/?studentShare\=true Week 04 -> https://quizizz.com/join/quiz/64063f4ef7dcc5001d48c95b/start/?studentShare\=true Week 05 -> https://quizizz.com/join/quiz/640f81dd71ad52001d1dc3cf/start/?studentShare\=true Week 06 -> https://quizizz.com/join/quiz/6416d6f343b0fc001dc8c5b5/start/?studentShare\=true Week 07 -> https://quizizz.com/join/quiz/6421d14c2246c3001ee249ee/start/?studentShare\=true Week 08 -> https://quizizz.com/join/quiz/643e37ab4cc54c001e51d228/start/?studentShare\=true Week 09 -> https://quizizz.com/join/quiz/6446c7be303588001dd043a0/start/?studentShare\=true Week 10 -> https://quizizz.com/join/quiz/64593679679320001eec79f6/start/?studentShare\=true Week 12: https://quizizz.com/join/quiz/646c42a3a1eff5001dc4a867/start/?studentShare%5C=true Week 14: https://quizizz.com/join/quiz/647da947c7a4f8001d1bc54e/start/?studentShare%5C=true
AssertJ
Library for writing fluent and rich assertions in Java tests
Triple-A in the test context
Arrange - Act - Assert
Maven
Build automation tool used primarily for Java projects
DRY
Don’t Repeat Yourself
SUT
Subject Under Test
DOC
Dependent On Components
PIT-Test
Make changes in your implementation (by creating mutants) and check that these changes do not "SURVIVE" your tests.
Consumer
Accepts an argument and returns nothing
Predicate
Accepts an argument and returns a boolean
Function
Accepts and argument and returns a value
Supplier
Doesn’t accept an argument and return a value
Mock
Object that behave like an (alternate) implementation of a class or interface. It can also saves any method call that you do on it.
Stub
Fake class with preprogrammed return value that holds data that you provide and are presented to the SUT.
Spy
Wrapper around an actual implementation, that allows you to observe what goes in (method call+ parameters) and comes out of (return values) of the real object while it is used by the SUT.
Generics
Help keeping the language safer by giving the compiler more ways to reason about the code and reject it when it is bad.
Bounded wild card
Wild card construct with extends
or super
extends
defines the upper-bound
super
defines the lower-bound
P.E.C.S
Producer use extends
Consumer use super
Record
private, final field for each piece of data
getter for each field
public constructor with a corresponding argument for each field
equals method that returns true for objects of the same class when all fields match
hashCode method that returns the same value when all fields match
toString method that includes the name of the class and the name of each field and its corresponding value
Leaf class
Concrete class at the bottom of the type hierarchy, which is no longer generic on self
The keywords specific to the module declaration
exports
What the module provides. Use with one package per line.
module
starts the declaration
open
if before the module, opens the whole module for reflection. For instance for a module that defines all entities of a multi-module application.
opens
allows reflection of a package. Use with one per package per line.
provides
To indicate that a module implements some interface with one or more implementations.
requires
Indicates what the module itself needs or reads. One package per line.
transitive
Used with requires to indicate that there is a requirement that is then made readable to the users of this module as well.
to
Used to restrict either exports or opens to specific other module(s).
uses
To indicate that a module uses a service provided by another module.
with
Used with provides to indicate which implementation(s) are available for the provided interface implementation.
API
Application Programming Interface
In Java, it contains only public and protected members (methods and fields)
Black box
In testing, you cannot see the internals, but only those parts defined in the API
White box
In testing, you do want access to the (package) private parts of your business code.
Protected ( # )
is visible
In any sub-class, inside or outside package
In any class within the same package
Transaction
Sequence of operations that can either succeed completely or be undone without any residual effect. \n It either happens fully, or we can forget about it.
View in a database
Virtual table whose contents are defined by a query. Unless indexed, a view does not exist as a stored set of data values in a database.
It enables to program against an interface
System catalog
Group of tables and views that incorporate vital details regarding a database
JDBC API
Java Database Connectivity Application Programming Interface
Is implemented by the developers of database vendors or a database specific database driver
JavaFX Properties
Generic Observable interface that defines the methods common to all (writable) properties independent of their type
They are wrapper classes around a primitive type and will invalidate Observers on update.
JavaFX bindings
Observable that can observe other bindings
are immediately after creation 'invalid'
Cache the value of the (last) computation and serve that out until it is 'discarded' on an invalidate call.
State
Condition or situation in which an object exists
Transition
Change of state triggered by an event
Event
Action that triggers a transition from one state to another
Reflection
API that enables you to inspect types (classes, interfaces), fields, constructors, methods, packages, annotations etc. during runtime.
IOExceptions
Input/Output exception
Can come from reading/writing to a file or anything that has to do with data transfer from your software to an external medium.
Instant
Specific moment in time in UTC
The origin (called epoch) is set at midnight of the first of January 1970 Greenwich time (UTC).
Unchecked exceptions
Reflect programming logic errors that are not recoverable
example : NullPointerException
, IndexOutOfBoundsException
, RuntimeException
…
Bootstrap class loader
Loads classes from a couple of base modules and some internal JDK modules
Platform class loader
loads all classes of the Java platform not loaded by the bootstrap class loader
System (or Application) class loader
loads classes from the module path and the class path
Properties before loading the bytecode by the class loader
Variables are initialized before use
Method calls match the types of object references
Rules for accessing private data and method are not violated
Local variable accesses fall within runtime stack
The runtime stack does not overflow