Week 9 Flashcards

1
Q

Software Development Lifecycle

A
Requirements
Design
Implementation
Testing
Maintenance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to Design Software

A
  1. Modelling: Identify concepts and relations
  2. Apply good architecture
  3. Use appropriate data structures
  4. Use design patterns when appropriate
  5. Refactor
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Grammatical Parsing - Nouns

A

Class if it has multiple attributes / operations and they are common to all instances
otherwise: attribute of class

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

Grammatical Parsing - Adjective

A

SubClass, Attribute
subclass: if adjective would imply different or additional operations or behavior or different adjectives imply different attributes

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

Grammatical Parsing - Verb

A

Method: contains, has , is , uses, consists

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

Is-a relationship types

A
Generalization: Generally inheritance, both can exist on their own. One class specialization of other
Realization: Implementation or inheritance of abstract class. Interface A has no notion of existence without being a specific tp of object B. E.g. Animal. If I say draw an animal I do not know what to draw -> realization.
If I ask to draw a person, I know what to draw -> Generalization
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

has-a relationship types

A
Aggregation: one class is part of the other but they can exist idependently
Composition: one class part of the other. Cannot exist without the class to which it belongs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

uses relationship

A
Dependency
E.g. uses an instance of other class as input
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

public abstract class Animal {}

public abstract class Mammal extends Animal {}

public class Dog extends Mammal {}

public class Cat extends Mammal {}

A

Realization relationship bw. all three

Although Mammal “extends” Animal in Java, Animal is an abstract class and thus cannot be realized on its own; therefore, a “realization” relationship is correct. The same holds true for Dog/Cat and Mammal, because Mammal is an abstract class as well.

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