Java Assignment
CSC339 - Spring 2001
 

1. Purpose

The purpose of this project is to give you a hands-on introduction to some features of Java that make it well-suited for Internet programs: applets, event-driven actions, and inherited GUI classes.

2. Description

Write a Java applet that:

  • displays an order form for some merchandise. You must design the order form and turn in a copy of it for approval before you proceed with the implementation. Each person should design a unique order form. The order form should include a picture of your company's logo.
  • takes the customer's order.
  • writes the completed order to the Java console. (Hint: see instructions on using System.out.println on my web page on Java programming at UNCG.)

  • You are also responsible for implementing a simple web page for running the applet.

    3. Grading

    The grade will be based on these factors:

    a. Program functionality: the program implements the above.

    b. Program quality - The program should
    - perform without errors,
    - be readable and well-documented with comments.

    c. Program originality - All code that is turned in for this assignment must be written by you! Of course, your program may
    use inherited classes that you did not write yourself. However, any source code that is turned in must have been written by you.
    In the submission instructions, you are asked to turn in a signed statement affirming this.

    e. Following submission instructions - You may not receive full credit for not following the instructions given below.

    4. Submission Instructions

    You must submit source code and log and set up a demo directory as described below to receive credit.

    a. Source code (including signed statement): Turn in a printout of your code. The pages should be stapled together. The first page should include (typewritten): the url of the html file that will be used to run your applet(ending in the name /csc339proj.html), your name and the following statement: "I am the author of this code." Then sign your name to the authorship statement.

    b. Log: Turn in a printout of the log produced from running your program that shows a customer's completed order.  Staple it to the source code listing.

    c. Demo directory: Set up a directory named csc339javaproj in your AFS (UNCG's Unix file system) space. Give nlgreen (the instructor) rx (read-execute) access rights to the directory and everything under it so that I can run the applet through a browser such as Netscape by using the url that you gave me in (a), and so that I can copy your source code.
    You must
    1. set the afs acl as follows:
     > cd csc339javaproj
     > fs setacl . nlgreen rli
    Note:  you must set the acl on the directory before you add files to it, or else repeat the process on each file that was in the directory before you did this.
    2. create a publicly accessible web page (named csc339proj.html) for running the applet.  (See how to do this if you don't already have one.)

    The directory should include the following:
    - csc339proj.html: The html file for running the applet. In the html, all references to your files should be relative to the current
    directory so that if your project is moved it will still run!
    - all of your .java and .class files for the applet.
    - You can put your assignment in one .java file (the simplest approach).  However, if you have more than one .java file, you must also include a .jar file created from all of the files and subdirectories that
    would be needed to move your project to another directory. To create a jar file:
    > cd csc339javaproj
    (In other words, go to the directory containing your project.)
    > jar cvf username.jar *
    (Replace "username" with your username.) The above creates a jar file named with your username
    ending with ".jar". The jar file contains all files and directories in the current directory. Jar files can be
    copied or emailed. To "unpack" a jar file, someone can do this:
    > jar xvf username.jar
    - Note that your project may go down in UNCG History if it is good enough! It may be used as a demonstration to future classes
    or added to the Mathematics Department Applet web page!

    5. Due date: see the calendar on the course web page.