Podcast
Questions and Answers
What type of relationship does proper inheritance create?
What type of relationship does proper inheritance create?
- Is-A (correct)
- Has-A
- Belongs-To
- Part-Of
What is an abstract method?
What is an abstract method?
- A method that can’t be overridden
- A method that has at least one parameter
- A method with a body that performs a function
- A method that is declared without an implementation (correct)
What does polymorphism allow us to define?
What does polymorphism allow us to define?
- Constructor methods for every class
- One interface with different implementations (correct)
- A method that must always be public
- Multiple classes with the same name
What is the first step in the selection sort strategy?
What is the first step in the selection sort strategy?
What does the compareTo method return if input1 is greater than input2?
What does the compareTo method return if input1 is greater than input2?
What best defines a search pool?
What best defines a search pool?
What is the purpose of an abstract class?
What is the purpose of an abstract class?
What is a defining characteristic of a derived class?
What is a defining characteristic of a derived class?
What is the purpose of a try-catch statement in a program?
What is the purpose of a try-catch statement in a program?
What does each line in a call stack trace represent?
What does each line in a call stack trace represent?
What is exception propagation in programming?
What is exception propagation in programming?
What is the base case in recursion?
What is the base case in recursion?
What do the streams System.in, System.out, and System.err represent?
What do the streams System.in, System.out, and System.err represent?
What happens if a recursive function lacks a base case?
What happens if a recursive function lacks a base case?
What is the main difference between direct recursion and indirect recursion?
What is the main difference between direct recursion and indirect recursion?
Which of the following is an example of a situation that may cause an exception in a program?
Which of the following is an example of a situation that may cause an exception in a program?
What characterizes a stable sorting algorithm?
What characterizes a stable sorting algorithm?
Which of the following is a key feature of a dynamic data structure?
Which of the following is a key feature of a dynamic data structure?
Which of the following is a characteristic of a stack data structure?
Which of the following is a characteristic of a stack data structure?
What does the 'top' function in a stack do?
What does the 'top' function in a stack do?
How are nodes structured in a doubly linked list compared to a singly linked list?
How are nodes structured in a doubly linked list compared to a singly linked list?
What is a collection in the context of data structures?
What is a collection in the context of data structures?
What does 'push' do in a stack?
What does 'push' do in a stack?
Which of the following is NOT a type of data structure that can be created using references?
Which of the following is NOT a type of data structure that can be created using references?
What distinguishes the insertion and deletion operations in a queue?
What distinguishes the insertion and deletion operations in a queue?
What is a characteristic of a binary tree?
What is a characteristic of a binary tree?
Which of the following best describes a lambda function?
Which of the following best describes a lambda function?
What is the difference between a directed graph and an undirected graph?
What is the difference between a directed graph and an undirected graph?
Which of the following is a valid method to retrieve a value from a map using a key?
Which of the following is a valid method to retrieve a value from a map using a key?
What are the two common types of graphs?
What are the two common types of graphs?
Which statement is true regarding the attributes of a tree?
Which statement is true regarding the attributes of a tree?
What does the policy FIFO stand for in relation to queues?
What does the policy FIFO stand for in relation to queues?
Flashcards
Inheritance
Inheritance
A fundamental object-oriented design technique used to create and organize reusable classes. It allows a new class to inherit properties and methods from an existing class.
Parent Class
Parent Class
The original class from which other classes inherit properties and methods.
Derived Class
Derived Class
The class that inherits properties and methods from the parent class.
Abstract Method
Abstract Method
Signup and view all the flashcards
Abstract Class
Abstract Class
Signup and view all the flashcards
Polymorphism
Polymorphism
Signup and view all the flashcards
compareTo method
compareTo method
Signup and view all the flashcards
Sorting
Sorting
Signup and view all the flashcards
What is a collection?
What is a collection?
Signup and view all the flashcards
What is stable sorting?
What is stable sorting?
Signup and view all the flashcards
What is unstable sorting?
What is unstable sorting?
Signup and view all the flashcards
What is a static data structure?
What is a static data structure?
Signup and view all the flashcards
What is a dynamic data structure?
What is a dynamic data structure?
Signup and view all the flashcards
What is a reference (pointer)?
What is a reference (pointer)?
Signup and view all the flashcards
What is a linked list?
What is a linked list?
Signup and view all the flashcards
What is a stack?
What is a stack?
Signup and view all the flashcards
Exception
Exception
Signup and view all the flashcards
Call Stack Trace
Call Stack Trace
Signup and view all the flashcards
Try-Catch Statement
Try-Catch Statement
Signup and view all the flashcards
Exception Propagation
Exception Propagation
Signup and view all the flashcards
Throwable Class
Throwable Class
Signup and view all the flashcards
System.in, System.out, and System.err
System.in, System.out, and System.err
Signup and view all the flashcards
Recursion
Recursion
Signup and view all the flashcards
Base Case
Base Case
Signup and view all the flashcards
Queue
Queue
Signup and view all the flashcards
Enqueue
Enqueue
Signup and view all the flashcards
Dequeue
Dequeue
Signup and view all the flashcards
Tree
Tree
Signup and view all the flashcards
Binary Tree
Binary Tree
Signup and view all the flashcards
Graph
Graph
Signup and view all the flashcards
Map
Map
Signup and view all the flashcards
TreeMap
TreeMap
Signup and view all the flashcards
Study Notes
CSIT-112 Final Study Guide
- This final exam covers the entire course, with a focus on the second half.
- Review all course concepts.
Lecture 1
- Inheritance: A fundamental object-oriented technique for creating reusable classes.
- Original Class References: Parent, Super, Base
- Derived Class References: Child, Subclass
- Inheritance Relationship: Is-A
Lecture 2
- Transitive Inheritance: A subclass inherits properties from its top-level class (if applicable).
- Abstract Method: A method declared but with no implementation (a method header)
- Abstract Class: Represents a general concept shared by derived classes.
Lecture 4
- Polymorphism: Defines one interface that can have multiple implementations.
- Polymorphic Reference: Can change behavior of the method that uses it.
Lecture 5
- Sorting: Arranging items in a specific order.
- Selection Sort Strategy: Finds the smallest item, switches it to the first position, next smallest to position 2, repeating until all are in order
Lecture 6
- compareTo Method: Compares two inputs against each other; returning a value that reflects the relationship between the two inputs.
- compareTo Return Values:
- input1 < input2: negative value
- input1 == input2: 0
- input1 > input2: positive value
- Insertion Sort Strategy: Reorganizes the elements progressively to place each element in the correct sorted position.
Lecture 7
- Search Pool: A group of items.
Lecture 8
- Exceptions: Problems/unusual situations occurring in a program (not an error)
- Exception Scenarios: Errors like dividing by zero, unable to read a file, or an out-of-bounds array index.
- Call Stack Trace: Displays the method call order leading to the exception, including the method, file, and line number of the error.
Lecture 9
- Exception Propagation: An exception thrown from a method propagates (is passed) to higher-level methods in a call stack until it's caught/handled.
- Throwable Class: A class used in error handling to provide access to an exception. The throw keyword is related to this.
Lecture 10
- Standard I/O Streams: System.in, System.out, System.err.
- System.in: Represents the keyboard input.
- System.out: Represents the standard output.
- System.err: Represents error output.
Lecture 11
- Recursion: Defining something in terms of itself repeatedly until a base case is reached
- Base Case: A condition that ends the recursive process.
- Recursive Problems: Examples of problems solved by recursion covered in the course
Lecture 12
- Direct Recursion: A method that calls itself directly.
- Indirect Recursion: Multiple methods calling each other.
Lecture 13
- Collection: An object holding other objects.
- Stable Sort: Maintains the relative order of equal elements.
- Unstable Sort: Doesn’t guarantee the relative order of equal elements.
- Abstract Data Type (ADT): Defined by the operations that can be performed on it and not by its implementation. Fixed size.
- Dynamic Data Structure: Size can change (grow or shrink) as needed.Â
- References (Pointers): Used to link objects in dynamic structures.
- Linked Lists: Dynamic linear data structures using nodes connected by references.
- Graphs: Non-linear structures consisting of nodes (vertices) and edges.
Lecture 14
- Stack: A linear data structure where the last item added is the first item removed (LIFO).
- Enqueue/Dequeue: Operations for inserting and removing from a queue (FIFO).
- Linked List Operations:Â Insert, Delete, Search of a linked list.
- Stacks Compared to Arrays
Lecture 15
- Trees and Graphs: Non-linear Data structures
- Types of Trees: Binary Trees; where all have nodes with a maximum degree of two; Leaf Nodes(no children)
Lecture 16
- Maps: Data structures that store key-value pairs. Â
- Map Implementations: TreeMap, HashMap
- Key-Value Pairs: Unique identifier associated with a data value.
- Lambda Expressions: Anonymous function definitions often used in collections processing (parameters, ->, body).
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
Prepare for your CSIT-112 final exam with this comprehensive study guide. Focus on key concepts such as inheritance, polymorphism, and sorting algorithms, drawn from the entire course material, particularly the second half. Review essential definitions and techniques to ensure you're well-prepared for the exam.