212 - Advanced Programming Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Types of languages

A
  1. Imperative/ procedural
  2. Object oriented
  3. Declarative
  4. (Pure) functional
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Identify what each part of this statement is

Person p = new Person()

A
Person = Class
p = Instance variable 
() = Constructor
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does inheritance do in OO languages? (Object Oriented)

A

It provides a mechanism to promote reuse and extensibility

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

What is a class that is being extended known as?

A

Base, Super or Parent class.

The new class is known as a subclass

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

How to define a single super class in Java

A

By using (extends) as Java is a single inheritance language

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

Inheritance hierarchy example

A

Mammal
/ \
Whale Person
/ / \
Humpback Student Lecturer

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