Thread: Java help

  1. #1
    Java
    Guest

    Java help

    Hello,

    How would I write a program which prints out two rectangles and the rectangle created by the intersection of the original two?

    Thank You For Your Help

  2. #2
    Registered User CompiledMonkey's Avatar
    Join Date
    Feb 2002
    Location
    Richmond, VA
    Posts
    438
    Maybe by using code?

  3. #3

  4. #4
    aurė entuluva! mithrandir's Avatar
    Join Date
    Aug 2001
    Posts
    1,209
    And don't worry about Chris...he's just Chris (he can't help it).

  5. #5
    Registered User CompiledMonkey's Avatar
    Join Date
    Feb 2002
    Location
    Richmond, VA
    Posts
    438
    Man, take a joke.

  6. #6
    aurė entuluva! mithrandir's Avatar
    Join Date
    Aug 2001
    Posts
    1,209
    Why don't you.

  7. #7
    Fingerstyle Guitarist taylorguitarman's Avatar
    Join Date
    Aug 2001
    Posts
    564
    Here's the idea-

    Code:
    Rectangle Rect1 = new Rectangle(0, 0, 50, 25);
    Rectangle Rect2 = new Rectangle(10, 10, 50, 25);
    Rectangle RectIntersect = Rect1.intersection(Rect2);
    Then output the rectangles however you want.
    Last edited by taylorguitarman; 02-06-2002 at 04:02 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C#, Java, C++
    By incognito in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 10-05-2004, 02:06 PM
  2. First Java Class at college
    By GanglyLamb in forum A Brief History of Cprogramming.com
    Replies: 24
    Last Post: 09-29-2004, 10:38 PM
  3. The Java language is being expanded
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 26
    Last Post: 06-11-2004, 09:07 PM
  4. Java woes
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 07-06-2003, 12:37 AM
  5. C or Java as a first language
    By CorJava in forum A Brief History of Cprogramming.com
    Replies: 34
    Last Post: 10-23-2002, 05:12 PM