1. | How is an applet different from an application? |
|
2. | List at least four applet security restrictions. |
|
3. | List and briefly discuss the four applet life-cycle states and their associated applet life-cycle methods. |
|
4. | (True/False) An applet can initiate network connections to, and accept incoming network connections from, any computer on the network. |
|
5. | List and describe the purpose of each <applet> tag attribute. |
|
6. | How can information be passed to an applet from an HTML page? |
|
7. | List and briefly discuss the general steps required to create a database in MySQL. |
|
8. | List and briefly discuss the steps required to utilize JDBC in a program. |
|
9. | What two packages contain the JDBC classes and interfaces? |
|
10. | Describe at least one benefit derived from using applets vs. applications. |
|
11. | What type of constructor can an applet have? |
|
12. | What additional code must be written before you can run an applet? |
|
13. | What’s the difference between JDBC Statements and PreparedStatements? |
|
14. | What character is used as a variable placeholder in a PreparedStatement? |
|
15. | Describe a scenario where you would choose to use a PreparedStatement vs. a Statement. |
|
Answers
1. | - an applet can be run in a browser |
2. |
|
3. | - initialized, started, stopped, destroyed |
4. | - false |
5. |
<applet code = applet_class_name width = width_in_pixels height = height_in_pixels [archive = jar_file_name, [jar_file_name],...] [codebase = base_applet_uri] [object = serialized_applet] [alt = alternative_text] [name = applet_name] [align = applet_alignment] [vspace = vertical_margin_space_in_pixels] [ hspace = horizontal_margin_space_in_pixels] > [<param name = parameter_name value = parameter_value>] ... [alternative_text] </applet> |
6. | - via applet parameters |
7. | - create the database, create one or more tables, define columns for each table and relationships between each table, and establish permissions on the database to the required granularity using the MySQL permissions tables. |
8. |
|
9. | - java.sql, javax.sql |
10. | - easier to distribute than an application |
11. | - a no-argument constructor |
12. | - an HTML page that references the applet code |
13. | - PreparedStatements are created ahead of time with variable placeholders. PreparedStatements are also precompiled. |
14. | - ? |
15. | - When you are repeatedly executing the same statement with different variable values |