Date: Thu, 17 Feb 2005 18:08:23 -0600 (CST) From: Mark Jacobson To: Patrick Henry Subject: Re: final project Samuel, It am looking for the handout, but all it had on it besides the details at the web site (copy of former email is there), is 1. Take the random access file created by the previous project, and do the following to that set of 55 records that are stored in those 11 buckets: 2. Create a GUI (graphical user interface) on a Form that allows the following 3 types of transactions to your random access file: A = Add transaction, to add a new student to the random access file. The logic for Adding a new student to the Random Access file will be something very similar to the last project, except here you are NOT reading in a file consisting of 30 or 40 or 55 records to be added to a RANDOM ACCESS file that you have created previously by initializing it to 11 buckets, with each bucket empty (recordCount = 0 and overFlow = False and studentsString = "" (null string). But the logic of adding ONE new student in an interactive Add transaction to a file which already has SOME records in it, is basically identical. C = Change transaction, to modify a student record in your random access file. What was the only type of change we decided could occur? I believe it was change of GPA, right? You have to find the record, breaking it apart from the other 0, 1, 2, 3 or 4 records it is sharing a bucket with, right? Then you have to separate the record into separate fields, if you did not do this anyway to find the STUDENT ID NUMBER. In any case, now that you have the GPA field separate, you can set it to the new and CHANGED GPA, and then rejoin the fields back together, and rejoin this student record back together with the other 0, 1, 2, 3 or 4 records is shares its bucket with. After that you write the entire random access record (the BUCKET, which is one of the eleven buckets) back to the random access file. Change transactions accomplished.... D = Delete transactions. Find the bucket, and find the record for the student you have specified for DELETION from the database and then rewrite the studentsString back withOUT that delete student. Subtract 1 from the studentsCount for that bucket. Leave overflow as TRUE, if it was TRUE (unless you decided to try the challenging but not required additional task of readjusting the random access file whenever room is made at a bucket that had OVERFLOW = TRUE. You can add an "examine student record with ID number someID" operation into your application, if you wish. That way you can see if the newly added record is there, and if old records are still there, even though another record in the same bucket got deleted.... Or, you can feel free to add an "show me the bucket" option, where you can just look at the contents of a bucket, and specify any value 1, 2, 3, 4, ..., 11 and then see in a Label or in a Textbox, the entire: i. unformatted string, and perhaps also the concatenated count you have in the studentsCount for the bucket: (0, 1, 2, 3, 4 or 5), and perhaps a message about the overflow bucket, or ii. formatted string, to see all the formatted 0 to 5 logical records info that is in it, along with messages about the overFlow Boolean and recordsCount Integer variables. Hope this helps... I ended up doing lots more than telling what the assignment is and that you have to have A, C and D (Add, Change, and Delete) transactions interactively from a Form (GUI Graphical User Interface ala VB .NET) that allows operations on the random access file. The rest of the specifications for what to turn in are already posted at the web site in several former email notes, etc. Mark On Thu, 17 Feb 2005, Charles Babbage wrote: > Can you post the specifications of the final assigment on the website. I > can't seem to find the handout. > > Thanks > Chuck