APCSA Unit 2 test with complete solution
What is an object? Variable of a data type that is defined by the user. Could also be an instance of a class. What are the two things that every object has? State and Behavior What is state in an object? State is the data associated with the object. Rectangle object has both width and hight. What is the another name for state in classes? Instance variables What is behavior in an object? Behavior is the. behavior that is being performed ON the object. Ex: Using the width and height of a rectangle to find its area or perimeter. Finding this is known as the behavior. What do you first have to create in order to create an object? A class What is a class? It is a template for creating an object. The class has all the properties that the ob
Written for
- Institution
- APCSA Unit 2
- Course
- APCSA Unit 2
Document information
- Uploaded on
- February 23, 2024
- Number of pages
- 6
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
- apcsa unit 2
-
what is an object variable of a data type that is