AP CSA using objects key terms
Essential key terms and concepts for AP Computer Science A focusing on object-oriented programming.
Quiz(20 Fragen)
1. What is the purpose of encapsulation in OOP?
Begriffe in diesem Lernset(27)
What is an object?
An instance of a class that contains both data and methods.
What is a class?
A blueprint for creating objects, defining properties and behaviors.
True or false: All objects belong to a class.
True, because a class defines the structure for creating objects.
Difference between method and constructor.
A method performs actions, a constructor initializes new objects.
What is encapsulation?
The bundling of data with methods that operate on that data, restricting access.
What does 'inheritance' mean?
A mechanism where a new class can inherit properties from an existing class.
Fill in the blank: A __________ is a method that calls itself.
recursive method
What is polymorphism?
The ability to process objects differently based on their data type or class.
What is an interface?
A contract that specifies methods a class must implement without defining them.
True or false: A class cannot implement multiple interfaces.
False, because a class can implement multiple interfaces in Java.
What does 'overloading' mean?
Defining multiple methods with the same name but different parameters.
What is abstraction?
The concept of hiding complex implementation details and showing only essentials.
Difference between static and instance methods.
Static methods belong to the class; instance methods belong to the object.
Fill in the blank: The __________ keyword is used to create a new object in Java.
new
What is a constructor?
A special method that initializes new objects of a class.
What is method overriding?
When a subclass provides a specific implementation of a method already defined in its superclass.
True or false: An abstract class cannot be instantiated.
True, because it contains abstract methods that must be implemented.
What does 'this' refer to in a method?
The current object instance in which the method is being invoked.
Fill in the blank: A __________ variable is shared among all instances of a class.
static
What is a package?
A namespace that organizes a set of related classes and interfaces.
Difference between public and private access modifiers.
Public members are accessible from anywhere; private members are only accessible within the class.
What is a getter?
A method that retrieves the value of a class property.
What is a setter?
A method that sets or updates the value of a class property.
Fill in the blank: An __________ is a special type of method used to initialize an object.
initializer
What is the main purpose of constructors?
To set initial values for object attributes when an object is created.
What does 'final' keyword do?
Used to declare constants or prevent method overriding and inheritance.
What is a software library?
A collection of pre-written code that developers can use to optimize tasks.
Fragen in diesem Lernset(20)
1. What is the purpose of encapsulation in OOP?
2. Which keyword is used to create a new object in Java?
3. Which of the following is NOT a benefit of using inheritance?
4. What is method overloading?
5. Which access modifier allows visibility across all classes?
6. Which defines a class that cannot be instantiated?
7. What is the role of a constructor in Java?
8. Which is true about static methods?
9. Which of the following is an example of polymorphism?
10. What does the 'super' keyword do?
11. What is an interface primarily used for?
12. Which statement about getters and setters is true?
13. What happens when you declare a variable as 'final'?
14. Which of the following correctly describes a concrete class?
15. What does the phrase 'data hiding' refer to?
16. What is the main purpose of using classes in programming?
17. True or false: A method can return multiple values.
18. What does 'dynamic binding' refer to?
19. Which keyword prevents a method from being overridden?
20. What is the significance of the 'this' keyword?
Ähnliche Lernsets
Bedingung Alltag Beispiel
Was ist ein Algorithmus Schritt für Schritt
Test: Variablen und Datentypen
if und Schleifen Notizen
Test: Binärzahlen
Wiederholung: Funktionen
Debugging Schritt für Schritt
Schleife Alltag Beispiel Begriffe
Eigenes Lernset erstellen
Lade ein PDF hoch, füge Notizen ein oder beschreibe ein Thema – KI erstellt Karteikarten, Quizze und mehr in Sekunden.

