im writing a program that asks the user how many boxes they want. after that, the program asks the length for the first shape, then the height of the first shape, and then the length and height ofr the second shape and so on. how do i go by storing each value the user enters in the array and then displaying the images using a (*) character? here is my code so far. I have ran the program fine before but am still trying to figure out how to store them in an array and then printing out each image one by one. i've gotten help on this before and really appreciate everything.
Hi Mike, Gee that code looks familiar ... This time I won't show you any code just give you some hints. You should make use of an existing Java class that contains width and height class variables. Dimension comes to mind! Then you can use an array of those objects. So, using psuedo code we can do something like:
what is your problem? damn.. im not trying to find answers and someone to do my homework. what insult! im taking java because I want to learn it and become certified in the forseeable future. its nice to know that someone can be nice about things and help me out.
Originally posted by Mike Pirrone: im taking java because I want to learn it and become certified in the forseeable future.
Rather than have you submit your problem and we say "fine - here is the code solution", some think that understanding comes from struggling with the issues a bit. Manfred tried to give you hints for you to struggle with. Eventually, someone will just give you the answer - thus robbing you of an education.
I'm sorry you felt insulted. [ February 28, 2002: Message edited by: Marilyn deQueiroz ]
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Thank you everyone for all the help. I really appreciate it. I did not mean to intentionally ask for specific code as answers and I will make sure to only ask for hints. Example: I had no idea a Dimension class existed and this has helped me greatly. Believe me, I am not getting robbed of my education. I'm sure you have all heard this before buy my professor is still attempting to get certified and he has only been teaching the course for over a year and honestly.. at times it seems like he has no idea what he is doing. If it wasn't for this website along with van der Linden's Just Java book, I would be truly lost.