Exam 2 Review Flashcards
Why do we use the Software Development Life Cycle?
It allows for more efficiency in the coding process
Difference between functional and nun-functional requirements
Functional: deals with inputs/outputs/behaviors
Nonfunctional: everything else (language… whatever)
The sooner you catch a mistake, the cheaper it is. (T/F)
True
Polymorphism
a feature of java that allows a method to be selected at runtime… enables inheritances/interfaces
How do you write a comparable interface? What is required?
the class must ‘implements Comparable’
there must be a x.compareTo(y) method
How to write a comparator interface?
implements Comparator
includes a compare(x,y) method
Substitutability Principle
child can be substituted for anywhere a parent can go
Stacks order?
LIFO
Queues order?
FIFO
What is necessary for a binary search?
A sorted array!!!!
Generally accepted phases of the Software Development Life Cycle..
Requirements, Design, Implementation and Testing, Maintenance
Can interfaces be instantiated?
No
Can an interface implement a method? If so, how?
Yes, using the default keyword
Interfaces have a constructor (T/F)
False
Classes implement an interface (T/F)
True