Java Eyes

An introduction to your
Integrated Development Environment
(IDE)

Part 5: UML class diagrams

CSSE 120
Fundamentals of Software Development I

Rose-Hulman Institute of Technology
Computer Science & Software Engineering

Winter term, 2003-2004

Learning objectives:

After completing this project, you should:
Be able to: Explain the following concepts:
  • Integrated Development Environment (IDE)
    • Why using an IDE is valuable
  • Compiling and executing a program
  • Compile-time errors and run-time errors
  • Documentation and Javadoc doc-comments
  • Version control
    • Why version control is valuable
Be able to: Do the following in our IDE (JCreator Pro and Tortoise CVS):
  • Checkout and checkin a project in the CVS version-control system
  • Compile and execute a program
  • Navigate the IDE
  • Edit a program
  • Use JDK Help to learn about a class
  • Identify the apparent source of compile-time errors
  • Provide Javadoc doc-comments per the course's documentation standard
Items in red are learning objectives for this part of the project.

Instructions:

Group work

  • Continue working with your partner from JavaEyes, Part 4.
  • But switch roles so that the other person does the JCreator typing in this part.

Final report

  • When you see a question prefaced by
        Question: blah blah blah ...
    put your answer in your final report.

Time limit

  • Most students complete this exercise in 15 to 30 minutes.
  • If you find yourself spending much more time than that on this exercise, please see your instructor.

What you should do:

What you should learn:

Resources:

  1. Question: What time is it now? (Later we will ask you how long you spent on Part 5 of JavaEyes.)
  Put all answers to Question: stuff in the JavaEyesReport.txt file that you found in your docs subfolder.
  1. Question: Examine your relationships-only UML class diagram for JavaEyes. Based on that:

    Which class would you expect to modify if you wanted to make JavaEyes have 3 eyes instead of 2 eyes?

  • How to read and use a UML class diagram
The handout on UML class diagrams
  1. Checkout your JavaEyes project.
  • How to checkout a project
How to checkout a CVS project by using Tortoise CVS
  1. Open your JavaEyes project.

  2. Locate the method or constructor that constructs the two eyes. Prepare for adding a 3rd eye by changing that method/constructor's doc-comment (but NOT its code) to indicate that there is a 3rd eye.

  3. Make the html file containing the modified documentation. Examine the html to confirm that it appears correctly.

  • How to open a project

  • Why documenting your program's code is important

  • Why using the disciplined design method called Javadoc is important
To open a project: Click on the .jcw (JCreator Workspace) file in the project's folder.

Documenting your program's code

The Javadoc program creates HTML files from your Javadoc comments. You can run this program from a MS-DOS Prompt but it is easier to run it from inside JCreator, as follows:

  1. To create HTML documentation from Javadoc comments, select Tools -> Make HTML Documentation.
    • If you make changes to a project's Javadoc comments, recompile the project before doing the above, since compiling saves the files.

  2. To view the HTML documentation, point your browser to the docs subfolder of the project or (more simply) just select Tools -> Show HTML Documentation.

If you lack these items in your Tools menu, then get help now to complete items 9 and 10 in the setup of JCreator Pro.

  1. Partner who made the change to the comment in the previous step: Checkin your JavaEyes project.

  2. Other partner: Checkout your JavaEyes project. Then make the project have a 3rd eye, per the comment that your partner just modified. Make the 3rd eye follow the mouse, just like the other eyes do.

    Test your project. If you do not quickly get the 3rd eye to appear, ask questions!

  1. At the appropriate place in the JavaEyes code, list you, your partner and the existing authors as co-authors in the @author tag of the class that you just modified.

  2. Compile the project.
    • This will save the file with the code, thus saving the changes you just made (otherwise the next step will not notice them).
    • You should routinely compile after changing your code, to be sure that your changes did not introduce errors.

  3. Re-make and re-show the HTML documentation for JavaEyes. Confirm that your newly-typed information (including the authors) now appears in the newly generated HTML.
    • You may need to use your browser's Reload button.

  • How to modify doc comments

  • How easy it is to create HTML documentation from Javadoc comments

  • The value of HTML documentation for your program's code
How to write Javadoc comments
  1. Checkin your JavaEyes project, tagging it
        Stage5
    
    spelled just like that.
  • How to checkin a project (update, add contents, commit, tag)
  • What checking out a project accomplishes
  • What checking in a project accomplishes
  • Why version control is useful
How to checkin a project (update, add contents, commit and tag) by using Tortoise CVS

Summary

  1. Question: Summarize what you have learned from JavaEyes (all parts).

  2. Question: How much time did you spend on Part 5 of JavaEyes?
  1. Close your JavaEyes project in the proper fashion.

This concludes the JavaEyes exercise. Congratulations on your excellent work!

  • How to close a project
To close a project: It is best to leave a "clean slate" when you exit a JCreator project. To do so:
  • Window ~ Close All
  • File ~ Save Workspace
  • File ~ Close Workspace