Results 1 to 5 of 5

Thread: Help

  1. #1
    Jakelamotta is offline Member
    Join Date
    Oct 2008
    Posts
    2
    Rep Power
    0

    Default Help

    So I am supposed to write a program that draws a rectangle using the system.out class, I have figured out I probably should use system.out.println() but now I am stuck. Would be grateful for some help.

  2. #2
    ojn
    ojn is offline Senior Member
    Join Date
    Aug 2008
    Location
    Stockholm, Sweden
    Posts
    119
    Rep Power
    0

    Default

    And what have you come up with so far? No one's gonna write the entire thing for you. Try first, ask questions later.

    Also: The thread topic isn't helpful at all, tells us nothing about the topic.

  3. #3
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,559
    Rep Power
    25

    Default

    Take a piece of graph paper and create the design. Then go over it row by row to see what needs to be output to write that design. Start at the top and work down.

  4. #4
    Jakelamotta is offline Member
    Join Date
    Oct 2008
    Posts
    2
    Rep Power
    0

    Default

    Quote Originally Posted by ojn View Post
    And what have you come up with so far? No one's gonna write the entire thing for you. Try first, ask questions later.

    Also: The thread topic isn't helpful at all, tells us nothing about the topic.
    Yeah, I get this. Well I have finished the first part of the assignment which was pretty easy.

    The problem is it seems like the system.out class canīt draw anything, only print text. I have been stuck here for days now, maybe I just lack the proper understanding.

    Yeah, bad choice of topic, was very tired.

    Quote Originally Posted by Norm View Post
    Take a piece of graph paper and create the design. Then go over it row by row to see what needs to be output to write that design. Start at the top and work down.
    Yeah, thatīs what my teacher said. And I have done so, the first part of the code is finished and the only command I lack is the one actually printing the rectangle.

    I donīt know if you want to help(I certainly understand that you wonīt write the program) then just answer me this, is it even possible to draw geometric figures using System.out.println()?

  5. #5
    DarrylBurke's Avatar
    DarrylBurke is online now Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,411
    Rep Power
    20

    Default

    No, System.out.println can't display graphics. I would expect that your assignment actually requires you to print characters and spaces in the shape of a rectangle, but check with your teacher.

    db

Posting Permissions

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