Instructions
Practice Problems
Problem 1:   hash  Code and equals
Problem 2:   Visitors
5.3.5

Assignment 7

This is the first part of assignment 7. It should be straightforward, as it asks you to finish the work you have started in the lab.

You will submit it separately form the second part, as the second part requires that you provide complete JAvadoc documentation and WebCAT will check your compliance.

Goals:
  • Learn to override the methods equals, hashCode, and toString.

  • Learn to define and use visitors.

Instructions

The names of the projects and some of the project files must be exactly the same as specified in the assignment. Failure to do so makes it impossible for the graders to run your submission and results in immediate loss of at least 50% of the homework credit.

Make sure you follow the style guidelines for code indentation.

You will submit this assignment by the deadline using the Web-CAT submission system.

With each homework you will also submit your log file named pairxxx.txt where you replace xxx with your pair number.

On top of every file you submit you will have the names of both partners, and the pair number.

The .txt file will be the log of your work on this assignment. Each log entry will have data and time, who was present (one or both of the partners) and a short comment decribing what you were working on.

Submission Details:

Due Date: Friday, November 15, 10:00 pm.

Practice Problems

Work out these problems on your own. Save them in an electronic portfolio, so you can show them to your instructor, review them before the exam, use them as a reference when working on the homework assignments.

Problem 1: hashCode and equals

Finish the Part 1 from Lab 10.

Hand in the code from the lab that includes the implementation of the following methods (with the appropriate test, of course!):

Problem 2: Visitors

Finish the Visitors section from Lab 10a.

Hand in the code from the lab that includes the implementation of the following methods and classes (with the appropriate test, of course!):