Results 1 to 4 of 4
  1. #1
    coyne20 is offline Member
    Join Date
    Feb 2009
    Rep Power

    Default Problem design issue

    I am rather unsure as to how to go about starting this problem so here goes:

    1. I need to design and develop a Java package that can analyze arbitrary-sized Bliffoscope images,
    returning a list of targets found. Each target found should include the target type
    found (starship or slime torpedo), the coordinates of the target on the Bliffoscope data,
    and some indication of your confidence in the target detection.

    2. Design and write test code that submits the test data to your package and prints the
    results returned by your package.

    So far I have written code to load in the attached files to create a 2d array as shown below:

    Java Code:
    import java.util.*; 
    public class SlimeTorpedo { 
        public static void main(String[]args) { 
            File file = new File("SlimeTorpedo.txt"); 
            ArrayList<String> arrayList = new ArrayList<String>(); 
            try { 
                //reads each line from the text file and places it into a string array 
                BufferedReader br = new BufferedReader(new FileReader(file)); 
                String str; 
                while ((str = br.readLine()) != null) { 
                //creates a stringFormat array and places the strings in the array list onto the stringFormat array 
                String stringFormat[] = new String[arrayList.size()]; 
                //creates 2d char array and writes the characters from the stringFormat array onto the 2d char array 
                char charFormat[][] = new char[stringFormat.length][]; 
                for (int i = 0; i < stringFormat.length; i++) { 
                    charFormat[i] = stringFormat[i].toCharArray(); 
                //for testing purposes, prints the 2d charFormat array 
                for (int i = 0; i < stringFormat.length; i++) { 
                    for (int j = 0; j < charFormat[i].length; j++) { 
            catch (FileNotFoundException ex) { 
            catch (IOException ex) { 
    How do I go about matching the 2d char array of both the slime torpedo and starships to the data within the test file?
    Attached Files Attached Files

  2. #2
    matrix123 is offline Member
    Join Date
    Mar 2012
    Rep Power

    Default Re: Problem design issue

    I am new to this forum and was generally browsing and saw this question. This is an interesting problem. Were you able to solve it?

  3. #3
    karthickjo is offline Member
    Join Date
    Oct 2012
    Rep Power

    Default Re: Problem design issue

    did you already find answers for this? it is interesting one..if you find the answers, could you pls share to me or in this forum?

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

    Default Re: Problem design issue

    Don't post to old dead threads, and don't hijack another poster's thread. When you have a question, start a new thread.


    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Overriding methods - design problem
    By viking90 in forum New To Java
    Replies: 1
    Last Post: 03-23-2011, 09:13 PM
  2. Design Problem
    By crystalClear in forum Advanced Java
    Replies: 3
    Last Post: 02-09-2011, 12:02 PM
  3. Netbeans 6.8 GUI design problem
    By newbiejava in forum NetBeans
    Replies: 0
    Last Post: 01-14-2010, 02:02 AM
  4. Java Design Problem
    By hencre in forum Advanced Java
    Replies: 2
    Last Post: 02-25-2009, 07:08 AM
  5. Design Issue
    By naveenmails in forum Advanced Java
    Replies: 3
    Last Post: 07-29-2008, 03:32 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