+ 1

Need help building map in Java. Code included below.

I'm trying to build a map using Java. I'm trying to build it on a simple x,y coordinate graph and I need two classes with it and a class to test it. I need to have positive and negative point's as well. I included what I have to far: https://code.sololearn.com/c0hXXSfzciXU/?ref=app

31st Mar 2018, 9:39 PM
maddie nicole
13 Réponses
+ 3
The problem with Graphics with Java is here, that SL does not support Java Graphics.
31st Mar 2018, 9:46 PM
Jonas Schröter
Jonas Schröter - avatar
+ 2
If you want to use Java, open this empty code and save it as yours. https://code.sololearn.com/cH1V064YNrJX/?ref=app
31st Mar 2018, 9:42 PM
Jonas Schröter
Jonas Schröter - avatar
+ 2
Okay, thanks! I just updated my question
31st Mar 2018, 9:47 PM
maddie nicole
+ 2
I've been using netbeams for this. It's for an assingment for one of my classes. I'm just not sure how to proceed
31st Mar 2018, 9:51 PM
maddie nicole
+ 2
I'd say maybe use a 2D array and modify that, then just print the final output as the array (but looking better).
1st Apr 2018, 9:39 AM
LunarCoffee
LunarCoffee - avatar
+ 2
I wrote a small example program here, I left some comments (I hope they help): https://code.sololearn.com/cs1Q2WF293Qv/?ref=app All in all, try and store then modify an object, instead of just printing things. It'll help in the long run, making the code a lot easier to reason about.
1st Apr 2018, 2:37 PM
LunarCoffee
LunarCoffee - avatar
+ 1
I have a picture, but this website wont let me post one. Basically, my teacher showed us an example by drawing a graph on the board and plotting points on it. That's pretty much all it needs to be
31st Mar 2018, 9:55 PM
maddie nicole
+ 1
kind of, yeah
31st Mar 2018, 9:57 PM
maddie nicole
0
So, I think you don't wanna create a map in your console, so you have to decide, which framework you'll use: For example Swing or JavaFX.
31st Mar 2018, 9:49 PM
Jonas Schröter
Jonas Schröter - avatar
0
But if you want to use the console, it's simply trial and error.
31st Mar 2018, 9:50 PM
Jonas Schröter
Jonas Schröter - avatar
0
So, is it possible that you post a little example how you expect your output to be?
31st Mar 2018, 9:53 PM
Jonas Schröter
Jonas Schröter - avatar
0
Like this? * * * * **************** * * * *
31st Mar 2018, 9:57 PM
Jonas Schröter
Jonas Schröter - avatar
0
So,first you have to think about a square, so try to generate one. Then you try to leave out pieces to create that cross.
31st Mar 2018, 9:59 PM
Jonas Schröter
Jonas Schröter - avatar