Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Page 2 of 2 FirstFirst 12
Results 26 to 26 of 26

Thread: Array List implementation(Buying and selling)

  1. #26
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: Array List implementation(Buying and selling)

    When a sale is made, you will have to sell a specific quantity. When you get a Transaction from the list, it may or may not have enough quantity to cover the sale. In the easy case, the sale is the same number available in that Transaction. In the other two cases you will either have some left over or need to grab the next Transaction and sell some of those too. Worry about the nested class first, once that is in place it will be easier to work on the math.

  2. The Following User Says Thank You to jps For This Useful Post:

    ss1w (September 8th, 2013)

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Simple Adjacent List implementation
    By IHeartProgramming in forum Collections and Generics
    Replies: 2
    Last Post: October 1st, 2012, 04:06 PM
  2. [SOLVED] Help with Min Heap Implementation (with an array)
    By arsparfven in forum What's Wrong With My Code?
    Replies: 10
    Last Post: April 27th, 2012, 05:57 AM
  3. Array List of Array Lists working for first item but not for second.
    By javapenguin in forum Collections and Generics
    Replies: 6
    Last Post: February 15th, 2012, 05:12 PM
  4. Implementation Stack Using Array
    By rainbow9 in forum Java Programming Tutorials
    Replies: 1
    Last Post: August 20th, 2011, 09:48 AM

Tags for this Thread