Patty Lebowski

Greenhorn
+ Follow
since Aug 14, 2016
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Patty Lebowski

Paul Clapham wrote:I don't understand what "get two rectangle objects intersecting" means. The code you posted doesn't have any rectangle objects in it and it doesn't have a method for determining whether something is intersecting something else. So are you asking about that code? If so, which part of it?



I'm sorry, I should have explained it better. I'm trying to create a lock in the sense that a user clicks on the screen in four different places. To do this I'm having every time the user clicks create a "rectangle" (a circle shape on screen), storing it, and then have the user click a second time creating circles and seeing if all four circles line up properly and intersect the previous set password. The issue is that they always come back as the correct intersecting shape password, even when they are not intersecting.  I've been testing different things, one of them being:  if(ellipse.contains(e.getPoint())), to see what I'm clicking on. The results always return back the Rectangle2D class name when printed out, meaning that there are rectangles that I'm not seeing or something else is messed up.

I could have probably avoided this mess if I could figure out how to make a single user click radius larger, and then comparing that range in two arrays. But I couldn't figure that out either.
7 years ago

I'm having an issue where I always get two rectangle objects intersecting even when they are not. I'm lost in my own code.


7 years ago
I should have pointed out I'm in a java programming class, this is the logic for an assignment to be done on paper. There is no code yet. I would like to make sure I understand how to do the logic of two data structures combined into one.

I'm very new here so I apologize for the mistakes I've made.

I just wanted to see if I could understand this better before I go to my professors office hours.
8 years ago
This is the original problem:

Given a hash function h(x) = x mod 3, insert entries with keys 13, 22, 8, 16, 33, 52, 43, 28, 45, 23, 11, 15, 9, 2, 20, 30, 19, 50 to the hash table. Use binary search trees to solve hash collision, where each cell of the hash table stores the root of a binary search tree.

I'm unsure if I have the correct answer to this Homework problem. If I'm wrong please direct me in the right direction.


|0  |1  |2 | 3 | 4|  5| 6 | 7 |8| 9 |10|11|12|13|14 |15|16|17|

|45|13|22|16|52|43|28|19|8|33|23|11|2 |20|50 |15|9|30|
8 years ago

Norm Radder wrote:ok, I was just confused.  This section of the forum is for beginning java programmers that have problems with their code.  So naturally I was looking for your code that needed help.

I don't know what section of the forum this question would fit in better.  



I ran into the same issue. I posted it here because I figured it would be the 'best' fit
8 years ago

Norm Radder wrote:Is this a java programming problem?  Do you have java code you are having problems with?
Please post the code (in code tags) and ask any questions you have about the code.



There is no code, it's just working out the logic of the problem on paper.
8 years ago
This is the original problem:

Given a hash function h(x) = x mod 3, insert entries with keys 13, 22, 8, 16, 33, 52, 43, 28, 45, 23, 11, 15, 9, 2, 20, 30, 19, 50 to the hash table. Use binary search trees to solve hash collision, where each cell of the hash table stores the root of a binary search tree. Also draw the trees after removing keys 43, 30 and 2.

I'm unsure if I have the correct answer to this Homework problem. If I'm wrong please direct me in the right direction.

|0  |1  |2 | 3 | 4|  5| 6 | 7 |8| 9 |10|11|12|13|14 |15|16|17|

|45|13|22|16|52|43|28|19|8|33|23|11|2 |20|50 |15|9|30|
8 years ago