Search:

Type: Posts; User: ss1w

Search: Search took 0.06 seconds.

  1. Re: Creating a data algorithum method that calculates the height difference

    hahaa. i see the confusing. Sorry i didnt explain it properly. What i meant by "Both planks cannot be overlapping each other." is that planks at the same level cannot be in the same start - end...
  2. Re: Creating a data algorithum method that calculates the height difference

    Actually there is. There is an top/bottom region between (2, 5, 4),(4, 7, 3)

    *assuming that the numbers are the actual planks
    ----2,3,4,5
    --------4,5,6,7
    ---12,3
    ----2,3,4
    ...
  3. Re: Creating a data algorithum method that calculates the height difference

    the plank data is read from a junit test file which is in such format



    public class HeightCalculatorTest {

    @Test
    public void basicTest() {
    List<Position> plank = new...
  4. Re: Creating a data algorithum method that calculates the height difference

    Hi @GregBrannon, i notice that your constructor is set as(this.start = start). I am thinking you are assuming that my values will be literally <start,end,height>. However my input might be just...
  5. Re: Creating a data algorithum method that calculates the height difference

    Thanks GregBrannon. That is good to get me started.



    Cheers
  6. Re: Creating a data algorithum method that calculates the height difference

    Hi @GregBrannon , just wondering how would the plank class look like ? what is confusing me is how can i extract a single value from the <start,end,height> list to compare and return the whole list...
  7. Creating a data algorithum method that calculates the height difference

    I am working on a new project known as "construction building". I am pretty weak in java coding thus i am sincerely asking all of you to hold my hand and guide me step by step with the...
  8. Re: Creating a google map with markers and an option to change to heatmap

    That explains why i couldnt add tags for googlemap as well as heatmap. Cheers mate, will remove this topic
  9. Re: Comparing a list against another list, and storing it back into a list. Java

    Wow. Thanks Newbie. Just a side question, is it possible to make such implementation as a data structure. Using Quick sort perhaps or other form of data algorithm ?
  10. Creating a google map with markers and an option to change to heatmap

    I have created a map using google map api v3. Currently what i have managed to achieved is to plot the location with a marker; that is parsed out from a json file.

    Ultimately i am trying to add...
  11. Comparing a list against another list, and storing it back into a list. Java

    I am doing a mini project on "beauty contest". A list of contestant will be inserted as a list in such format `<Num <height, age, weight>>`.
    To be able to join the "beauty contest" the contestant...
  12. Replies
    25
    Views
    3,135

    Re: Array List implementation(Buying and selling)

    That is really great. May i check with you the maths logic behind the selling for the captial gain ?
  13. Replies
    25
    Views
    3,135

    Re: Array List implementation(Buying and selling)

    I am really sorry to keep bother you like this, this is my first semester for java programming

    I tried googling and i came up with such inner class. i have nested my function within the private...
  14. Replies
    25
    Views
    3,135

    Re: Array List implementation(Buying and selling)

    Haha. Alright that does clear up the confusion. Great, so now i have created a empty transaction class, linked it to my current document and test document. Also i have replaced 2 arraylist with 1...
  15. Replies
    25
    Views
    3,135

    Re: Array List implementation(Buying and selling)

    That would be like my current implementation or i have reach a new level of clueless.
    *
    public void buy(int stocks, int pice) {
    Stocks.add(stock);
    StockPrice.add(price);...
  16. Replies
    25
    Views
    3,135

    Re: Array List implementation(Buying and selling)

    Ok you lost me there on the implementation part. Are you talking about this ?

    Private class Transaction(Int Stocks, Int Price)
    {


    }
  17. Replies
    25
    Views
    3,135

    Re: Array List implementation(Buying and selling)

    No. The selling part is not debatable.
    Oh dear. I left out a small footnote at the bottom. I have to implement it in a queue and not as a stack.

    @post: The oldest q stocks held are each sold...
  18. Replies
    25
    Views
    3,135

    Re: Array List implementation(Buying and selling)

    This is all the instruction that is given.

    Your job is to implement the class skeleton efficiently according to its
    specification in that file.
    You may use the linear data structures in...
  19. Replies
    25
    Views
    3,135

    Re: Array List implementation(Buying and selling)

    We have cover linked list, array list, doubly linked list, stacks and queues. For this assignment we were told that we can use any linear data structure in java.util, thus i choose array list (queue)...
  20. Replies
    25
    Views
    3,135

    Re: Array List implementation(Buying and selling)

    Hi Jps, i have made the necessary correct. Wasn't aware of the code tag function. Yap. i couldnt figure out how could i keep both array list in syn, even on paper it requires a little work.
    I dont...
  21. Replies
    25
    Views
    3,135

    Re: Array List implementation(Buying and selling)

    The code i have so far is the buying implementation.
    Declaration

    *
    public void buy(int NumItems, int price) // as far as i know, my junit test pass this stage
    Stocks.add(NumItems);
    ...
  22. Replies
    25
    Views
    3,135

    Re: Array List implementation(Buying and selling)

    Base on the example i have set i have worked out the following amount. The value purchased and sold off varies.

    I have purchased the following equipment
    300 equipment - $10
    200 equipment - $20...
  23. Replies
    25
    Views
    3,135

    Re: Array List implementation(Buying and selling)

    I could do the maths on paper so I guess it is more of writing the code that perform the maths :(
  24. Replies
    25
    Views
    3,135

    Array List implementation(Buying and selling)

    I have this question on buying and selling of equipment.

    I am implementing the purchasing part with 2 array list. One to store the amount of equipment bought, the other to store the buying price....
Results 1 to 24 of 25