CIT597 Quiz 2
Fall, 2003
Name_________________________________________

Please keep all answers short and to the point. Read each question and answer it; don't add information that wasn't asked for.

  1. (5 points) What is the default port number for HTTP?


  2. (5 points) What does the acronym TCP/IP stand for?


  3. (5 points) What service does a DNS provide?




  4. (5 points) What Java package defines Sockets and URLs?


  5. (4 points) What are the two arguments to the Socket constructor?



  6. (4 points) In a client, how can you refer to a server running on the same computer?



  7. (6 points) What are the three parts of an HTTP request?






  8. (5 points) What is the difference between GET and POST in an HTTP request? (Be sure to indicate which is which.)



  9. (5 points) What is the purpose of a proxy server?



  10. (5 points) What keyword is used to prevent different Threads from simultaneously accessing the same object?



    -- Quiz continues on reverse side --



  11. (5 points) You can call the constructor for PrintWriter with an additional boolean variable. What does this boolean variable control?



  12. (8 points) Briefly, how does the absence of unit tests discourage refactoring?





  13. (10 points) In JUnit terminology, what is tested by:

    1. a "unit test"?

    2. a "test case"?


  14. (10 points) Name the JUnit methods that:

    1. create a test fixture

    2. release resources after performing the tests


  15. (8 points) If you have defined a Button b1, write two ways you could get its Class object.




  16. (5 points) If c is a Class object, what is the return type of c.getInterfaces() ?


  17. (5 points) If c is a Class object, what is the return type of c.getModifiers() ?