28 X 1 =28 + 2
1. Generally, what visibility should constructors have? Why?
2. Generally, what visibility should classes have? Why?
3. If class B implements interface X, what does that imply?
4. If class B extends class Y, what does that imply?
Operators: +, == (and equals)
StaMc, instance, this keyword
Constructors
Visibility
Implements an interface
Extends a class
5. What does the word cast mean?
6. What is the notaMon for doing a cast?
7. Why do you need a cast to assign a double value to an int variable, but not the other way
around? When you do such a cast, what happens to the fracMonal part of the double?
8. Give at least two reasons why UML class diagrams are useful.
9. What is the UML notaMon for a class? Give an example.
10. What is the UML notaMon for is-a (extends)?
11. What is the UML notaMon for is-a (implements)?
12. What is the UML notaMon for has-a?
13. What is the UML notaMon for depends-on?
14. What is encapsulaMon in object-oriented so]ware? What two things are encapsulated inside
an object?
15. What is version control? Why is it useful?
16. What is developing by using documented stubs? Why is it useful?
17. What is test-first development? Why is it useful?
18. What is a unit test? Why is unit tesMng useful?
19. What is test coverage?
20. What is regression tesMng?
21. What annotaMon indicates that a method is a JUnit 4 test?
22. What does the @Before annotaMon in a JUnit test mean?
23. What is pair programming? Why is it useful?
24. What is iteraMve enhancement? Why is it useful?
25. What are magic numbers? Why do you want to avoid them? How do you avoid them?
26. What are parallel arrays? Why is their use generally a bad idea?
27. In Eclipse, what keystroke combinaMon formats your code according to an accepted style?
28. Define each of the following key concepts in debugging: breakpoint, single stepping, and( 2 marks)