CS 110 Fundamentals of Computing
Final Project - Updates
Bolker and Rodriguez
Spring 2004

New (alternative) syntax for time availablity commands.


From: Ethan Bolker 
Subject: what should type courses display
Date: Thu, 13 May 2004 15:49:11 -0400 (EDT)

 > From: a classmate
 > To: eb@cs.umb.edu
 > Subject: RE: about redirection testing
 > Date: Thu, 13 May 2004 19:37:25 +0000
 > 
 > I am so surprised to got a question of your example. In your course list you 
 > display name, time and capacity, but I remember that you let us show the 
 > enrollment of the last column instead of capacity. Which one is you 
 > required?
 > 
 > ># name  time  capacity
 > >cs110-1	MWF 10	30
 > >cs110-2	MWF 10	30
 > >cs110-3	TTh 7	30

capacity or enrollment or both - all are acceptable.


 > Actually the command also works, is that right? I got the exact output as I 
 > tested it by each single command.
 > 
 > java WISE courses.txt students.txt professors.txt -e< Test.in

A standard convention is that flags to commands start with a '-' and
come before the other arguments.


From: Ethan Bolker 
Subject: about redirection testing 
Date: Thu, 13 May 2004 15:16:42 -0400 (EDT)

 > From: a classmate
 > To: eb@cs.umb.edu
 > Subject: about redirection testing 
 > Date: Thu, 13 May 2004 18:57:02 +0000
 > 
 > Hi Prof. Bolker,
 > 
 > I got a question about testing WISE using -e redirection. What is the right 
 > command?
 > 
 > I use java WISE -e < Test.in courses.txt students.txt professors.txt ,  I 
 > only got the welcome message and then  my program crashes.
 > 
 > And I use java WISE courses.txt students.txt professors.txt -e< Test.in and 
 > it seeems there is no response.
 > 
 > I am worry about it. My program works well, but if I can't get it right. It 
 > will give you lots of trouble to test it and I will lose some points.

java WISE -e courses.txt students.txt professors.txt < commands.txt

where commands.txt contains

      # test WISE
      type courses
      exit

should produce output like this (exact format not required)

WISE> # test WISE
WISE> type courses
# *** CS110 WISE ***
# List of courses
#
# name  time  capacity
cs110-1	MWF 10	30
cs110-2	MWF 10	30
cs110-3	TTh 7	30

WISE> exit


From: Ethan Bolker 
Subject: same WISE name?
Date: Wed, 12 May 2004 07:43:27 -0400 (EDT)

Two students can't have the same name, or the same id.

Here's a strange idea that we will assume *won't* happen:
One student's _name_ is "123" while another student's id is 123? 

 > From: a classmate
 > To: Ethan Bolker 
 > Subject: wise spec
 > Date: Wed, 12 May 2004 06:11:50 -0400
 > 
 > after spending quite a while on various error-handling code, i realized 
 > that by
 > 
 > Note that students and professors (and even courses) might have the same 
 > name
 > 
 > on the wise page you meant that a student may have the same name as a 
 > professor or a course, not that two students may have the same name (or 
 > two professors or two courses, for that matter). i'm probably the only 
 > one who thought this, but i just thought i'd point it out.


From: Ethan Bolker 
Subject: about duplicate entry in courses.txt
Date: Tue, 11 May 2004 12:35:06 -0400 (EDT)

That will not happen in the files we test with - they are guaranteed
to have good syntax. 

You can check for this if you like, and decide what your WISE should
do if you find it. But it's probably better to spend your time
polishing the required parts of the project.

 > From: a classmate
 > To: eb@cs.umb.edu
 > Subject: about duplicate entry in courses.txt
 > Date: Tue, 11 May 2004 06:57:31 -0700 (PDT)
 > 
 > Dear Professor,
 >  
 > If in the courses.txt file, we see two courses with the same name, should we allow overwriting or gives out an error message?
 >  
 > For example,
 >  
 > cs110 MWF 10  30
 > cs210 MWF 5   30
 > cs110 MWF 8    30


From: Ethan Bolker 
Subject: student ID
Date: Fri, 7 May 2004 10:56:02 -0400 (EDT)

 > From: a classmate
 > To: eb@cs.umb.edu
 > Subject: student ID
 > Date: Fri, 7 May 2004 06:29:08 -0700 (PDT)
 > 
 > hello Prof. Bolker,

 >  I was going through the partial solution you have posted, and
 >  there I noticed that in the Student class, you have declared
 >  studentID field as String. According to project specs. it was
 >  mentioned that studentID be a three digit integer, though it was
 >  also mentioned that input and output should use the String
 >  representation for it, so can I declare the studentID field as
 >  int.

You can save the ID internally as either a String or an int. I might
switch to an int for my wise1.

 >  One more question, how much stuff should be written in the memo
 >  for wise1. Do we have to mention only the things we have modified
 >  or developed since submission of wise0, or a brief description of
 >  the project as a whole.

The new memo needs only a brief summary of where you started (from
wise0). Then discuss the new pieces.


From: Ethan Bolker 
Subject: Re: alternative syntax for time commands in WISE
Date: Fri, 7 May 2004 08:23:24 -0400 (EDT)

 > From: a classmate
 > To: eb@cs.umb.edu
 > Subject: Re: alternative syntax for time commands in WISE
 > Date: Thu, 6 May 2004 17:27:02 -0700 (PDT)
 > 
 > hello Prof. Bolker,
 > 
 >  for the available command of professors at specific time, should we
 >  display all the Professors who are free at that time or just those
 >  Professors whose teaching load is not reached, and who are also free
 >  at the specified time, like in case of courses, it shows only the
 >  open courses.

It makes sense to display only those professors available at that time
who can still be assigned a course. 

 >  Secondly, I had already written all the three commands, courses,
 >  professors and students, and all of them seem to work properly, do I
 >  need to change them and do this alternate syntax for time commands,
 >  or keep them and mention it in memo that I had done time commands as
 >  was mentioned in the old version of WISE.

No need to change to the new syntax if the old one is done.



From: Ethan Bolker 
Subject: command in wise
Date: Thu, 6 May 2004 15:54:59 -0400 (EDT)

The more I look at the syntax for the last three wise commands in the
sample the less I like it.

Here is what one of the confusing lines really means.

I may design an alternative syntax.

 > From: a classmate
 > To: eb@cs.umb.edu
 > Subject: command in wise
 > Date: Thu, 6 May 2004 07:02:09 -0700 (PDT)
 > 
 > 
 > I have a quick question about the command: students studentName
 > time
 > 
 > If we type in "students jim MWF 10", what should WISE output,
 > assuming that jim is a student who has a MWF course at 10?
 > 
 > Also, what should it output if he doesn't have a course at that time?

>From the web page: 

WISE> students studentName|ID time        # times free for specified student

So 

WISE> students jim time 

should tell the times when jim does not have a class.

WISE> students jim MWF 10

makes no sense.

From: Ethan Bolker 
Subject: WISE, not Wise
Date: Wed, 5 May 2004 19:59:53 -0400 (EDT)

Make sure the class with main is WISE.java, not Wise.java, so that we
can run your code next week this way:

    java WISE file1 file2 file3

All upper case is a reasonable class name since WISE is really an
acronym, for "Web Information Systems for Everyone".

I haven't taken off any points for Wise.java in this preliminary
version.


From: Ethan Bolker 
Subject: blank lines in input
Date: Wed, 5 May 2004 17:55:42 -0400 (EDT)

 > From: a classmate
 > To: 
 > Subject: Blank line
 > Date: Wed, 5 May 2004 16:18:27 -0400

 > 		In the course of building my classes for courses,
 > professors, and students, I came across a problem that might
 > restrict us in the code we use. Within each class I tried to bring
 > the data, that was not commented out, into a TreeMap using the
 > technique showed on page 218 using a string to hold all the fields
 > until I needed to separate them for a specific use.
 > 
 >        I came across a specific exception when readline was
 > processing the blank line between the commented text, plus header
 > and the actual data.  I believe it was the IOException.
 > 
 >        I went into the text files and removed the blank line, I
 > reported this in my memo.txt file. What I need to know is, can I
 > delete the blank line or do I have to find another way to hold and
 > parce the data?
 > 
 >  I will look forward to your answer.

Removing the blank line from your input files was a good thing to do
in order to test what you have, but it's not a viable long term
solution. 

Look to see how the Juno Shell handles blank lines, and copy that idea.

From: Ethan Bolker 
Subject: wise0
Date: Tue, 4 May 2004 18:23:16 -0400 (EDT)

You can do the development in any order you like. As long as you show
progress and your memo shows that you understand what's done and
what's still to do you won't lose points.

A professor can teach as many courses as his/her teachingLoad
allows. Two professors can't teach the same course. Assigning a
professor to a course that's already being taught by someone else
overrides the previous assignment (be sure to adjust the load and
schedule of the professor who's no longer teaching that course.) 

 > From: a classmate
 > To: rmenard@cs.umb.edu
 > Cc: eb@cs.umb.edu
 > Subject: wise0
 > Date: Tue, 04 May 2004 21:20:40 +0000
 > 
 > Hello,
 > 
 > I got lots of questions here. Is is ok to have one professor teach two
 > courses in our stupid WISE system? Is there only one professor for one
 > course? (I guess the answer is yes of this question). If a professor
 > tries to assign a course which has already been assigned, what should
 > the program do? Overwrite the previous one, or display a message
 > showing this course has already been assigned.
 > 
 > Since I didn't work on the initializing the list frist, so I have
 > no right output by now.  There are NullPointerException of
 > course. But I think I am dealing with the command and other classes
 > well.  Is that ok for this WISE0? My thinking is that some students
 > like to do this part first and some other students like to do
 > another part first. So if some of them worked hard on building the
 > firsts, they may probobally get some output now.
 > 
 > I am trying to say this in memo. Will I lose losts of points this time?
 > 

From: Ethan Bolker 
Subject: final project weight
Date: Mon, 3 May 2004 12:32:04 -0400 (EDT)


 > How big part of our grade is it?

Probably something like 2-3 homeworks, since it's 2.5 weeks work.

From: Ethan Bolker 
Subject: final project input file parsing
Date: Fri, 30 Apr 2004 14:10:11 -0400 (EDT)


 > From: a classmate
 > To: eb@cs.umb.edu
 > Subject: final project
 > Date: Fri, 30 Apr 2004 10:44:31 -0700 (PDT)
 > 
 > I have got a question of validating the data in the text files that
 > are arguments to the java command lines. Like in case of the first
 > file (courses), if in a line there is only course name or may be
 > course name and meeting time, then should we raise an exception or
 > just quitely dicard the record and move to the next line.

 > My next question is about the meeting time (TimeOfDay object), if
 > someone enters a day or time other than is allowed, should the record
 > of data in the particular line be discarded as a whole and move to
 > next line without informing the user or raise some type of exception?

Spend your error handling time dealing with user errors in the WISE
input loop. 

You should do only minimal error checking on the three input files. If
any line is bad for any reason just print it to System.err with a
message, ignore it, and continue file processing.

From: Ethan Bolker 
Subject: enroll command
Date: Fri, 30 Apr 2004 15:53:28 -0400 (EDT)

Yes

 > From: a classmate
 > To: eb@cs.umb.edu
 > Subject: enroll command
 > Date: Fri, 30 Apr 2004 12:21:50 -0700 (PDT)
 > 
 >  Should a student be allowed to enroll to a course which is not
 > assigned to any professor.



From: Ethan Bolker 
Subject: final project clarifications
Date: Sat, 1 May 2004 08:29:27 -0400 (EDT)


 > From: a classmate
 > To: eb@cs.umb.edu
 > Subject: final project clarifications
 > Date: Fri, 30 Apr 2004 17:24:28 -0700 (PDT)
 > 
 >  have got a question about the students command.
 > WISE> students studentName/ID time 

 > I am little confused about the arguments, will the user after
 > typing students will enter student name or ID and then just the
 > word time. for ex.  
 > WISE> students fred time

 > Same for other two commands (professors and courses) for ex. should
 > the command be

 > WISE> professors MWF 10 
 > and the same for the other.

Yes.

 > Have also got a question on type command:
 > type courses 

 >whether it should display only the course names or other details of
 >the course as well.

It should show name, time, number of empty seats for each course -
just like the input file courses.txt (but with available seats rather
than enrollment limit).

 > About tokenizing of the lines in the input files (java command line
 > argument) and setting the system list classes, is it ok if we do
 > that part in the individual List classes instead of doing it in the
 > WISE class.

That's a design decision that's up to you. Figure out which way is
better and why.

 >  In the command
 > WISE> courses time    # open courses at specified time

 > what is the word "open" mean, do we have to display all the courses
 > whose meeting time is the time specified by the user or only those
 > courses whose max. enrollment capacity is not reached yet and also
 > have the same meeting time as entered by the user.

All courses at the specified time whose max enrollment capacity has
not been reached - imagine you are a student looking to see what's
available MWF 10.

Back to the original specifications.