Results 1 to 3 of 3
  1. #1
    usa100 is offline Member
    Join Date
    Jan 2011
    Posts
    2
    Rep Power
    0

    Unhappy Help me in java...I am dying!!!

    I got to finish this project by tomorrow, along with the other one that I posted, but I really don't know how to. If I don't finish it, I will be doomed:( I don't understand java AT ALL, I AM A JAVA IDIOT. Please help me complete the project! your help will be appreciated!

    Instructions:

    Picasa Web Albums - 玉婷林

    We have to have 2 java files: Rectangle.java, Point.java

    here's my code so far for rectangle.java:
    public class Rectangle
    {
    //change area
    public void setOrigin (int newX, int newY)
    {
    make rectangle A
    origin 0,0 W10, H20
    make rectangle B
    origin 5,5 W15, H15
    make rectangle C
    origin 20,10 W10, H20
    }
    //move rigin of the rectangle by xm and ym
    public void moveBy (int xm, int ym)
    {
    moveA by 5,5
    move B by -5,5
    move C by -20,0
    }
    //area height*width
    public int getArea()
    {
    print area of A
    print area of B
    print area of C
    return a;
    }
    //move the origin of the rectangle by xm and ym
    public Rectangle intersect (rectangle t)//intersect t.origin
    {
    Rectangle AB=A.intersect(B);
    //printout area of AB
    println("The area of A intersect B is"+AB.getArea());
    do also for AC, BC
    move A by 5,5
    move B by -5,-5
    move C by -20,0
    AB=A.intersect(B0;
    printout area of AB again
    return new rectangle (0,0,0,0);
    }

    }
    Here's what I have for point.java
    :
    Picasa Web Albums - 玉婷林 - Untitled Album

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default

    What is your actual question? This post is looking less like a question post and more like a code/homework dump.

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •