Search:

Type: Posts; User: Cornix

Search: Search took 0.15 seconds.

  1. Replies
    21
    Views
    1,443

    Re: Making a rectangle

    Thats what the Setters are for.
  2. Replies
    21
    Views
    1,443

    Re: Making a rectangle

    If you write:

    private Rectangle(int width, int length) {
    ...
    }
    Then the constructor has been declared "private" and can not be used by any other classes other then the Rectangle class.
    You can...
  3. Replies
    21
    Views
    1,443

    Re: Making a rectangle

    Your code is missing closing curly brackets. Whenever you open them you also have to close them later on.
    Besides that the error message is pretty much self-explanatory, is it not?
  4. Replies
    21
    Views
    1,443

    Re: Making a rectangle

    We would just be repeating what all the other tutorials and textbooks say because the errors you make are so basic there is not much more to say about them. I dont feel like repeating textbooks.
  5. Replies
    21
    Views
    1,443

    Re: Making a rectangle

    You should really go over the basics once again before trying this program, there are countless errors in the program. Starting with misplaced semicolon and variables that have no type defined. You...
  6. Replies
    21
    Views
    1,443

    Re: Making a rectangle

    Setters and Getters are created for private member variables. You could google them to read more information on how these methods usually look like. A simple example would be:

    public class Coord {...
Results 1 to 6 of 6