Chapter 0 : Computers, Objects, and Java

Ch 0 Lab: Browsing for Java

Authors: Ralph Morelli & Bronzell Dinkins
Trinity College, Hartford, CT
For use with Chapter 0


Objectives

The objectives of this lab are:

Browsing the World Wide Web.

Start your lab computer and locate and start a Java-compatible web browser on it (Internet Explorer, or Netscape, or Safari, ..)

Exercise 1

To do:. Here are a number of links to try during this lab session. To try a link, click on it ONCE -- Don't double click!

Exercise 2

  • To give your browsing some sort of purpose and direction, find answers to the following questions concerning computer crime. You may wish to use the Google website http://www.google.com to research your answers. Type your answers into a text document named Lab0Answers.txt using NotePad or SimpleText or some other text editor. SimpleText is located in the Applications folder on the Desktop.
    1. Define and distinguish between the following types of computer crimes:
      • computer virus:
      • computer worm:
      • spyware:
      • phishing:
      • Trojan horse attack:
    2. Give three examples of actions involving computing resources that would violate policies set forth at your college.

    Downloading a Java Applet

    One attractive feature of the Java programming language is that it is possible to write platform independent programs -- i.e., programs that run on Macs, Windows or Unix computers. Another nice feature is that one can write applets, which are programs that can be embedded within a Web page. When you run an applet, its bytecode is downloaded across the Internet into your browser. Assuming your browser is equipped with the appropriate version of the Java Virtual Machine, it will then interpret and execute the applet's bytecode.

    Exercise 3

  • To do: Solve the Cryptogram of the Week. http://starbase.trincoll.edu/~ram/cryptogram/index.html Include the answer to the Cryptogram in your Lab0Answers.txt file.

  • To do: Download one of the Java Source Code files from the author's Java games site. http://starbase.trincoll.edu/~jjjava/games Select Simple Riddles(Chapter 2) link and on the new we bpage click the Riddle.java program. From the browser menu choose File/Save As and save the program to your desktop.

  • To do: Print a hard copy of the Riddle.java program.
    Include the text of the Riddle.java program in your Lab0Answers.txt file.
  • Exercise 4

    Try visiting the following Java related sites.
  • Sun Microsystem's java site has an on-line reference for Java users: http://java.sun.com/reference/api/index.html
  • On the above page, use the link to the API specifications for J2SE 1.5.0 to access the specifications for Java 5. In the panel on the lower left, scroll to the Applet class. Click and examine the specifications of the Applet class.
  • Check out http://starbase.trincoll.edu/~jjjava/cyberpet/, to view some applets developed for Java, Java, Java Edition 2.
  • Here are some Java 1.1 Examples
  • Lab Checkout

    Submit your file Lab0Answers.txt in the manner specified by your instructor.

    You're done!. Maybe in a few weeks one of your applets will be up on these sites!!