Java File Handling, Encryption, and JavaFX GUI Concepts

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/123

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

124 Terms

1
New cards

Binary files

A file that contains data stored in raw binary format, which is more efficient for storage and processing than text but cannot be opened in a text editor.

2
New cards

Text files

A file containing human-readable data stored as formatted text rather than binary data.

3
New cards

File Pointer

A marker or position indicator in a file that tracks where the next read or write operation will occur

4
New cards

PrintWriter class

A Java class for writing formatted, human-readable text to a file, with methods identical to System.out like print(), println(), and printf().

5
New cards

FileOutputStream class

A low-level stream that connects to a file and allows writing raw bytes to it; overwrites the file by default if it already exists.

6
New cards

DataOutputStream class

A wrapper stream that provides methods to write Java primitive data types (int, double, boolean, String) as binary data to a file.

7
New cards

EOFException

An exception thrown when attempting to read past the end of a file using DataInputStream.

8
New cards

CIA Triad

The three fundamental security goals: Confidentiality, Integrity, and Availability.

9
New cards

Symmetric Cryptosystem

An encryption system where the same key is used for both encryption and decryption; also called single key or secret key cryptosystem.

10
New cards

DES

Data Encryption Standard; a symmetric cryptographic algorithm with 56-bit keys and 64-bit block size, accepted as a cryptographic standard in 1976.

11
New cards

AES

Advanced Encryption Standard; a symmetric block cipher selected by NIST in 2001 using block sizes of 128 bits and key sizes of 128, 192, or 256 bits.

12
New cards

Asymmetric Cryptosystem

An encryption system that uses a pair of keys (public and private) for encryption and decryption, where one key encrypts and the other decrypts.

13
New cards

Stream Ciphers

Encryption that converts one symbol of plaintext to a symbol of ciphertext at a time; advantage is speed of transformation.

14
New cards

Block Ciphers

Encryption that processes a group of plaintext symbols as one block; advantage is high diffusion.

15
New cards

Single key encryption

An encryption method where the same key is shared between parties for both encryption and decryption (same as Symmetric Cryptosystem).

16
New cards

Public Key Encryption

An asymmetric encryption system where each user has a public key (for encryption) and a private key (for decryption), proposed by Diffie and Hellman in 1976.

17
New cards

GUI

Graphical User Interface; a graphical window or windows that provide interaction with the user.

18
New cards

Event

An action or occurrence (like a button click, mouse movement, or key press) that happens in a JavaFX application.

19
New cards

Event listener

An object that waits for and responds to specific events by executing designated code

20
New cards

JavaFX

A Java framework for creating graphical user interfaces that uses a theater metaphor to describe GUI structure.

21
New cards

Application of JavaFX

The base class extended when creating a JavaFX application, providing lifecycle methods

22
New cards

Theater metaphor

The conceptual model used by JavaFX where a GUI is described like a theater production with a stage, scene, and actors.

23
New cards

stage

In JavaFX, represents the window; automatically created and passed as an argument to the start() method.

24
New cards

scene

In JavaFX, a collection of controls and other objects displayed on the stage; created by adding a layout container.

25
New cards

actors/controls

In JavaFX theater metaphor, the GUI components (like buttons and labels) that perform in the scene.

26
New cards

scene graph

The hierarchical structure of nodes in a JavaFX scene, with a root node and child nodes.

27
New cards

Application class

The foundation of all JavaFX applications; must be extended by JavaFX applications and contains an abstract start() method.

28
New cards

launch() method

A static method called in main() that launches a standalone JavaFX application.

29
New cards

start() method

The abstract method in Application class that serves as the main entry point for JavaFX applications; must be overridden.

30
New cards

Creating controls (Button, labels)

The process of instantiating visual components like Button and Label objects for user interaction

31
New cards

Layout containers

JavaFX components used to arrange the positions of controls on the screen, such as HBox, VBox, and GridPane.

32
New cards

Four steps for creating a scene

1) Create controls, 2) Create layout container and add controls, 3) Create scene with layout, 4) Set stage scene

33
New cards

Event class/object

An object containing information about an event that occurred, such as source and type

34
New cards

EventHandler interface

A functional interface with a handle() method that defines code to execute when an event occurs

35
New cards

Registering an Event Handler

The process of attaching an event handler to a control so it responds to specific events

36
New cards

Procedural programming

A programming approach where code is organized into functions that operate on data items that are separate from the procedures, with data often being global to the program.

37
New cards

Object-oriented programming

A programming approach centered on creating entities that combine data (attributes) and the procedures (methods) that manipulate that data into single units.

38
New cards

Abstraction

The process of hiding implementation details and showing only functionality to the user, like having a single "Make coffee" button instead of separate buttons for each individual step.

39
New cards

Encapsulation

The mechanism of binding data and procedures together within a single unit, where only that unit's methods can directly manipulate its attributes.

40
New cards

Inheritance (OOP pillar)

The process of acquiring properties from another entity, supporting hierarchical classification where a child gains general attributes from its parents.

41
New cards

Polymorphism (OOP pillar)

A concept meaning "many forms" where the same method name can have different implementations through overloading, overriding, or interfaces.

42
New cards

Application

A stand-alone program that runs on your computer, like a word processor or spreadsheet.

43
New cards

Applet

A small program designed to be transmitted over the Internet from a Web server and executed in a Web browser.

44
New cards

Compiler

A program that translates source code files into files containing instructions for execution.

45
New cards

Java Virtual Machine (JVM)

A program that emulates a microprocessor and executes instructions, acting as an interpreter with execution engine, memory, and network connection.

46
New cards

JDK (Java Development Kit)

Software that includes development tools like javac and java, along with JRE components, used for developing Java programs.

47
New cards

JRE (Java Runtime Environment)

Software that implements the JVM and includes libraries and other files needed to run Java programs.

48
New cards

Byte code file

Instructions produced by the Java compiler that end with .class file extension and cannot be directly executed by the CPU.

49
New cards

Primitive Data Types

Built-in data types in the Java language that are not derived from classes, including byte, short, int, long, float, double, boolean, and char.

50
New cards

Unicode

A character set that can consist of 65,536 individual characters where each character takes up 2 bytes in memory.

51
New cards

Single-line comment

Text in code that starts with // and is ignored by the compiler.

52
New cards

Block comment

Text in code enclosed between / and / that is ignored by the compiler.

53
New cards

Javadoc comment

A special comment enclosed between /* and / that can be built into HTML documentation using the javadoc program.

54
New cards

The String Class and Objects

A reference type representing sequences of characters; immutable objects containing text

55
New cards

Primitive vs. Reference Variables

Primitives hold actual values directly; reference variables store memory addresses pointing to objects

56
New cards

The Scanner Class

A Java class (java.util.Scanner) used to read input from various sources including keyboard input, providing methods like nextInt(), nextDouble(), and nextLine()

57
New cards

Class

A template used to define a new type of data, containing variables and methods as its members.

58
New cards

Object

An instance of a template that is obtained through a two-step process: declaring a variable of that type and acquiring an actual physical copy using the new operator.

59
New cards

new Operator

An operator that dynamically allocates memory for an instance during runtime and returns a reference (address) to that instance.

60
New cards

Passing Object References to a Method

Sending an object's memory address to a method, allowing the method to access and modify the original object

61
New cards

@param Tag in Documentation Comments

A Javadoc documentation element describing a method parameter's purpose and expected values

62
New cards

UML diagram

A standardized visual representation showing a class's name, fields, and methods in three compartments

63
New cards

Setter methods/Mutator methods

A method (typically named setVariableName) that modifies the value of a private field

64
New cards

Getter methods/Accessor methods

A method (typically named getVariableName) that returns the value of a private field

65
New cards

Stale data

Data that becomes outdated when dependent values change; avoided by calculating values dynamically rather than storing them

66
New cards

Shadowing

When a local variable has the same name as an instance field, hiding the field's value within that method's scope

67
New cards

Converting the UML Diagram to Code

The process of translating a UML class diagram into actual Java class structure with fields and methods

68
New cards

Default Constructor

An automatically provided parameterless constructor that initializes numeric fields to 0, booleans to false, and references to null

69
New cards

No-Arg constructor

A user-defined constructor without parameters, typically used for custom field initialization

70
New cards

Copy Constructor

A constructor that accepts an object of the same class type as a parameter to create a duplicate object

71
New cards

Method overloading

Using multiple methods with the same name but different parameter types or counts within a single class

72
New cards

Method Signature and Binding

The unique identifier consisting of a method's name and the data types of its parameters (excludes return type); binding is the process of matching a method call with the correct method implementation based on its signature

73
New cards

Packages

A container that organizes related classes and keeps the class namespace compartmentalized

74
New cards

static variables

A class-level field shared by all instances; only one copy exists in memory regardless of how many objects are created

75
New cards

static methods

A class-level method that can be called without creating an object instance; belongs to the class rather than any specific object

76
New cards

this keyword

A Java keyword that an object uses to refer to itself, commonly used to overcome shadowing when a parameter has the same name as an instance field

77
New cards

Garbage collection

An automatic process in the Java Virtual Machine that reclaims memory from objects that no longer have valid references pointing to them

78
New cards

Array declaration

The process of creating a reference to an array in two steps: first declaring the reference variable, then creating the array object with the new keyword and size declarator

79
New cards

Array initialization

Using an initialization list with values in curly braces to populate array elements when the array is created

80
New cards

Array length

A public final field that contains the number of elements in an array and can be accessed using the .length field

81
New cards

Enhanced for loop

A simplified loop structure for array processing that automatically goes through all elements without requiring index management, used for read-only access

82
New cards

Reassigning Array References

Assigning an array reference variable to point to a different array object, which may cause the original array to be marked for garbage collection

83
New cards

Copying arrays

The process of copying individual elements from one array to another using a loop, rather than just copying the reference

84
New cards

String arrays

An array of references to String objects where each element must be initialized separately if not using an initialization list

85
New cards

Object array

An array that contains references to objects rather than primitive values, where each element needs to be initialized with the new keyword

86
New cards

Multidimensional array

An array of arrays that can be thought of as having rows and columns, requiring two sets of brackets and two size declarators

87
New cards

Ragged array

A two-dimensional array where the rows are of different lengths, created by declaring specific number of rows but no columns initially

88
New cards

The ArrayList Class and its use

A resizable collection class that automatically expands when items are added and shrinks when items are removed, requiring import java.util.ArrayList

89
New cards

Object aggregation

Creating an instance of one class as a reference in another class, establishing a "has a" relationship between objects

90
New cards

Object aggregation in UML diagram

Shown by connecting two classes with a line that has an open diamond at one end, where the diamond is closest to the aggregate class

91
New cards

Method chaining

A programming technique where methods return a reference to the current object (this), allowing multiple method calls to be chained together in a single statement.

92
New cards

Mutable class

A class that allows its fields to be changed after the object is created, meaning the internal state can be modified.

93
New cards

Immutable class

A class that does not allow its fields to be changed once they are initialized with values; the internal state cannot be changed after object creation.

94
New cards

"has a" relationship

A relationship between objects created when one class contains an instance of another class as a member

95
New cards

"is a" relationship

The relationship between a superclass and an inherited class where a specialized object has all characteristics of the general object plus additional characteristics.

96
New cards

Inheritance (Superclass, Subclass)

An object-oriented programming mechanism where one class acquires the non-private fields and methods from another class, allowing code reuse and creating hierarchical relationships.

97
New cards

Superclass Constructor

The constructor of a parent class that initializes inherited members

98
New cards

Subclass Constructor

A constructor in a child class that must call a superclass constructor (explicitly or implicitly)

99
New cards

super keyword

A reference to an object's superclass, used to access superclass members or call superclass constructors.

100
New cards

Overriding Superclass Methods

A feature that allows a subclass to provide a specific implementation of a method that is already provided by one of its superclasses.