Professional Documents
Culture Documents
You will be given a sample of data from six people who took the following surve y:
Mutiple Choice Questions: (choose the one best answer that applies)
The data from filling out the surveys are recorded in two files, one is male.txt and the
other is female.txt. Each line of the file contains one record. An example of a record
is shown below.
John Doe 2 4 4 1 3 4 2 1 2 0 4 0 2 0 2 0
Each record will start with a persons name (always a first and a last name). The eight
numbers after the name represent the seekers profile, while the last eight numbers
represent the profile of that persons ideal mate.
Your algorithm should attempt to match up each female with one male in a way that
results in the highest compatibility. Its okay if not everyone is matched, but your
program should output a list of names of people who were matched with their partners,
and a list of people who were not matched.
Please think of a design that will pair up these people. In your design, you do not need to
implement anything. However, you should list what data fields and methods are in each
Assignment
1. Class Design
Come up with a list of all the classes you think you will need to implement the dating
service. Include a list of all the data members and all the methods you think you will
need. Each data member and method should be prefaced with a short comment
describing it. Write these in .java files. (Your .java files do not need to compile.)
2. Compatibility Algorithm
Write up a detailed description of the algorithm you will use to evaluate compatibility of
potential mates. (You probably will assign some kind of compatibility score to a potential
pair.)
3. Matching Algorithm
Write up a detailed description of how you will match people. You should strive to pair
up females with males whose profiles are as compatible as possible (and vice versa).
Your algorithm doesnt necessarily have to arrive at the optimal solution, but it should try
Provide us with one line of sample data for the survey (above). You dont need to use
your real name, and your profile does not need to match your true interests. But it must
follow the format described above: a first name (no spaces), last name (no spaces) and
sixteen numbers that correspond to answers to questions in the survey. Put the data into a
file male.txt if you want to be a male, or in a file named female.txt if you want to
be a female. Please just provide us with one or the other (not both) and upload to your
1.00 Homework locker. We will use your data for problem set 10, so dont give out any
information you dont want to share with the rest of the class (i.e., your real name).
You can write your descriptions for (2) or (3) in eithe r in a .java file, text file, or
Microsoft Word file. As always, you will need to print out all your files and submit them
to the 1.00 Homework locker electronically.
Place a comment with your name, username, section, TA's name, assignment number,
and list of people with whom you have discussed the problem set on ALL files you
submit.
Collaboration
For this problem set, you may work together with your assigned partner in the class. If
you choose to work with your partner, you must include both of your names on your
submission. (If you have different TAs, be sure you write both TAs' names on your PS.)
You will not be allowed to add the name of your partner after submitting your problem
set. Only submit the problem set ONCE (choose either person). Both you and your
partner will get the same grade. Only 1 or 2 member teams, no exceptions.
Electronic Turnin
Use SecureFX (or another secure ftp or secure shell program) to upload your problem set
to your 1.00 homework locker.
Detailed instructions of how to upload are on the course website.
Since your problem set is due at the beginning of lecture, your uploaded problem should
have a timestamp of no later than morning on the due date.
Penalties
Missing Hardcopy: -10% off problem score if missing hardcopy.
Missing Electronic Copy: -30% off problem score if missing electronic copy.
Late Turnin: -30% off problem score if 1 day late. More than 1 day late = NO
CREDIT.
If your problem set is late, or if a professor has granted you an extension in advance, do
not submit a printed copy of your problem set.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the United States and other countries.