Podcast
Questions and Answers
Which term does NOT refer to the original class in inheritance?
Which term does NOT refer to the original class in inheritance?
An abstract method has a body.
An abstract method has a body.
False
What does inheritance create in terms of class relationships?
What does inheritance create in terms of class relationships?
Is-A relationship
The _____ class represents general concepts that derived classes have in common.
The _____ class represents general concepts that derived classes have in common.
Signup and view all the answers
Match the sorting algorithms with their descriptions:
Match the sorting algorithms with their descriptions:
Signup and view all the answers
What does the compareTo method return if input1 is greater than input2?
What does the compareTo method return if input1 is greater than input2?
Signup and view all the answers
Polymorphism allows us to call the same method with different implementations.
Polymorphism allows us to call the same method with different implementations.
Signup and view all the answers
What is the process of arranging a list of items in a particular order called?
What is the process of arranging a list of items in a particular order called?
Signup and view all the answers
A search pool is defined as a group of _____ .
A search pool is defined as a group of _____ .
Signup and view all the answers
What happens to a method called through a polymorphic reference?
What happens to a method called through a polymorphic reference?
Signup and view all the answers
What is the primary policy of a queue?
What is the primary policy of a queue?
Signup and view all the answers
A binary tree can have more than two child nodes for a single parent.
A binary tree can have more than two child nodes for a single parent.
Signup and view all the answers
What are the two operations associated with a queue?
What are the two operations associated with a queue?
Signup and view all the answers
A map establishes a relationship between ____ and ____.
A map establishes a relationship between ____ and ____.
Signup and view all the answers
Match the following data structures with their characteristics:
Match the following data structures with their characteristics:
Signup and view all the answers
Which of the following methods is used to add a new entry to a map?
Which of the following methods is used to add a new entry to a map?
Signup and view all the answers
A directed graph consists of vertices connected by arrows.
A directed graph consists of vertices connected by arrows.
Signup and view all the answers
What is the purpose of a try-catch statement?
What is the purpose of a try-catch statement?
Signup and view all the answers
The throwable class provides access to the keyword 'throw'.
The throwable class provides access to the keyword 'throw'.
Signup and view all the answers
What is a lambda function?
What is a lambda function?
Signup and view all the answers
What is a base case in recursion?
What is a base case in recursion?
Signup and view all the answers
In a graph, the absence of a root makes it a ____ structure.
In a graph, the absence of a root makes it a ____ structure.
Signup and view all the answers
What is one of the key limitations of a lambda expression?
What is one of the key limitations of a lambda expression?
Signup and view all the answers
The process by which an exception is thrown from the top of the call stack is known as __________.
The process by which an exception is thrown from the top of the call stack is known as __________.
Signup and view all the answers
Match the following I/O streams with their descriptions:
Match the following I/O streams with their descriptions:
Signup and view all the answers
Which of the following scenarios could cause an exception to be thrown?
Which of the following scenarios could cause an exception to be thrown?
Signup and view all the answers
Recursion requires at least one base case to function correctly.
Recursion requires at least one base case to function correctly.
Signup and view all the answers
What happens if we do not define a base case in a recursive function?
What happens if we do not define a base case in a recursive function?
Signup and view all the answers
Indirect recursion involves __________ invoking itself.
Indirect recursion involves __________ invoking itself.
Signup and view all the answers
What does the call stack trace provide information about?
What does the call stack trace provide information about?
Signup and view all the answers
Which of the following describes a stack?
Which of the following describes a stack?
Signup and view all the answers
A dynamic data structure can shrink or grow when needed.
A dynamic data structure can shrink or grow when needed.
Signup and view all the answers
What is the primary operation of a queue?
What is the primary operation of a queue?
Signup and view all the answers
In a linked list, each element contains a key and a pointer called ______ that points to its successor.
In a linked list, each element contains a key and a pointer called ______ that points to its successor.
Signup and view all the answers
Match the data structure with its characteristic:
Match the data structure with its characteristic:
Signup and view all the answers
What is stable sorting?
What is stable sorting?
Signup and view all the answers
A dynamic data structure cannot contain references to other objects.
A dynamic data structure cannot contain references to other objects.
Signup and view all the answers
What are two main functions used to maintain a stack?
What are two main functions used to maintain a stack?
Signup and view all the answers
A static data structure has a fixed ______.
A static data structure has a fixed ______.
Signup and view all the answers
What types of data structures can be built using references?
What types of data structures can be built using references?
Signup and view all the answers
Study Notes
CSIT-112 Final Study Guide
- The final exam will cover the entire course, with a focus on the second half.
- Students should review all concepts in the guide to prepare thoroughly.
Lecture 1
- Inheritance is a fundamental object-oriented design technique for creating and organizing reusable classes.
- Original classes can be referenced as Parent, Super, or Base.
- Derived classes can be referenced as Child or Subclass.
- Proper inheritance creates an "is-a" relationship.
Lecture 2
- Inheritance is transitive, meaning a subclass inherits properties from the top class.
- An abstract method is declared without implementation.
- Abstract classes represent general concepts shared by derived classes.
Lecture 4
- Polymorphism allows defining one interface with multiple implementations.
- A method called through a polymorphic reference can change its behaviour.
Lecture 5
- Sorting arranges items in a specific order.
- Selection sort finds the smallest value and swaps it with the first position, then repeats.
Lecture 6
- The
compareTo
method compares two inputs and returns a value:- Negative if input1 < input2
- Zero if input1 == input2
- Positive if input1 > input2
- Insertion sort is another sorting strategy.
Lecture 7
- A search pool is a collection of items.
Lecture 8
- Exceptions represent problems or unusual situations in a program.
- Examples include dividing by zero, file reading errors, and array index issues.
- Call stack traces display the method calls leading to exceptions, detailing relevant data.
Lecture 9
- Try-catch statements allow testing code for potential errors and handle them appropriately.
- Exception propagation describes how exceptions travel through a program's call stack.
Lecture 10
- Input/output streams (system.in, system.out, system.err) handle console interactions.
- System.in: keyboard input
- System.out: console output
- System.err: console error output
- Recursion defines something in terms of itself.
- The base case of a recursive solution stops further recursive calls.
- Recursive methods must have a base case to prevent infinite looping.
- Recursive solutions can solve complex problems by breaking them into smaller subproblems.
Lecture 11
- Recursion is the process of defining something in terms of itself.
- Problem breakdown into smaller subproblems until the base case is reached.
- Base case is important for recursive procedures that will otherwise loop infinitely.
- Recursive problems were covered and examples/details are available for review.
- Insufficient base case causes infinite recursion.
Lecture 12
- Direct recursion is when a function calls itself directly.
- Indirect recursion is when a function calls another function, which in turn calls the first function.
Lecture 13
- Collections are objects that store other objects.
- Stable sorting maintains the relative order of equal elements in the input data.
- Unstable sorting does not guarantee this order of equal elements.
- Abstract data types define data and operations on that data.
- Static data structures have a fixed size.
- Dynamic data structures can grow and shrink as needed.
- References/Pointers relate objects in dynamic data structures.
- Data structures like trees, lists, graphs can be constructed using references/pointers.
Lecture 14
- Stacks are linear dynamic data structures that use LIFO (Last In, First Out) policy.
- Stacks are used for insertion and deletion.
Lecture 15
- Trees and graphs are non-linear data structures.
- Trees have attributes like nodes, edges, children, parent, root, key.
- Binary trees are tree structures whose nodes have a maximum of two children.
- Graphs are non-linear structures and do not have a root.
Lecture 16
- Graphs can be directed or undirected.
- Maps store key-value pairs.
- Efficient for searching values by keys.
- TreeMap and HashMap are two common implementations.
- Lambda expressions are short blocks of code that can be applied to streams of data.
- Streams provide efficient ways of processing data.
- Lambda expressions often use parameters and return values to process data.
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. It covers key concepts from the course, focusing on inheritance, polymorphism, and sorting algorithms. Review these essential topics to ensure you have a solid understanding before the exam.