Search:

Type: Posts; User: paco

Search: Search took 0.18 seconds.

  1. Re: Keeping track of found objects in array and smallest value

    Im aware of that but am I just trying to make it fool proof, as in what if there happens to be 7 or n + 1 matches then it has to be an array of 7 elements, and since my array is one of the first...
  2. Re: Keeping track of found objects in array and smallest value

    I have set my original 2 arrays to 10, so now if I make a third array to copy my 2nd array to, then there will be some slots that will be filled with 0's and those will get copied over. I guess I...
  3. Re: Keeping track of found objects in array and smallest value

    I dont know what array list is, havent learned that yet, also if I were to move it to another array, say ar1 = ar2 wouldn't they just be the same size and the same outcome would happen?
  4. Re: Keeping track of found objects in array and smallest value

    ok I will try now, thanks, thought there might have been another way/method
  5. Re: Keeping track of found objects in array and smallest value

    Yes I am trying to change the size of the ray and make it equal to my count which would have been the amount of times where my title and ISBN are the same. That way only the ones that are found will...
  6. Re: Keeping track of found objects in array and smallest value

    By looking at my code is that what you recommend I should do?
  7. Re: Keeping track of found objects in array and smallest value

    yea got that part :D took some time though, i am very slow.

    update: i still am stuck at this, my problem is valueFound[i] = k; . I dont know how to get around this, I can't declare my second...
  8. Re: Keeping track of found objects in array and smallest value

    reversed those 2 and my first part is working again.



    valueFound[i] = k;


    but now output:
  9. Re: Keeping track of found objects in array and smallest value

    I just ran it and got:

    Please enter a book title:
    ho
    Please enter a ISBN number:
    1001
    The book title is ho, the ISBN number is 1001 and the price is 70.0$.

    Index Information At Index...
  10. Re: Keeping track of found objects in array and smallest value

    "set smallest value variable to the first element in the list
    begin loop starting at the second element in the list"

    whats wrong with the way I have it above? If I am checking all the values of...
  11. Re: Keeping track of found objects in array and smallest value

    the first for loop goes through my list checking for books with the same price and ISBN # and then stores where they are located in that array, into a separate array (i want to change the price...
  12. Re: Keeping track of found objects in array and smallest value

    thanks for stating the obvious, I was hoping for an example, but I guess you think I am being lazy and want you to spit out the answer...WRONG! I am deeply confused and need help, heres my attempt,...
  13. Re: Keeping track of found objects in array and smallest value

    how do I keep track of the values stored and then find the smallest of those values using my above code and my other class (down below), is the question.



    class Book {
    //Attributes of Book
    ...
  14. Re: Keeping track of found objects in array and smallest value

    I have to keep my array like this in my book class:
    update:


    import java.util.Random;
    import java.util.Scanner;
    public class ModifyBooks {

    public static void main(String[] args) {
  15. Keeping track of found objects in array and smallest value

    Hello I am trying to devise some code to store the index values of where I have found a book title and key code (which will be ISBN) in an array, I am stuck at here



    for (int k = 0; k <...
Results 1 to 15 of 15