Search:

Type: Posts; User: MrPigeon

Search: Search took 0.09 seconds.

  1. Re: Reading data from a file and setting it to an array

    Sorry the delayed response, I've been pretty busy with work and studying for exams.

    Ah ok, I think I understand. I'll give it a go and let you know the results :)
  2. Re: Reading data from a file and setting it to an array

    Ah ok I understand now :) I have one slight problem though, how would I handle the store names (Lambton and Callaghan)?

    I need them to know which array to set the data to but it won't always be in...
  3. Re: Reading data from a file and setting it to an array

    It wouldn't be a uni assignment if it weren't unusual, unnecessary and complicating haha. So I tried what you suggested but I've obviously done something wrong. Here's what I got:




    private...
  4. Re: Reading data from a file and setting it to an array

    I provided one at the bottom of the first post. But here it is again:

    Lambton:

    Name: chocolate
    demand rate: 50
    setup cost: 200
    unit cost: 5.2
    inventory cost: 2
    selling price: 3
  5. Re: Reading data from a file and setting it to an array

    Ok, I have to go to work now but I'll take a look when I get home :)
  6. Re: Reading data from a file and setting it to an array

    Yeah that's the input file I'm trying to read to make sure it works. What would you suggest instead of nextInt()?

    Something like:



    stringDemand = inputStream.next();
    stringRate =...
  7. Re: Reading data from a file and setting it to an array

    Yes console is an instance of Scanner, sorry I didn't make that clear. It's declared at the start of the Interface class as it is used quite frequently in a number of different methods.
    Scanner...
  8. Reading data from a file and setting it to an array

    Hey guys. I can read the data to a monitor perfectly. But, I'm having problem reading data from an external file into an array of class objects.

    Here's my attempt at writing the method:

    ...
Results 1 to 8 of 8