Mostly Java & Java methodologies Flashcards

1
Q

How would you describe the Waterfall methodology

A

as a linear, sequential approach, where each phase depends on the completion of the last

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

What are the steps?

A

Reqiuirements, Design, Implementation and Verification

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

What are the steps for Agile?

A

Requirements, Design, Implementation and Verificatipon then ITERATION (important) over next section of the app

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

Three stages of iterative and Incremental Agile

A

Initialization(base version), project control(kind of like product backlog, contains record of all tasks) then iterate (Inception, Elaboration, Construction, Transition)

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

Extreme Programming basic activities:

A

Coding, Testing, Listening, and Designing

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

XP: Little testing can eliminate but….

A

A lot of testing can eliminate more.

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

XP: does all code need unit tests?

A

In XP all code must have unit testing. a bug is not an error in logic, rather, a test that was not written

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

XP: What does designing phase involve?

A

Avoiding dependencies you code may have, changing one part of the code shouldn’t affect other parts.

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

How does composition achieve similar goals to inheritance?

A

Composition requires classes to contain instances of the class that implement the desired funcionality rather than inheriting the functionality from the parent class.

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

what is one problem with inheritance over composition

A

it can be difficult to create changes in the parent class, additions to the parent class are also not encapsulated (child classes can see changes)

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

How would you implement polymorphism with composition?

A
wiht this code, it is now possible to implement a list of CanPick, but still use composition
interface CanPick {
public bool pick();
}
class Apple implements CanPick {
private Fruit fruit = new Fruit();
public float getWt { // FORWARDING
return fruit.getWt(); }
public bool pick() { return true; }
}
class Orange implements CanPick {
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which language is multiple inheritance possible in?

A

C++

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

mulitple inheritance presents the opportunity for a lot of duplicate information, if a class is inheriting from two other classes, which might contain the same mathods/variables. Which idea can might solve this, but then create worse problems.

A

The deadly diamond. A top class contains information that might be similar, then you get your two slighlty different classes, then finally a class at the bottom which inherits the two slightly different classes. if the two slightly different classes both override the top classes method, the bottom class won’t know which method to use.

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

which is a common solution to the deadly diamond?

A

Duplicate instance, where the top class is duplicated.

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

What is multiple dispatch?

A

A lot like overloading (where we create multiple methods, with different parameters) but multiple dispacth allows polymorphic class. in runtime, the correct method is called based on the object type

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

Prototype Based Programming?

A

Javascript