Assignment 2

Home Up Lab 1 Assignment 1 Lab 2 Assignment 2 Lab 3 Assignment 3 Assignment 4 Research Paper

Points: 100

Due: 10/6/00. Again, put your solutions in your home page.

  1. [40 points] Using the Web Quiz example(s) discussed in class as guides, develop your own Web Quiz that includes the following:  
    Questions (3 Multiple Choice, 3 True/False, 3 Fill in the blanks (accept both upper and lower cases)) that pertain to WWW Development Technologies
    Pertinent Feedback
    Correct Answers
    Score
  2. This question will be graded based on correctness and design (originality, aesthetics, etc.).

    Note: Bonus points (up to 10%) will be awarded for incorporating bells and whistles into your quiz.

  3. [10 pts] 

    Consider the following HTML form and its corresponding code (given at the bottom).

    Modify the HTML form to include the behaviors (change the code below):

     

    1. [3 pts] When the second radio button is checked, the first text field is to be set in focus.
    2. [3 pts] When any of the three text fields is in focus (e.g., when one clicks on one of them), the second radio button is to be checked.
    3. [4 pts] In order for the form to be submitted (via Search, which is a submit button), either the first radio button must be checked or one or more of the text fields must be non-empty. If the submit process is to be aborted, provide an alert window to state the reason for non-submission and set the first text field to be in focus.

     <html>

     ...

    <form>

    Indicate the search preference below:

    <p><input type=radio name=searchPref value=all checked>Search ALL airlines

    <br><input type=radio name=searchPref value=indiv>Search for ONLY the airline(s):

    <br>

    <br>&nbsp;&nbsp; Choice 1:&nbsp;<input type=text name=air1>

    <br>&nbsp;&nbsp; Choice 2:&nbsp;<input type=text name=air2>

    <br>&nbsp;&nbsp; Choice 2:&nbsp;<input type=text name=air3>

    <p>

    <input type=submit value="Search">

    </form>

    </html>

  4. [10 pts] Create a page that includes 2 different Java applets, one that takes no parameters and another one that do take parameter(s). To put a Java applet in a page, you need to include the following tag (minimally):
  5. <APPLET CODE="something.class" WIDTH=x HEIGHT=y>
    </APPLET>

    Example:

    <APPLET CODE="ball.class" WIDTH=200 HEIGHT=400>
    </APPLET>

    Some applets require you to provide more parameters. For example,

    <APPLET CODE="Lake.class" WIDTH=250 HEIGHT=258>
    <PARAM NAME=image VALUE="sunset.gif">
    </APPLET>

    For the above, you need to also include sunset.gif in the directory of your page. Make sure that you read the instructions for using the applets that you want to include.

    Some of the sites that have Java applets include www.jars.com and www.gamelan.com.

  6. [6 pts] List all methods defined in the class java.net.URL, java.io.StreamTokenizer, and java.util.Hashtable
  7. [6 pts] Trace the class hierarchy for each of the following classes, from the top of the hierarchy tree through all of its subclasses. (Just indent a subclass a few spaces to the right)
    1. class java.util.Dictionary
    2. class java.lang.Number
    3. class java.lang.Exception (For this class, you need to give only its superclasses and its immediate subclasses)
  8. [5 pts] List all fields defined in the class java.util.Vector.
  9. [5 pts] Search for all Implementers of the size() method.
  10. [8 pts] Find the methods to perform the following:
    1. Converts a string to a character array.
    2. Converts all of the characters in a string to upper case.
    3. Trims leading and trailing whitespace from a string.
    4. Returns the index within a string of the first occurrence of the specified character.
  11. [10 pts] Refer to the article "Object-Oriented Programming" for the following:
  12. What is commonly known as the first OO programming language? Who designed it? (Hint: It was designed back in the 60's.)
    The comparison of making peanut butter jelly sandwich and running a luncheonette was made to illustrate ___________________________. (Briefly explain)