File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes accesing elements in a matrix Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "accesing elements in a matrix" Watch "accesing elements in a matrix" New topic
Author

accesing elements in a matrix

Jack Bolton
Ranch Hand

Joined: May 08, 2006
Posts: 65
Hi guys i am coding this Sales program.
The program asks the user for the sales of two weeks.
I want to access the elements of the matrix, so i can make comparations; for example: which sale is the highest sale,etc.
how can i solve this?
thanks for any response

this is the code:
create the matrix

loads the matrix


prints the matrix


[ June 03, 2006: Message edited by: Jack Bolton ]

[ June 03, 2006: Message edited by: Jack Bolton ]
[ June 03, 2006: Message edited by: Jack Bolton ]
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Originally posted by Jack Bolton:
...I want to access the elements of the matrix, so i can make comparations; for example: which sale is the highest sale,etc. how can i solve this? ...

I'm not sure I understand the question. In your code to print the matrix, you are accessing the elements.

Your code works fine, but I couldn't resist a little clean-up...


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Stephen Foy
Ranch Hand

Joined: Oct 17, 2005
Posts: 143
I dont understand what you mean, but if you want to find out the highest elements of the matrix you can:



If you wanted to compare to elements, same day from opposite week for example.



Stephen Foy - Microsoft Application Development Consultant
Jack Bolton
Ranch Hand

Joined: May 08, 2006
Posts: 65
thanks...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: accesing elements in a matrix
 
Similar Threads
Related to Looping..
Reading Objects and Formatting Ouput
for loop logic problem
Help me with matrix...please!!!!!!!
2 dimensional array