+ 1
How do I make chairs and a tables in Java I need help
I need help making chairs and a table in Java . I'm new to java. I know it's a lot of system.out.printlns ,x and plus signs . I need help
12 odpowiedzi
+ 13
The F eva you can try this pattern by using some for loops and including your pattern logic but in simple way this will arrange something like this.
https://code.sololearn.com/cwd2O4VjTLYw/?ref=app
+ 10
The F eva You need to learn how to think about the flow of logic using imperative controls like loops and if statements.
Using the example provided by Seb TheS:
x x
x x x x x x x x x x x
x x x x x x x x
x x x x x x
Think of this as a 46 x 4 grid.
The first and last cells of each row get an x.
All x's have at least one space between them on the same line / row.
Think of other patterns about the image.
Think of nested loops that serve a purpose.
The first / outer loop will iterate once per row... so 4 times, with a range of 0 to 3.
The second, inner loop will iterate for each cell on the current line.
Create a set of coordinates that map the left half of the image and use reverse logic to create the mirror version of this row.
Or, just explicitly list all coordinates requiring an x to start.
These are just a few notes to get you started. Show your progress for more help.
+ 7
Aymane Boukrouh
x ☕☕ 🍩🍩 x
x x x x x x x x x x x
x x x x x x x x
x x x x x x
+ 5
What do you mean by chairs and tables ?
+ 5
And what are chairs and tables ? I don't understand what you mean, how do you even define chairs and tables ? Are they classes, or what ?
+ 3
The F eva Atleast you could try to find some logic or repetitivy of the stair and table patterns.
+ 3
GAWEN STEASY that code output looked a bit skewed on my phone screen.
+ 3
Seb TheS you're the type of coder that excels at customer service, providing free coffee and donuts too!
+ 2
Thanks y'all
+ 1
Like you have to create two chairs and a table with a bunch of x`s in Java.
+ 1
Yes like that thats it . I'm just confused on how to code it ? Aymane boukrouh
0
I always feel pattern codes harder ☹️☹️
upvote....if u get this feels too😐