#8 abstract classes + error-handling + exceptions Flashcards
(7 cards)
1
Q
how is an abstract method similar to an interface
A
it has a method signature (which includes abstract modifier) but no body
2
Q
where are abstract methods implemented
A
in its subclasses
3
Q
what makes a class abstract
A
> it has the abstract modifier in the heading
it has at least one abstract method
it can’t instantiate objects (its subclasses can)
4
Q
compile-time (syntax) errors
A
errors in code construction
underlined in red
5
Q
runtime errors
A
operations that are illegal or impossible to execute
exceptions
6
Q
logic errors
A
a problem with the design or algorithm
7
Q
test coverage (code coverage)
A
how much code is executed by a set of test cases