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...
Type: Posts; User: ss1w
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...
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
...
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...
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...
Thanks GregBrannon. That is good to get me started.
Cheers
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...
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...
That explains why i couldnt add tags for googlemap as well as heatmap. Cheers mate, will remove this topic
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 ?
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...
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...
That is really great. May i check with you the maths logic behind the selling for the captial gain ?
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...
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...
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);...
Ok you lost me there on the implementation part. Are you talking about this ?
Private class Transaction(Int Stocks, Int Price)
{
}
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...
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...
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)...
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...
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);
...
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...
I could do the maths on paper so I guess it is more of writing the code that perform the maths :(
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....