Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Drawing a square with stars and dots

  1. #1
    Junior Member
    Join Date
    Oct 2012
    Posts
    1
    My Mood
    Confused
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Drawing a square with stars and dots

    Hi , I have an assignment, the task is too draw a 'square' whose outline is all *'s and whose
    interior is filled with the character . (dot). The input to the program is the size of the 'square'
    in characters.

    Input size of square: 5


    Expected output


    *****
    *. . .*
    *. . .*
    *. . .*
    *****

    I am very new to Java and completely lost on this task, please please HELP! :-) Thanks


  2. #2
    Super Moderator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,104
    Thanks
    169
    Thanked 780 Times in 726 Posts
    Blog Entries
    5

    Default Re: Drawing a square with stars and dots

    What have you tried? Where are you stuck? Recommended reading:
    How to Program (stuck on homework? READ THIS BEFORE POSTING)
    How to Help Yourself Get Help

Similar Threads

  1. [SOLVED] Replacing dots with spaces
    By dTi in forum What's Wrong With My Code?
    Replies: 4
    Last Post: November 17th, 2011, 07:53 PM
  2. What is a non-zero square?
    By djl1990 in forum Java Theory & Questions
    Replies: 2
    Last Post: October 30th, 2011, 03:11 PM
  3. URgh, drawing a square
    By BITmixit in forum What's Wrong With My Code?
    Replies: 6
    Last Post: October 25th, 2011, 12:49 PM
  4. HW Accelerated Square Root
    By tomster in forum Java SE APIs
    Replies: 2
    Last Post: October 3rd, 2011, 05:12 AM
  5. triad square
    By mistu in forum Member Introductions
    Replies: 2
    Last Post: August 22nd, 2011, 08:13 AM