Prac-Theory Flashcards
Define static
indicates that a particular member is not an instance, but rather part of a type
Define parallel arrays
More than one array with the same number of elements where the elements of all the arrays with the same index, are related.
What is an access modifier
Defines who can use a method or variable in a class.
private: Only the same class can use it.
public: Anyone can use it.
Accessor
A method that lets you read the value of a private variable.
Attribute
The data or properties that belong to an object (also called fields or properties).
Class
A template used to create objects. It defines the data (attributes) and actions (methods) the object will have.
Constructor
A special method that creates an object and sets its starting values. It has the same name as the class.
Encapsulation
Keeping data (fields) and related actions (methods) together in one class, and hiding the details from other parts of the program.
Helper Method
A private method used inside a class to do small tasks like calculations. It’s not meant to be used outside the class.
Information Hiding
Keeping an object’s data private and only allowing access through specific methods like get and set.
Inheritance
When a class (child) gets methods and attributes from another class (parent), so you can reuse code.
Instantiation
The process of creating an object from a class
Methods
Actions or behaviors that objects can perform. For example, an object might have a method to calculate something or display a value.
Mutator
A method (like a set method) that changes the value of a private variable.
Non-Static Method
A method that can only be used when you have created an object of the class.