COMP204-07B Assignment 5

An Editable Table of Doubles backed by a RandomAccessFile

Your task is to implement a program, that reads in from a binary
file "spreadsheet.bin" two int values numberOfRows and numberOfColumns, 
plus numberOfRows*numberOfColumns double values, and displays all values
using a JTable (of dimensions numberOfRows by numberOfColumns)  
where all entries are defined to be Doubles.

Simply use "col1" up to "colN" as column headings for your table.

Hardwire the fileName "spreadsheet.bin".

Make sure only Doubles will be accepted when editing any cell. 

Whenever a cell entry is modified, the respective entry in
RandomAccessFile must be immediately updated as well.

What to submit:

One java file containing all you code.
Document your code well.
Use the javadoc @author tag to give your name and ID!

As always, assessment will be based on the following criteria:

  1. Functionality
  2. Reasonable clarity and style of programming.
  3. Reasonable documentation;

Here are a few hints:

  1. review RandomAccessFileDemo and RandomAccessFile javadoc
  2. review JTable demos, especially the one using explicit TableModel
  3. ints take 4 bytes in Java, doubles take 8 bytes
A sample spreadsheet.bin