Java help

This is a discussion on Java help within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Hello, How would I write a program which prints out two rectangles and the rectangle created by the intersection of ...

  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
    aurė entuluva! mithrandir's Avatar
    Join Date
    Aug 2001
    Posts
    1,209
    Try here for a Java board - http://forum.java.sun.com/

  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, 03: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, 11: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, 10:07 PM
  4. Java woes
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 07-06-2003, 01: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, 06:12 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21