CIT 591 Makeup Quiz
Fall 2001, Dave Matuszek
Name __________________________________

All answers must be kept brief. Points will be taken off for unnecessarily long or detailed answers.

  1. Elegance is a combination of what two properties?

  2. What package would you import in order to:
    1. Draw pictures on the screen?

    2. Put Panels and Buttons on the screen?

    3. Respond to button clicks?

    4. Use wrappers for primitives?

    5. Use Vectors?

  3. It is possible to write an Applet without using any import statements at all. Briefly, what must you do instead if you don't have import statements?


  4. BlueJ's debugger is itself buggy. Briefly describe one bug in the debugger.


  5. What is the type of 3.1416?


  6. What does the continue statement do?


  7. Why shouldn't you use hard tabs?


  8. Define a (correctly named) setter method for an int variable named voltage.




  9. Very briefly, mention the two ways of fixing a broken constructor chain.



  10. Where is the one place that it is usually better not to use a meaningful name for a variable?


  11. Java uses six namespaces. Name three of them.


  12. If a variable name is protected, from where can it be accessed?


  13. What Java construct (that is, what syntax) must you use in order to do narrowing?


  14. What is the difference between & and && when applied to boolean operands?


  15. There is an error in the following method. Fix it.

                   String toString() {
                        return this.name;
                   }


  16. Which kind of layout manager will make all components the same size?


  17. What two kinds of things may be in an interface?


  18. .java files are compiled into .class files. What distinguishes the name of a compiled inner class file from that of other class files?


  19. The primary purpose for documentation comments is to define a _______________________ between a client and a supplier of a service.

  20. What two things does the HTML <pre> tag do?


  21. In one line, declare and define an array faceCards containing the three strings "Jack", "Queen", and "King".


  22. State the Open-Closed Principle.



  23. Every constructor for a FileDialog requires a ____________________ as its first argument.

  24. What are the two approaches to multiprocessing on a single processor computer?


  25. Draw a pure state machine that tests whether a binary number is even or odd.