HW5: TLA*--XML, SQL, FAT, WIN

CS 321 Homework, Dr. Lawlor, 2006/04/19.  Due Wednesday, April 26 at 5pm.

Here's a series of problems I'd like you to complete and turn in via BlackBoard.

Hint: read the lecture notes.
  1. This file contains malformed XML, which you can verify by looking at it in your web browser.  Make it well-formed, and turn in your well-formed version as "problem1.xml".  (Amazingly, you don't have to write *any* code for this!).
  2. Create a database Table containing at least the Fields "Name", "Date", and "Grade".  Add a Row for yourself listing your Name, any reasonable Date, and your Grade.  Nowdisplay the Row. Turn in a screenshot called "problem2" (in any graphics format) of the SQL command and output generated while adding and displaying your Row.   You can use any database system (MySQL, Microsoft Access, Oracle, IBM DB2), but you MUST display the SQL commands.  I recommend using the MySQL virtual machine in the lecture notes.  (You don't need to write any code for this one either.)
  3. Here's a corrupted FAT32 filesystem.  Because of the corruption, the directory "sub" seems to contain an infinite number of files with the same names.  The FAT filesystem dump utility (Directory, Zip, Tar-gzip) thus hangs when extracting files from this filesystem--try it with "fat -p -v 2 bad_fat32.img".   Change the filesystem dump utility to detect and work around the kind of error found in "sub" and read the rest of the filesystem properly.  You should get a file named "out/finished.3ok" once you've fixed the filesystem dump program.  Turn in your modified "fat.cpp" and "fat_layout.h" source code files.
  4. Here's a tiny Windows program.  Use the print() facility to display the (x,y) coordinates of the mouse when the left mouse button is clicked.  Your program must not print() anything while the mouse is just moving around, or in response to any other mouse button.  Turn in your modified "test.cpp" file.
* TLA == Three Letter Acronym.

Open-Ended Problems

Half your homework grade is to complete half of the open-ended problems (miniprojects) throughout the semester.  I'll try to offer at least one open-ended problem with each week's homework.  If you complete more than half of the open-ended problems through the semester, I'll take the half with the highest grades.

Turn in open-ended problems by naming the source code "problem.cpp" and submitting it on blackboard as HW5_O.  HW5_O is due Wednesday, May 3 at 5pm.
  1. Write a GUI program that does anything not covered in class using the Windows API.  For example, you could open and read a file using the Windows APIs, load and change the cursor, show and hide the window, etc.
  2. Write a program that selectively reads files from a FAT32 filesystem.  You can even hardcode the filename to read.