aspose file tools*
The moose likes Beginning Java and the fly likes Another Question - dang I'm dense Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Another Question - dang I Watch "Another Question - dang I New topic
Author

Another Question - dang I'm dense

Richard Chambers
Ranch Hand

Joined: Apr 03, 2008
Posts: 40
Once again I'm trying to stuggle through a Java class with a don't want to be bothered instructor and a text book that shouldn't have been published. I'm having trouble grasping the concept of method declarations (probably advanced).

The scenario is I'm working with several files:

Test - that contains the main method
First
Second - that extends First
Third - provides access to Fourth
Fourth - a CSV file containing the data for the package

my question

How do I declare a method in Test that has methods in the other files as paramaters.

I'm having problems with the proper "formatting" for the parameters.
I thought it was on the lines of



but that's not working and the hundred or so other things I've tried ain't either. I know it's something simple, but I ain't seeing it.

Thanks
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

How do I declare a method in Test that has methods in the other files as paramaters.

Wow, why are you doing this ? It reminds be of good old C programming. If you insist on doing it, you can declare your method this way :
.

But you'd better think twice


[My Blog]
All roads lead to JavaRanch
Richard Chambers
Ranch Hand

Joined: Apr 03, 2008
Posts: 40
Like I said, bad instructor with sorry text book
assignment makes ZERO sense for me.
He supplied some of the files and data, supposedly doing the background math for us, but the math is full of errors, I'm not sure he knows how to program.

The actual assignment instructions I'm hung up on are:

Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

This private static method has no return value, and has three parameters: currentAccount of type CheckingAccount, myFile of type MyCsvFile and myFields of type String array.

Well, that makes sense. He is not asking you to pass methods, is he ?
You need to pass three arguments to a method called handleAccount, in the CheckingAccountsTest class
  • currentAccount of type CheckingAccount
  • myFile of type MyCsvFile
  • myFields of type String array


  • Let's say that you want a method whose argument is an int, you would write it :


    Then, try to think how you'd write a method with the three arguments listed above.

    assignment makes ZERO sense for me.

    keep cool, it will make sense when you figure out how to do it
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Another Question - dang I'm dense