Results 1 to 2 of 2
  1. #1
    sehudson's Avatar
    sehudson is offline Senior Member
    Join Date
    Mar 2010
    Posts
    354
    Rep Power
    5

    Default Help Testing My Homework Code

    I have the following homework assignment:

    Implement a matrix abstract data type which doesnt allocate memory for 0 values. This is useful for sparse matrices, where many of the values in the matrix are zero. Use linked lists to implement the matrix class.

    I made a very crude test case to test my solution: Basically I need for there to be a file called "file.txt" at the root level of your C: drive and the file will look like this:

    0 0 0 9
    1 0 0 0
    2 0 0 0
    1 0 0 0

    basically representing a sparse matrix. Per the assignment, we were supposed to iimplement a LinkedList for our MatrixClass, so I tried to do that (hopefully). So when you run my program, it will ask you to input 2 numbers. You can put in any 2 (from 0 to 4) but the idea is that you are going to get back the node value of an element in my LinkedArrayList. So for instance, in the example above, if we wanted to get the 9 value sent to us, when you run my program, put in '1 1', as we want the first linked list, and the 9 is going to be the first value (node) in the linked list because everything preceding it in its row is 0. If we wanted the 2, you put in '3 1', etc. I just want to see if I could get some opinions on if I'm taking the right approach.

    Thanks
    Last edited by sehudson; 03-01-2011 at 07:24 AM.

  2. #2
    sehudson's Avatar
    sehudson is offline Senior Member
    Join Date
    Mar 2010
    Posts
    354
    Rep Power
    5

    Default

    heres the jar. Had to save it as .txt to upload
    Attached Files Attached Files

Similar Threads

  1. Testing if it is an Int and if not ask again
    By Alexander_003 in forum New To Java
    Replies: 2
    Last Post: 11-27-2010, 12:09 AM
  2. Testing on ME Emulator
    By phams in forum New To Java
    Replies: 3
    Last Post: 06-16-2010, 04:02 AM
  3. Emulator Testing
    By phams in forum Sun Java Wireless Toolkit
    Replies: 0
    Last Post: 06-15-2010, 11:33 AM
  4. Testing JUnit PDE with Ant
    By keynan in forum Eclipse
    Replies: 0
    Last Post: 02-14-2008, 11:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •