HELP WITH PROGRAM

D

DJ Zypher

Assignment: Write a program using text-based (command line) program to produce the following “ASCII graphic” that simulates a weaving pattern. You should notice that there are only two different types of lines printed – one the “negative” of the other. You should also notice that the first horizontal row and/or vertical column do not appear when the pattern repeats. Across the top, the numeric abstraction of the pattern is 1, 2, 4, 8, 4, 2, 1, 2, 4, 8, 4, 2, 1. Along the side, the pattern is the same. You should use a sequence of loops to print the pattern. Also, your program should not use more than four System.out.println() commands. You may not circumvent the println() limit by using embedded newline characters. The output from your program should look like the following:

X XXXX XXXX X XXXX XXXX X
XX XXXXXXXX XX XX XXXXXXXX XX
XX XXXXXXXX XX XX XXXXXXXX XX
X XXXX XXXX X XXXX XXXX X
X XXXX XXXX X XXXX XXXX X
X XXXX XXXX X XXXX XXXX X
X XXXX XXXX X XXXX XXXX X
XX XXXXXXXX XX XX XXXXXXXX XX
XX XXXXXXXX XX XX XXXXXXXX XX
XX XXXXXXXX XX XX XXXXXXXX XX
XX XXXXXXXX XX XX XXXXXXXX XX
XX XXXXXXXX XX XX XXXXXXXX XX
XX XXXXXXXX XX XX XXXXXXXX XX
XX XXXXXXXX XX XX XXXXXXXX XX
XX XXXXXXXX XX XX XXXXXXXX XX
X XXXX XXXX X XXXX XXXX X
X XXXX XXXX X XXXX XXXX X
X XXXX XXXX X XXXX XXXX X
X XXXX XXXX X XXXX XXXX X
XX XXXXXXXX XX XX XXXXXXXX XX
XX XXXXXXXX XX XX XXXXXXXX XX
X XXXX XXXX X XXXX XXXX X
XX XXXXXXXX XX XX XXXXXXXX XX
XX XXXXXXXX XX XX XXXXXXXX XX
X XXXX XXXX X XXXX XXXX X
X XXXX XXXX X XXXX XXXX X
X XXXX XXXX X XXXX XXXX X
X XXXX XXXX X XXXX XXXX X
XX XXXXXXXX XX XX XXXXXXXX XX
XX XXXXXXXX XX XX XXXXXXXX XX
XX XXXXXXXX XX XX XXXXXXXX XX
XX XXXXXXXX XX XX XXXXXXXX XX
XX XXXXXXXX XX XX XXXXXXXX XX
XX XXXXXXXX XX XX XXXXXXXX XX
XX XXXXXXXX XX XX XXXXXXXX XX
XX XXXXXXXX XX XX XXXXXXXX XX
X XXXX XXXX X XXXX XXXX X
X XXXX XXXX X XXXX XXXX X
X XXXX XXXX X XXXX XXXX X
X XXXX XXXX X XXXX XXXX X
XX XXXXXXXX XX XX XXXXXXXX XX
XX XXXXXXXX XX XX XXXXXXXX XX
X XXXX XXXX X XXXX XXXX X


**** SORRY THIS IS SOOO LONG, BUT I AM IN AN INTRODUCTION TO JAVA PROGRAMMING CLASS AND THIS IS MY ASSIGNMENT AND I NEED HELP GETTING STARTED BECAUSE I HAVE NO CLUE...I AM GOING TO GO SEE MY PROFESSOR BUT I WOULD FEEL A LOT BETTER IF I HAD SOMETHING STARTED, PLEASE HELP IF YOU CAN, THANKS!!!!
 
C

Christophe Vanfleteren

DJ Zypher wrote:

snipped assignment
**** SORRY THIS IS SOOO LONG, BUT I AM IN AN INTRODUCTION TO JAVA
PROGRAMMING CLASS AND THIS IS MY ASSIGNMENT AND I NEED HELP GETTING STARTED
BECAUSE I HAVE NO CLUE...I AM GOING TO GO SEE MY PROFESSOR BUT I WOULD FEEL
A LOT BETTER IF I HAD SOMETHING STARTED, PLEASE HELP IF YOU CAN, THANKS!!!!

First of all , stop with the CAPS allready. Writing like that makes you look
like some Nigerian official who wants to transfer money to my bank account.

Second, maybe it would be a good idea to actually try something, and see
where you get stuck. Nobody here is just going to make your homework for
you, but we are willing to help with specific problems.

Try reading your textbook or something like that. I'm sure your professor
won't give you assignments that you won't be able to handle given what you
have learned so far.
 
C

Christophe Vanfleteren

Something else: for such trivial things, comp.lang.java.help is a better
newsgroup.
 
J

Joona I Palaste

Christophe Vanfleteren said:
DJ Zypher wrote:
snipped assignment
First of all , stop with the CAPS allready. Writing like that makes you look
like some Nigerian official who wants to transfer money to my bank account.

DEAR SIR OR MADAM

I AM MR IDI AMIN, PRESIDENT OF UGANDA. MY WIDOW AND I...
WHOOPS.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top