main
August 27th, 2008    

CIS 26 3.0 2814 EW6
Main
Files
Syllabus
Links
Homeworks

UPLOAD PROJECTS

Notes
0001

PDFs
Intro
aList 20080213
LinkedLists
Howdy 20080220
Trees
Inheritence
notes20080220
notes20080227
notes20080305
notes20080312
notes20080319
notes20080402
notes20080409
notes20080416
notes20080430
notes20080507
notes20080514

Homeworks

HW1: Write a ``Hello World'' program. Obviously this homework isn't `just' about the hello world program. It's about downloading Java SDK, from http://java.sun.com, installing it, setting up your environment (ie: path), and then being able to compile and run the simple Hello World program.


HW2: Implement an Array based list (ability to add/remove objects from beginning/end of the list). You should use similar style as the array based stack/queue in the class notes.


HW3: Look though the aList.java (linked on side), and implement the `splice' methods (they're empty with a short comment about what they need to do). Your splice should be functionally similar to: http://www.perl.com/doc/manual/html/pod/perlfunc/splice.html Also test the code (ie: we never actually tested it in class).


HW4: 1st part: Implement the splice functions for the linked list (in class notes). Sorry, apparently I didn't save the code we did in class. 2nd part: Add a line(..) function to Howdy.java file. That's the one that has circle already. Add a linke to ``draw'' a line from first point to 2nd point.


HW5: Write a calendar program. Your program will ask a user to enter year and month, and output (to standard output) the calendar for that month/year. Ensure to properly handle leap years, etc.


HW6: Write a program that accepts a number as command line parameter, and outputs the number in words, ie: you enter ``1238487'', and your program outputs: ``one million two hundred thirty eight thousand four hundred eighty seven''. For extra credit (+5 on next quiz), also do the reverse.


HW7: Write an applet to do the coolest thing you can think of. ie: something that will make most folks say ``wow'' when they see it. Bring the applet to class.


HW8: Modify the class notes (notes 20070319) to move objects after they're selected. You will need to modify the "mouseDrag" function. If state is "selected", and mouseDrag is called, then move the currently selected object (if one exists) by the amount that represents the difference from the last x,y mouse location. Also, do quiz 20080312. All the quizes can be found here.


HW9: Find a book chapter or a website that has examples of Socket programming in Java. Compile and test the sample client and sample server code that they provide. Submit that code. Note that the basic code should be ~20 lines long for client and server---don't search out anything too complicated. Next class we'll go over this, and incorporate the code into our game. This weekend I'll also upload the quiz to be submitted next class.


HW10: Write a web page grabbing program in Java. Your homework will accept a URL at command line, ie:
java PageGrabber http://www.google.com/
Your program should use the java.net.Socket class to connect to the server, send ``GET / HTTP/1.0\n\n'', and then dump whatever it recieves back to standard output (which will be the HTML for the page).


HW11: Write a very simple web-server. This will be the reverse of what you did in HW10: your program will wait for a connection, when it gets ``GET / HTTP/1.0\n\n'', it will dump the contents of ``index.html'' as the output. Take a look at: http://www.theparticle.com/cs/bc/perl/notes0010.html for what a valid response (and request) looks like.


HW12: Create a program that handles `Contacts' (ie: name, email, phone). Your program must use a relational database (such as MySQL, PostgreSQL, SQL Server, etc.). It cannot use a plain file. Your program should have a command line interface, where user types in commands. Commands should include: adding a contact, finding a contact (by name, email, phone), removing a contact, updating a contact. Your program will read the command, translate it to an appropriate SQL statement, and talk to the database. You have enough details of how to connect and send queries to the database in the class notes.


Note: All homeworks are due on the day of the Final exam.




































© 2006, Particle