SEARCH
🇬🇧
MEM
O
RY
.COM
4.37.48
Guest
Log In
Homepage
0
0
0
0
0
Create Course
Courses
Last Played
Dashboard
Notifications
Classrooms
Folders
Exams
Custom Exams
Help
Leaderboard
Shop
Awards
Forum
Friends
Subjects
Dark mode
User ID: 999999
Version: 4.37.48
www.memory.co.uk
You are in browse mode. You must login to use
MEM
O
RY
Log in to start
Index
»
Computer Science 10
»
Chapter 1
»
Level 1
level: Level 1
Questions and Answers List
level questions: Level 1
Question
Answer
is a named list of data items that all have the same data type.
Array
data items of an Array.
Element
is an integer contained within square brackets that specifies one of an array’s elements. They are also called index, which can be seen in error messages in compiler
Subscript
To initialize an array, use an _____________ of values separated by commas and enclose within curly braces
initialization list
is called when the programmer provides values to all the elements of the array
Populating the array
The length in array is NOT A METHOD, it is a _________
FIELD or property of the object
a loop that allow the program to iterate though an array without specifying the starting and ending points for the loop control variable
Enhanced for loop
is one with the same number of elements as another, and for which the values in corresponding elements are related.
Parallel Array
a variable that holds a value as an indicator of whether some condition has been met
Flag
comparing a value to the endpoints of numerical ranges to find the category in which a value belongs
Range Match
is the process of arranging a series of objects in some logical order.
Sorting
is a process or set of steps that solve a problem.
Algorithm
is a simple sorting algorithm that repeatedly goes through the list, compares adjacent elements and swaps them if they are in the wrong order
Bubble Sort
is an algorithm that looks at each list element one at a time and if an element is out of order relative to any of the items earlier in the list, you move each earlier item down one position and then insert the tested element
Insertion sort
Mathematicians also use two-dimensional array and they call it ________ or a table.
matrix
Tech-savvy people often call 2D arrays as ________
spreadsheet
Declaration: datatype[][] variable = new datatype[x][y]; where x represents the ________
Rows
Declaration: datatype[][] variable = new datatype[x][y]; where y represents the _________
Columns
– a 2D array that has rows of different lengths. It can also be called as non-rectangular array
Jagged array
arrays with more than one dimension
Multidimensional arrays
Another well-known data structure of Java is the _______
Arraylist
is a dynamic data structure, where items can be added and removed from the list.
ArrayList
method to insert elements
add()
method to access an item.
get()
method to change an item.
set()
method to remove an item.
remove()
method to get the size of the arraylist
size()
is a mechanism that enables one class to acquire all the behaviors and attributes of another class.
Inheritance
is a visual tool that provides you with an overview of a class.
Class diagram
is a class that is used as a basis for inheritance.
Base classor superclass or parent class)
is a class that inherits from a base class
Derived class (or subclass or child class)
the relationship in which a class contains one or more members of another class, when those members would not continue to exist without the object that contains them.
Composition
the relationship in which a class contains one or more members of another class, when those members would continue to exist without the object that contains them
Aggregation
methods that work appropriately for subclasses of the same parent class
subtype polymorphism
lets the compiler know that your intention is to override a method in the parent class rather than create a method with a new signature
override annotation
statement must be the first statement in any subclass constructor that uses it.
super()