Grade 12 Flashcards

1
Q

Member functions are:

A

used to add additional functions to a class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are Static members?

A

Defines unchanging values In objects

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Instance Variables are:

A

a variable defined for an instance in a class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is an object?

A

Object: an instance of a class that manipulates methods

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a parameter?

A

Parameter: a variable used to add inputed data to the function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What methods can’t be overridden?

A

-privet methods
-static methods
-final methods

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Abstract classes are?

A

Classes that cannot create objects but only inherit them, they can have abstract/non abstract methods.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Dynamic binding is?

A

Dynamic binding: creates the objects of a base class but creates it with different derived classes. You cannot instantiate concret objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Keyword to override compilers rules

A

.super()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Can Static methods be overridden (T or F)

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Redifining methods that a subclass would inherit is called

A

Overriding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is interface?

A

Interface: is similar to a class, but all methods must be abstract and all objects must be static or final variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

4 rules for abstract classes?

A
  • it cannot be instantiated
  • used be the keyword “abstract”
  • can have constructors, static and final methods
  • can have abstract or non abstract methods
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is exception handling?

A

Exception handling: is the ability of the program to catch errors and handle them while continuing to run

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is reoccursion?

A

Recursion: a method that makes the function call itself. Used for breaking down complicated problems down into simple problems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is polymorphism?

A

Polymorphism refers to classes, in which base and derived classes can have the same functions with the same names

17
Q

What is a class modifier?

A

Class modifier: is the visibility given to a function of the class
Protected
Private
Public

18
Q

What handles I/O exceptions?

A

IO Exception

19
Q

What does “Contains()” do?

A

Checks for the existence of another string

20
Q

What does “replace()” do?

A

Replaces a character in the original string