Jump to content

Check out our Community Blogs

Register and join over 40,000 other developers!

Recent Topics

Recent Status Updates

View All Updates

- - - - -

Having a hard Time with run arguments to build a grid with stdDraw

grid run arguments stddraw

This topic has been archived. This means that you cannot reply to this topic.
No replies to this topic

#1 ReedSager


    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 13 November 2015 - 02:01 PM

Hello, So I'm working on some homework for my CS 214 class I think I missed a piece on how to draw a grid with StdDraw. In this program I'm suppose to use run arguments (a number from 1-10) to build a grid on whichever number is in the run arguments say the run argument is 3 the grid would be 3x3. So far this is the only thing I have because I'm clueless on this grid drawing in StdDraw, Any tips would be helpful, Thanks!


public class Grid

   public static void main(String[] args)
      StdDraw.setCanvasSize(600, 600);
        for (int i = 0; i < args.length; i++)
         int input = Integer.parseInt(args[i]);   

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download