Advanced Programming: Functional Programming, Streams, and Object-Oriented Principles

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
full-widthPodcast
1
Card Sorting

1/24

flashcard set

Earn XP

Description and Tags

Practice fill-in-the-blank flashcards reviewing core topics across Java Streams, Lambda Expressions, Object-Oriented Principles, and Functional Programming paradigms.

Last updated 5:21 PM on 10/17/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

25 Terms

1
New cards

In Java, Stream was introduced in __________ to simplify the processing of collections and data using a functional approach.

Java 8

2
New cards

A Java Stream is not a data structure; operations that transform a stream into another stream and execute lazily are called __________ operations.

intermediate

3
New cards
<p>In the Java Stream processing pipeline shown in the diagram, chained intermediate operations process input data until a(n) __________ triggers execution to produce the final output.</p>

In the Java Stream processing pipeline shown in the diagram, chained intermediate operations process input data until a(n) __________ triggers execution to produce the final output.

Terminal Operation

4
New cards

The intermediate stream operation __________ is used to flatten a stream of collections into a single stream of elements.

flatMap()

5
New cards

The intermediate method __________ performs an action on each element without modifying the stream and accepts a parameter of type Consumer.

peek()

6
New cards

The terminal method __________ reduces the elements of a stream to a single value by accepting a BinaryOperator parameter.

reduce()

7
New cards

Intermediate operations in Java Streams run based on the concept of __________, which ensures elements are processed one by one only when a terminal operation is invoked.

Lazy Evaluation

8
New cards

In Java, lambda expressions can access only variables from the enclosing scope that are final or __________.

effectively final

9
New cards

A functional interface in Java contains exactly __________ abstract method(s), but it may contain multiple default and static methods.

11

10
New cards

When defining a lambda expression with two or more input parameters, enclosing the parameters in __________ is mandatory.

parentheses ()

11
New cards

The built-in functional interface Predicate contains the abstract method boolean test(T t), whose purpose is to __________.

test a given condition and return true or false

12
New cards

The built-in functional interface Consumer defines the abstract method __________, which performs an action on a given argument without returning a result.

void accept(T t)

13
New cards

The lambda expression (int x, y) -> x + y is invalid because if one parameter specifies its type explicitly, then __________.

all parameters must specify their types

14
New cards

In the CS 4108 course assessment plan, the Theoretical and Practical Final Exam accounts for __________ of the total assessment score.

40%40\%

15
New cards

In object-oriented programming terminology, an action performed by an object (a verb) is defined as a(n) __________.

method

16
New cards

The OOP design principle also known as data hiding, where only an object's methods can modify information inside that object, is __________.

Encapsulation

17
New cards

The OOP design principle defined as the process of hiding implementation details and exposing only the functionality to the user is __________.

Abstraction

18
New cards
<p>In the inheritance hierarchy diagram shown, the class acting as the common superclass for Automobile, Motorcycle, and Bus is __________.</p>

In the inheritance hierarchy diagram shown, the class acting as the common superclass for Automobile, Motorcycle, and Bus is __________.

Vehicle

19
New cards

According to object-oriented language classification, languages such as C++, Objective-C, and Object-Pascal are classified as __________ OO languages.

Hybrid

20
New cards

Developed by Alonzo Church, __________ is a minimal theoretical framework for studying computation through functions that forms the foundation of modern functional programming.

Lambda calculus

21
New cards

While object-oriented programming uses loops for iteration, functional programming languages implement iteration through __________.

recursion

22
New cards

A pure function has two main properties: it always produces the same output for the same arguments and has no __________.

side-effects

23
New cards

The functional programming property whereby any variable can be replaced with its actual value at any point during execution without changing program behavior is known as __________.

referential transparency

24
New cards

Functions that take other functions as arguments or return functions are classified as __________ functions.

higher-order

25
New cards

The functional language __________ is designed specifically for concurrency and distributed systems to process a large number of concurrent processes.

Erlang