Results 1 to 2 of 2
  1. #1
    prendergast36 is offline Member
    Join Date
    Sep 2011
    Posts
    9
    Rep Power
    0

    Default reached end of file while parsing- using bluej

    Im completely new to programming and am trying to figure out where I went wrong on this project. the project is to write the code to draw this. I did it with the visual bench mark but cannot figure it out

    reached end of file while parsing- using bluej-capture.jpg
    Java Code:
    public class Picture
    {
        private Square square1;
        private Square square2; 
        private Circle circle1;
        private Circle circle2;
        private Circle circle3;
        private Circle circle4;
        private Triangle triangle1;
        private Triangle triangle2;
    
        
    }
    
    
        public class Square
    {
        private int size;
        private int xPosition;
        private int yPosition;
        private String color;
        private boolean isVisible;
    
        /**
     * create a new square with arbitrary field values.
     */
    public class Square {
    
     {
         size= theSize;
         xPosition= xPosition;
         yPosition= yPosition;
         color= theColor;
         if (theVisibility) 
         makeVisible();
         else
         makeInvisible();
    }
    public int square1()
    {
       theSize(200);
    xPosition(50);
    yPosition(55);
    Color("black");
       isVisible(true);
    
    }
    private square square2()
    {
        theSize(180);
        xPosition(60);
        yPosition(65);
    Color("white");
        isVisible(true);   
    }  
        
    public class triangle
    {
        private int size;
        private int xPosition;
        private int yPosition;
        private String color;
        private boolean isVisible;
    }
        public int Triangle();
           {
            int height = height;
            int width = width;
            int xPosition = xPosition;
            int yPosition = yPosition;
            string color = color;
            int isVisible =(true);
        }
      
       Triangle triangle1;
       {
           height(110);
           width(80);
           xPosition(145);
           yPosition(90);
           color("black");
           isVisible(true);
           draw();
           
        }
       Triangle triangle2;
       {
           height(100);
           width(70);
           xPosition(145);
           yPosition(96);
           color("white");
           isVisible(true);
        }
            
    
       
    
     public int Circle()
     {
    
        int diameter;
        int xPosition;
        int yPosition;
        String color;
        boolean isVisible;
    }
    private circle circle1;
    {
        diameter(150);
        xPosition(70);
        yPosition(80);
        color("black");
        boolean isVisible;
    }
     private circle circle2;
    {
        diameter(140);
        xPosition(75);
        yPosition(85);
        color("white");
        boolean isVisible;
    }private circle circle3;
    {
        diameter(40);
        xPosition(125);
        yPosition(150);
        color("black");
        boolean isVisible;
    }
    private circle circle4;
    {
       diameter(30);
       xPosition(130);
       yPosition(155);
       color("white");
       boolean isVisible;
    }
    Last edited by Norm; 09-08-2011 at 09:14 PM. Reason: added code tags

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,051
    Blog Entries
    7
    Rep Power
    23

    Default Re: reached end of file while parsing- using bluej

    Count your curly brackets and see if they all match.

    kind regards,

    Jos
    The only person who got everything done by Friday was Robinson Crusoe.

Similar Threads

  1. Replies: 59
    Last Post: 05-22-2011, 08:37 AM
  2. How do I make an exe file from BlueJ?
    By rajkobie in forum New To Java
    Replies: 4
    Last Post: 05-20-2011, 03:28 PM
  3. Replies: 1
    Last Post: 05-31-2009, 06:48 PM
  4. intimating file(s) have reached/copied in directory
    By ashu261 in forum Threads and Synchronization
    Replies: 1
    Last Post: 04-23-2008, 06:24 PM
  5. signaling file(s) have reached in directory
    By ashu261 in forum Advanced Java
    Replies: 0
    Last Post: 02-04-2008, 08:45 AM

Posting Permissions

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