4.3 Explain the use and purpose of programing concepts Flashcards
Which of the following best defines a container?
It is a special type of identifier that can reference multiple values or elements.
What key role do functions play in both consistency and functionality?
They enable you to create segments of code that you will reuse.
What BEST describes the purpose of properties in object-oriented programming?
They allow external code to access a field of an object.
During program execution, a value changes and returns a new value to be used. Which type of identifier is this?
A variable
What BEST defines the AND condition?
If both conditions are TRUE, then the whole statement is TRUE.
What does “!=” mean in a logical test
that the two values do not equal each other
What accurately describes arrays?
Arrays can be either single-dimensional or multi-dimensional. An array is an identifier for a group of variables of the same type. The number of possible elements in an array is fixed when the array is declared.
In what situation would you use a vector?
To include a container that can grow or shrink in size as elements are added or removed
What BEST defines the XOR condition?
If either, but not both, condition is TRUE, then the whole statement is TRUE.
What BEST defines the OR condition?
If either condition is TRUE, then the whole statement is TRUE.
What BEST describes the purpose of attributes?
They are values and data types that define the object.
The attributes are stored within the object as fields or private variables.
What BEST describes the purpose of methods?
They define what you can do to an object.