Midterm exam

studied byStudied by 0 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 21

encourage image

There's no tags or description

Looks like no one added any tags here yet for you.

22 Terms

1

Classes

Blueprint for creating objects in Java.

New cards
2

Class Scope

The ability of methods in one object to access variables of another object within the same class.

New cards
3

Abstract Data Type

A data structure that defines a set of operators without specifying their implementation.

New cards
4

Instance Variables

Variables that are typically declared private within a class.

New cards
5

Constructor

A method used to initialize a newly created object.

New cards
6

Default Constructor

A constructor with no parameters that initializes object properties to default values.

New cards
7

Copy Constructor

A constructor that creates a new object as a copy of an existing object.

New cards
8

Public Class Members

Members that can be accessed from outside the class.

New cards
9

Private Class Members

Members that are only accessible within the class.

New cards
10

Getters and Setters

Methods that provide controlled access to private variables.

New cards
11

Composition

A design principle where a class contains instances of other classes.

New cards
12

toString Method

Method that converts an object to a String representation.

New cards
13

equals Method

Method that compares two objects for equality based on their content.

New cards
14

Inheritance

A mechanism where one class inherits attributes and methods from another class.

New cards
15

Subclass

A class that is derived from another class.

New cards
16

Super()

A keyword used to call the constructor of the parent class.

New cards
17

Overriding

Defining a subclass method with the same name and parameters as a method in the superclass.

New cards
18

Overloading

Defining multiple methods with the same name but different parameters.

New cards
19

Abstract Class

A class that cannot be instantiated and may contain abstract methods.

New cards
20

Abstract Method

A method declared without an implementation that must be implemented in subclasses.

New cards
21

Polymorphism

The ability of an object to take on multiple forms, typically through method overriding.

New cards
22

Example of Polymorphism

Animal mypet = new Dog();

New cards
robot