Results 1 to 7 of 7

Thread: testing program

  1. #1
    chrisbremen is offline Member
    Join Date
    Nov 2008
    Posts
    7
    Rep Power
    0

    Default testing program

    Hi I am pretty new to java. I know the basics and i have an idea for a program that i want to create i just dont know where to start.

    I want to create a program that allows me to give tests to my class and when they are done they click submit and it automatically grades it for me then sends the grade to my gradebook database.

    Any help on where i should start for this project would be greatly appreciated.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    The first thing you must do is to break this big problem down into a lot of little problems, then solve each little problem one at a time. How does that old saying go? Every journey of 1000 miles starts with but a single step.

  3. #3
    Nicholas Jordan's Avatar
    Nicholas Jordan is offline Senior Member
    Join Date
    Jun 2008
    Location
    Southwest
    Posts
    1,018
    Rep Power
    8

    Default

    Do you know what an array is or an ArrayList?
    Introduction to Programming Using Java.
    Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor

  4. #4
    chrisbremen is offline Member
    Join Date
    Nov 2008
    Posts
    7
    Rep Power
    0

    Default

    yes i know what an array is.

    i was planning on sitting down and drawing out what i want in the program(visually) then figuring out what exactly i wanted it to do (i also wanted to put in a algorithm so that each test is different, because the students will be sitting right next to each other and i dont want them to be working on the same test.)

  5. #5
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    I would work on the program's "model" separate from it's "view". The exams would be the data and obviously would be separate still. I'm not sure if you are going to want to use a full-fledged database implementation here, but if you separate out the data input from the rest of the code, you can decide on this later. It's all about encapsulation: dividing and conquering.

  6. #6
    Nicholas Jordan's Avatar
    Nicholas Jordan is offline Senior Member
    Join Date
    Jun 2008
    Location
    Southwest
    Posts
    1,018
    Rep Power
    8

    Default

    ( cannot see all of your reply )

    First thing I would do here is begin with an editable file as the source / sink of the program's work. This avoids 'capturing' the data that scrolls off a command line box. Another approach to part of that problem is using javax.swing and in paticular consider the use of JTable for the display of data.

    Storage of the data while the program is running is amenable to a paticularly good library called "Collections" which should be part of your initial design.

    Build in Exception and error trapping, with reports written to a file, for the same reason and use it during prototyping and development. On first things first, come up with some fields that will be used as data control fields for the work such as student names and so on. Actual student data may be stored as strings or as raw binary data - either one will work.
    Introduction to Programming Using Java.
    Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor

  7. #7
    Nicholas Jordan's Avatar
    Nicholas Jordan is offline Senior Member
    Join Date
    Jun 2008
    Location
    Southwest
    Posts
    1,018
    Rep Power
    8

    Default TreeMap or Hashtable

    Quote Originally Posted by chrisbremen View Post
    yes i know what an array is.
    What about ArrayList or List or many of the data storage tools known as Collections?
    Quote Originally Posted by chrisbremen View Post
    ... An algorithm so that each test is different, because the students will be sitting right next to each other and i dont want them to be working on the same test.)
    Java Code:
    // ???.....
    String[] studentNames = new String[count];
    for each name in studentNames:
    treeMap.put(new Pair(new Integer(studentNames[index].hashCode(),new Test())));/....
    
    // Class Pair 
    class Pair{Pair(Integer i, Test t){}}
    
    // Class Test
    class Test(){}......
    Much code omitted here, it is easier for me to write in code than to explain it. Fubarable provides the classical OO entrance to your spec.
    Introduction to Programming Using Java.
    Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor

Similar Threads

  1. Butterfly Testing Tools 2.0.1
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 03-17-2008, 08:23 PM
  2. Testing JUnit PDE with Ant
    By keynan in forum Eclipse
    Replies: 0
    Last Post: 02-14-2008, 11:35 PM
  3. testing sunone with jre1.6
    By reshmaahmed21@yahoo.com in forum New To Java
    Replies: 0
    Last Post: 11-16-2007, 09:06 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
  •