Meaningless Drivel is fun!*
The moose likes Beginning Java and the fly likes Matrix Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Matrix" Watch "Matrix" New topic
Author

Matrix

Pilare Bowblade
Greenhorn

Joined: Apr 23, 2004
Posts: 2
hi guys, im very new to this post on forum if you need help with java so i try to explain myself as good as possible and state my problem but bar with me if im out and flying.

what i need to do is to build a matrix, and after that use 3 methods, 1 method that will display some fields in the matrix not all of them, here i dont know how you print them out or even get a method to display them, i think i know how to build a matrix but if you have any cool idea here it wouldnt hurt ,

well after that i need a method that writes out the same fields in the matrix as the first but it should stand null instead of the letter.

the third method should display the same field as the first one but should be doing it in the order backwards.

what i wonder is, how do you make a method, that displays these matrix fields, thx
Tony Jackson
Ranch Hand

Joined: Feb 23, 2001
Posts: 45
Pilare,

The way you phrased your email it sounds like you were given a homework assignment and you are asking people to solve it for you.

If that's the case, then it's not appropriate. Alternately, you might ask for help with understanding a concept. Perhaps you are wondering how to define a class to represent a matrix? Or maybe you are more concerned with how to format output? Besides being vague, there are quite a number of concepts in your question (at least as I understand it) so you might try to break down the concepts and determine which you understand and which you are having trouble with.

Tony
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
It will definitely help if you can post some of the code you have so far. Or at least explain what you are thinking of doing. The more you show that you are putting some effort into this yourself, the more likely someone here will help you when you get stuck.

Good luck!

Layne


Java API Documentation
The Java Tutorial
Pilare Bowblade
Greenhorn

Joined: Apr 23, 2004
Posts: 2
youre right it is a homework, and as for what our teacher said, you wouldnt be albe to do this by yourself, you have to use to internet to be able to finish this assingment, so here i am, what better place that a big forum where everybody help each other, what better place can you get the info for youre java assingments, sure i can look around at diffrent pages for the code but i dont think that will help me as i have tried it for soon 3 weeks..

well anyway, for those who wanna help me

Public class Matrix {

public static void main(string[] args) {

String[] Array1 { "A", "B", "C" };
String[] Array2 { "D", "E", "F" };
String[] Array3 { "G", "H", "J" };



this is just what i began with, i need printMatrix, eraseMatrix and reverseArray. i dont know how to connect these arrays with the method so its kind of what i need help with. if i say something wrong, correction is very welcome
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
Your matrix probably should be this

String[][] array {{"A","B","C" },{"D","E","F" },{"G","H","J"}};

to print it, use a nested 'for loop'

for erase and reverse, use the internet for a bit of research, this site and
google are two good places to search.

If you're still having trouble:
- post what you've tried, and any relevant error messages
- if no error messages, expected output Vs actual output
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Matrix
 
Similar Threads
Slowly getting it
B&S 2.2.2 updateRecord()
JAVA-Synchronization -VERY beginner-Help
Buttons...
Generating/Creating dynamic graphs