|
C M S C 2 1 4 C o m p u t e r S c i e n c e I I S p r i n g 2 0 0 2 |
Partially. It will be tested in listFriends and listFriendsIn, but not in list or listFriendsJournals. Thus, the emoticon should print when you have listFriends or listFriendsIn, but ONLY if they are a good friend.
No. You get 70 (actually, closer to 75) if you pass primary
and fail all secondaries, and do "well" on the rest of the project
(you comment your code, you use the proper classes, as described
in the project description, etc) and turn it in on time.
Recall that points are lost on things other than secondary.
It's still possible to lose points on that
Yes, it should print both. You always print followups.
Suppose John is a friend of Fawzi. Then, you wish to
make John a "good friend" of Fawzi. This is how it happens.
John must be added as a good friend of Fawzi, which means,
goodFriend must be true. If goodFriend is false,
then John remains a friend of Fawzi, but NOT a good friend.
Likewise, if John is a good friend of Jan, and Jan adds John
as a friend (but not a good friend), John becomes a friend of
Jan, not a good friend. (Why is this not more obvious to
more people? You can only become a good friend if goodFriend
is true!)
This should help you determine which files to submit.
See the latest updates on the button/text field
specs.
Each article or MP3 posted (and followup) has a unique date/time.
Two abstract entries (article, Mp3, and followup) can be posted
on the same day, but must have different times (see primary input
and output).
Since each article is unique by date/time, you can followup
to anyone's article, Mp3, OR followup. For example, if Fawzi
posts an article on April 1, 2002 at 10:30 AM, then Jan can
followup to this article (at say, April 1, 2002 at 10:45 AM).
Then, John could followup to Fawzi's article or Jan's
article.
When printing articles, print it in "pre-order" traversal. Print
out the top-level article, and any followups to that article (which
means if they have followups, they should be printed as well).
This won't be tested. We will test removing an article with
members who have GOLD membership. The BRONZE and SILVER will
be tested using only add operations.
A top-level posting is posted using postJournal or
postMp3. A followup is posted using followup.
When listing the "N" entries by a person, count only the
"N" most recent TOP-LEVEL postings.
However, print ALL followups to these postings.
When printing the "N" followups of all your friends,
consider all of the TOP-LEVEL postings of your friends
as one group. Pick the "N" most recent TOP-LEVEL postings.
For example, suppose John and Jan are friends of Fawzi. John posts
top-level articles on 8/1, 8/2, and 8/5 (from the year 2002). Jan
posts top-level articles on 8/3 and 8/4. You want to print Fawzi's
friends 4 most recent articles. This should print articles on 8/5 (by
John), then 8/4 and 8/3 (by Jan), and 8/2 (by John).
Thus, you treat their top-level postings as if they
were all by a single person.
Also, print ALL followups to these postings.
In other words, you always print followups in
list and listFriendsJournals.
The format for listFriendsJournals should be
the same as list. Since each journal and MP3
has the name of the person who posted it, it should
be easy to distinguish between who posted what.
Sometimes the compiler complains when you have both a pointer and a
reference in the operator(). So, what you can do is to
just use plain pointers, instead of pointer references.
One solution that seems to work is do combine the two files together.
In your .h file for, say, "Foo", put both the header for Foo
and FooComparator. Here's an example of Foo.h.
Also, place the implementation of your comparator code into
your Foo.cpp file (although that's less important).
Yes, please make that correction.
Please read!
Once you have done the initial tasks, you should do the background
reading, the copy the files from the posting account to your
directory. Also, add in SimpleMap and ArrayList.
Compile the entire directory to create an executable, and input
redirect test.input. Begin to trace the code somewhat
to see what it is doing.
class Foo ; // forward declaration
// #includes here
class FooComparator {
// header for FooComparator
} ;
class Foo {
// header for Foo
} ;
Then, remove anything in your makefile and other files referring
to Comparator.h.
|
See the class syllabus for policies concerning email Last Modified: Thu Mar 14 14:48:28 EST 2002 |
|
|
|
|
|