Programming for the WWW
G22.3033-009
Fall 2003


CIMS CS Department

Home
Class Description
Schedule and Slides
Grades
Homework
Books
Class Mailing List
Contact Information
Req'd Downloads
Links

All grades submitted up to this point. (01/03/2004 )
Please send an email to your TA if you have submitted a HW that is not recorded.

Grades have been appropriately curved. 
PLEASE DO NOT ask me to lower the curve because your score is just below the threshold.
I have adjusted the curve down, already and will not be lowering the curve any further.

Curve:

Grade Total Adjusted Score
A > 89
A- > 87
B+ > 85
B > 80
B- > 75
C+ > 70
C >65
C- > 60

 

 SID Points Homework # 1
Comments
Points Homework # 2 
Comments
Points Homework # 3
Comments
Points Homework # 4
Comments
Points Homework # 5
Comments
Homework Total Points Midterm Score of 49 Final Score of 68 Point Total   Final Grade
                                 
0175 4.10   0.00   4.50   3.00   0.00   11.60 43 46 65   C
0213 4.80 late submission -1 point 4.30 No instructions, No comments; late submission -1.5 0.00 14 days late     5.80 No instructions; no source files submitted. 14.90 47 59 78   B-
476 5.6 inventory not updated in file. 6   5.5 no sync, busy wait 6   6   29.10 48 64 96   A
0615 6.00   5.80 No instructions. The files are not submitted under the correct dirs. 5.70 Tax Computer:
The code that decreases the counter of the in-use threads should be synchronized!
WebApp( just comments):
"Return to Customer Info Dialog" link should be relative: should not use hardcoded host name and port number. Instructions should include the web application URL.
5.50 Hardcoded http://localhost:8081/servlet/GVBooksOnlineServlet. 6.00   29.00 48 65 97   A
0687 5.50   5.90 I am getting Connection refused exception if I try to calculate tax for the second request. 4.50 Tax Computer:
In your case, a new thread gets created before you even check if it can get created. You would be able to avoid the issue by placing the check inside main(). The code that decreases the counter of the in-use threads should be synchronized! Almost no comments in TCPTaxComputer.java
Web App:
Load button is not implemented. Hardcoded URLs.
6.00   5.90 The servlet name to which you submit the request is misspelled. 27.80 45 53 87   B+
1198 6 forgot to print in stock, good work overall 5.6 TCPTax computer quits after computing Tax once 5.1 good work with TCPTax., no load, hardcoded stuff. 4.5 incorrect port (u use 8081 and say that u use 8080 in readme!), inconsistent filenames of jsp, no custinfoservlet! 6   27.20 48 55 89   A-
1227 5.90   5.30 No install instructions. If I try to recalculate the tax after adding each item to the cart, I'm getting java.io.EOFException every second time. No input files are submitted including inventory. Different non relative dirs for inventory and customer. 5.25 Tax Computer:
1) The TaxComputer should not stop(and increase the thread counter) after the max number of threads is reached - it just should refuse that particular connection and continue running.
2) The code that decreases the counter of the in-use threads should be synchronized!
WebApp: Hardcoded URLs.
5.50 Hardcoded http://localhost:8081/Homework/Homework4/CustomerInfoJSP.jsp 6.00   27.95 41 56 86   B+
1486 5.5 overwrite existing cust files, inventory not updated 5.5 TCPTax computer quits after computing Tax once 4.5 hardcoded stuff, incorrect load, incorrect threading, u quit after servicing some requests. 4.55 directly invoking jsp/servlets. Load did not work, one day late 5.5 You publish for every get request. You just need to publish once. 25.55 45 56 86   B+
1534 4.5 inventory does not work, GUI problem when cancelling order, file io not relative 5.25 1 day late, TCPTax exits after calculating once, inventory file path not relative 5.1 no sync, quits if max no of threads reached. 5.5 You are directly invoking servlet. 6   26.35 43 51 83   B
1602 5.6 slight problem with file io, cannot handle preexisting files in the directory. 6   5.3 no sync, busy wait, hard coded stuff 4.2 internal servler error on invoking servlet 5 Error in querying for John Smith. SOAP Exception. 26.10 46 54 86   B+
1618 5.5 not checking if thing is in stock, inventory not updated. 5.5 bug in TCPTaxComputer, no instructions 4.2 hardcoded, no load, incorrect threading, u will quit after servicing numberofthreads. 4.35 internal servler error on loading main jsp, did not load, 1 day late 5.5 Problems Compiling 25.05 42 51 81   B
1621 2.70 late submission - 3 points 3.50 late - 2.5 4.60 Tax Computer:
More code comments( Ex: main() method of TaxComputer). The code that decreases the counter of the in-use threads should be synchronized.
Late:-1
5.75 late: -0.25 6.00   22.55 49 59 87   B+
1827 2.70 late submission -2points 2.20 Did not specify the host name when bounding the InventoryImpl; Problem with some of the TCP requests: Connection refused; Total is not saved into the file; 2 weeks late     0.00 2 weeks late 6.00   10.90 46 59 74   C+
2066 5.7 Good work, bug in customer info, only one customer in a session. 6 nice work. Good design changes. 5.05 1 day late, no load (did u send me wrong file?) 5.2 no load/save. 6   27.95 45 55 88   A-
2207 5.70   6.00 very nice 5.80 WebApp: Hardcoded URLs. 6.00   6.00   29.50 46 63 95   A
2289 5.00   1.90 Compilation problems with rmic Homework. Homework1.hw1.InventoryImpl. OrderDlg does not use Inventory: it just initializes the inventory to an empty array, so was not able to run inventory nor taxComputer; Tax computer does not support multiple requests. No instructions. The input file dirs are hardcoded; No comments. Late -1 4.80 Tax Computer:
You should decrease numberOfActiveConnections when the number of threads in-use decreases and should not stop the execution after the maximum number of threads become active. The calculation of tax should be done on separate threads.
Late: -0.5
5.50 Hardcoded URL "localhost:8081 servlet .." 6.00   23.20 43 51 80   B-
2349 4.60   5.25 Tax is not displayed. Total is not saved in the po file. Not efficient when calculating the tax for multiple items( you just have to calculate the tax on the total, not on each particular item). Code should be cleaner and contain more comments; late -0.25 5.50 TaxComputer:
The code that decreases the counter of the in-use threads should be synchronized.
WebApp: Hardcoded URLs.
5.50 late: -0.5 6.00   26.85 46 48 83   B
2619 4.90   6.00   5.50 Tax Computer:
If you synchronize run(), no 2 threads will be executed at the same time. You just have to synchronize the block where you decrease the counter.
WebApp: Hardcoded URLs.
6.00   6.00   28.40 45 53 87   B+
3006 4.5 5 day late, everything works 5.4 2 day late 2.8 8 day late, busy wait, no sync, no load, sligtly hardcoded URL - it will not always work. 5.2 servlet still runs on 8081!! 6   23.90 47 60 88   A-
3245 5.70   5.80 Totals are not saved into the PO file. 5.50 Tax Computer:
The code that decreases the counter of the in-use threads should be synchronized.
WebApp: Hardcoded URLs.
5.90 No instructions; extra files submitted. 6.00   28.90 49 59 94   A
3318 5.4 hardcoded directory structure (PAINFULL!!), inventory not updated, existing files overwritten  5.9 TCPTax computer throws exception after computing Tax. 4.8 no sync, no load 4.5 4 day late, incorrect port 6   26.60 49 53 88   A-
3931 5.40   6.00 Very nice 6.00 Good work! 6.00   6.00   29.40 45 57 90   A
4231 4.90   6.00 Good work 5.45 2 problems with the loop in the main():
1) Suppose your queue is full and the connections stop coming from the client, then you will not be able to process the requests in the queue even if the threads in the pool are freed since you only pop from the queue when a new client request comes in.
2) There is a potential for loosing a new request when there are items in the queue.
Not possible to specify the # of threads as a parameter to main.
WebApp: Excellent.
Late: -0.25
6.00   6.00   28.35 46 57 90   A
4348 5.5 inventory not updated, no tax displayed, hardcoded fileio 5 3 day late 5.2 no sync, busy wait, hardcoded stuff 6   6   27.70 43 50 83   B
4722         1.6 11 day late, no sync, busy wait, no load, hardcoded stuff 5 2 day late, were supposed to use port 8080 6   12.60 44 50 69   C
4768 6 forgot to print in stock, good work overall 6   5.3 load gives internal server error. 6   6   29.30 49 64 97   A
4809 2.50 late submission - 3 points 5.30 hardcoded dirs; different non relative dirs for inventory and customer( not mentioned in the instructions); late submission - 0.5 5.50 Tax Computer:
The code that decreases the counter of the in-use threads should be synchronized!
WebApp: Hardcoded URL's.
5.50 hardcoded port "8081" 6.00   24.80 47 59 88   A-
4844 5.5 po filename also req from user!, 6 your coding can be better. For example its inelegant to put socket code in action listener function 5.55 1 day late, hardcoded stuff 5 3 day late 4.5 servlet gives internal server error 26.55 47 55 88   A-
4924 5.5 2 day late submission 6 good work. 5.7 no sync 5.5 2 day late 6   28.70 46 61 93   A
5045 5.60   5.50 Very nice!; late -0.5 5.30 WebApp: Hardcoded URLs.
Late: -0.5
5.50 Hardcoded http://localhost:8081/servlet/CustomerInfoServlet 5.90 Submitted with incorrect instructions. No info on what classes to execute, what are the input files, ext. 27.80 48 65 95   A
5815 4.70   5.50 Failure when compiling CustomerOrderDialog. No input files are submitted including inventory. Different dirs for inventory and customer. 5.00 Tax Computer:
The code that increases and decreases the counter of the in-use threads should be synchronized!
WebApp: Hardcoded URLs.
Late: -0.5
5.50 Hardcoded 8081. ServerAddress should be obtained dynamically from the request object! 6.00   26.70 46 59 90   A
6190 5.3 2 day late submission, inventory not updated, saves customer id info betweeen sessions. 6   3.6 3 day late, busy wait, no sync, no load, hardcoded stuff 5.5 2 day late 6   26.40 41 54 83   B
6557 5.80   5.70 Problem with calls to TaxComputer. Program is accidentally hanging due to the infinite loop(never use inf. loops in cases like this). Can be resolved by removing the loop, adding a delay, and flushing the BufferedReader properly. 5.40 Tax Computer:
The code that decreases the counter of the in-use threads should be synchronized.
WebApp: Hardcoded URL.
5.00 Hardcoded port 8081.
You were supposed to serialize the Customer Object. You do not need to encode the Customer information into a string and then serialize the string!
6.00   27.90 47 62 93   A
6609 4.65 late submission - 1/4 point 5.30 Totals are not saved into the PO file; late - 0.5 4.50 Tax Computer:
The code that decreases the counter of the in-use threads should be synchronized!
The condition in the main loop should be numberOfActiveConnections<max_connection; otherwise you allow max_connections+1 threads. Should not evaluate the max_number_of_threads in the loop: just one evaluation at the beginning of the program is enough.
Late: -1
6.00   6.00   26.45 46 55 87   B+
6618 5.2 GUI Problem in order, customerID/filename does not sync, fileio not good. 5.6 bug in Order Dialog, TCPTax throws exception and exits after calculating TAX once. 2.6 8 day late, thread not decremented, hardcoded, no load 5.6 no load 6   25.00 48 54 86   B+
6647 5.60   5.60 the dialog does not get closed after pressing Submit button; no instructions; copy and paste the code for tax calculation in action performed methods- bad style 5.50 Tax Computer:
The code that decreases the counter of the in-use threads should be synchronized!
WebApp: Hardcoded URLs
5.50 No instructions. The input/output files directory hardcoded to \\home\steven\SchoolWork\wwwProgram\wwwProgram\c.. 6.00   28.20 48 58 92   A
6653 5.90   6.00   6.00 Very Nice! 6.00   6.00   29.90 48 62 96   A
6716 5.5 incorrect order save (no customer info with order!!), inventory not updated. 4 2 day late, RMI not done, inventory is being read from local file 3.2 not decrementing thread count, not reading number of thread from command line, no servlet 5 incorrect URL, servlet called on incorrect URL     17.70 46 43 71   C+
6772 5.8 bug in order dialog. Excellent work otherwise, very good design 4.5 5 day late, Nice work with scripts and all. I wish I did not have to take off marks for late submission! 5.25 1 day late, busy wait, no sync 6 (why does it take long to load?) 6   27.55 46 58 90   A
6864 5.5 order file not correct. Rest all works. 4.5 RMI Not done. 4.8 did not decrement number of threads, load does not work 5.1 incorrect URL (using 8081), problem with cust info servlet 0   19.90 45 55 80   B-
6968 6 Good Work!, error if directory has space - correct that 6 Good Work. But your program still crashes if directory has spaces!! 5.5 busy wait, not sync 4.2 internal servler error on invoking servlet 6   27.70 49 61 94   A
7638 4.8 Inventory not working (FileIO Problem), user needs to give customerID 2 No RMI, No TCP 4 did not decrement number of threads, incorrect code, 4 day late 6   6   22.80 41 43 73   C+
7761 5.00   5.80 very good instructions; submit button does not close the dialog. 5.90 Tax Computer:
The way you calculate the # of active sockets is too complicated and slow. You just should increase the number when a new connection is added and decrease it after you finish processing the connection.
6.00   6.00   28.70 47 60 93   A
8370 5 inventory not updated in file, gui problem in order dialog, PO file format not correct. 5.55 1 day late, Exit does not terminate the process 5.7 no sync 4.2 why are your pages so slow?, no save, no load 6   26.45 49 57 90   A
8417 5.30   5.90 No instructions 5.30 Tax Computer:
It is bad design to put heavy code into the constructor. Constructor should only be used for initialization.
You should start the thread within the TaxComputer - it should function as a scheduler( each TaxThread should not have to worry about how many available threads the pool has).
In your case, a new thread gets created before you even check if it can get created. Moreover, if it is the N+1 st thread, it starts executing a loop that does not have any delay and would use up all your CPU time. You would be able to avoid the issue by placing the check inside main().
WebApp: Hardcoded URLs. 
5.30 states.txt is not packaged correctly.
Inconsistent implementation of saveCustomerToFile and loadCustomerFromFile; old non-usable code hanging around.
Hardcoded "http://localhost:8081/customer"
6.00   27.80 48 57 91   A
8834 5.2 inventory not updated, second time order -- buggy, out of stock not checked 4.75 1 day late, No seprate server process, inventory not read by remote process 4.5 incorrect threading, decrement is incorrect. No load 5.5 2 day late 6   25.95 40 43 76   B-
8947 5.50   5.70 Tax is not displayed; Input dir is hardcoded to "/home/jeremyk/nyu.."( not documented) - makes the program non runable 5.60 Tax Computer:
Not possible to specify the # of threads as a parameter to main().
WebApp: Hardcoded URLs.
5.80 OrderBrowser JSP is missing the proper content. 6.00   28.60 47 59 92   A
8951 4.30   6.00   4.80 Tax Computer: There is no limit on the number of threads. Lack of ability to specify the # of threads as a parameter to main(). 5.50 Hardcoded URL to "localhost:8081" 6.00   26.60 45 56 87   B+
9085 6.00   5.90 Very nice. No install instructions, which are needed since you did not use the default class names. 6.00   6.00   6.00   29.90 48 52 90   A
9178 5.7 inventory not updated 5.9 TCPTax computer throws exception after computing Tax. 5.1 no sync, you were better off killing sockets after just one computation of TAX, busy wait. 6   6   28.70 48 56 91   A
9452 6   6   5.3 no synchronization, busy wait, hardcoded stuff. 5.5 incorrect URL (using 8081) 6   28.80 49 63 96   A
9588 5.5 Load file IO Error, Inventory not updated, very good o/w 5.8 Exit does not terminate the process 4.8 incorrect threading, hardcoded stuff 5.5 incorrect URL (using 8081) 6   27.60 45 55 88   A-
9734 5.6 inventory not updated 6   5.5 1 day late, hardcoded stuff - you call GVBooksOnline when u shud be calling homework1.GVBooksOnline 6   6   29.10 44 54 88   A-
9813 5.40   4.80 Nice but Totals are not saved into the PO file; late - 1 3.70 Tax Computer:
The number of threads you have open at a time = the number of active requests. You do not bound the number of threads, you just respond that you are busy on some of them. You should compare the # of threads in use with the MaxAllowedNumber before creating a thread. The code that decreases the counter of the in-use threads should be synchronized!
WebApp: hardcoded URLs.
Late : - 1.5
3.90 The way you choose the directory for input/output files is too complicated. The easiest solution is just use a subdirectory of the current working directory.
You were supposed to serialize the Customer Object. You do not need to serialize the string representation! Late: -1.5
5.00 The servlet does not really call the service to process the requests! 22.80 44 48 78   B-
9885 5.20   6.00 Please, submit the class files next time 5.40 Tax Computer:
The code that decreases the counter of the in-use threads should be synchronized! Why do you need the extra loop in main(): while (numberOfConnections <= maxNumberOfConnections)?
WebApp: Hardcoded URLs.
5.80 Inconsistent file names for load and save a customer object. No instructions on how to test Load button.  6.00   28.40 49 60 94   A
9971 5.30   5.80 Good work, forgot to save the total to the po file. Classpath is the path where .class files used by your program are located; don't use the word for the input files directory. 5.30 Tax Computer:
The code in TaxComputer is impossible to read: a half is commented out!
The code that decreases the counter of the in-use threads should be synchronized!
WebApp: Hardcoded URLs.
5.00 The code that uses the forward method is not used in MainMenue.jsp. You do not really use the RequestDispatcher and forward() method. Hardcoded port 8081. 6.00   27.40 48 55 89   A-

 

 

Home Class Description Schedule and Slides Grades Homework Books Class Mailing List Contact Information Req'd Downloads Links

 Copyright Poelman & Associates, Inc. (c) 2003 
For problems or questions regarding this web contact [ClassWebEmail].
Last updated: 01/03/04.