Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old April 5th, 2006, 07:42 PM
Registered User
 
Join Date: Apr 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default boolean

 Hey. my first post. How do you write a java class method that takes two Rectangle object as parameter and returns true if the rectangle overlape each other when given x and y corordinate, length and width for both rectangle. I know you suppose to use a boolean meathod and one way is to match up all four coordinate but is there any other way?

Reply With Quote
  #2 (permalink)  
Old April 6th, 2006, 02:58 PM
Authorized User
 
Join Date: Oct 2004
Location: Edinburgh, Scotland, United Kingdom.
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to SiliconFuRy
Default

Do you already have an algorithm to find out if the 2 objects overlap?

Many shoes,

Jamez/SiliconFuRy
Reply With Quote
  #3 (permalink)  
Old April 6th, 2006, 05:34 PM
Registered User
 
Join Date: Apr 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by SiliconFuRy
 Do you already have an algorithm to find out if the 2 objects overlap?

Many shoes,

Jamez/SiliconFuRy
I was thinking of using only one cordinate of both Rectangle. like the given bottomLeft X AND Y of the both rectangle. and set it to a range according the height and width given.Since in math, there must be a fix distance between two bottom left corner in order for triangle to overlap no matter the position of the rectangle. but the thing is i did all the math but the only thing is i can't do it in java due to the syntax and everything else.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
The boolean data type in C++? code_lover C++ Programming 2 July 14th, 2008 01:11 AM
help me with boolean array Un33k Pro Visual Basic 2005 1 June 12th, 2007 11:43 AM
Save Checkbox with boolean 0/1 value rdove84 ASP.NET 1.0 and 1.1 Basics 5 October 24th, 2006 09:12 AM
Convert variable to boolean stephanel Javascript How-To 2 June 25th, 2003 08:12 AM



All times are GMT -4. The time now is 04:04 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.