Question
Asked by:
jonasds
jonasds from UOP
Rating : No Rating
Questions Asked: 6
Tutorials Posted: 0
 

$1.00 Explain how methods with multiple parameters are declared.

Q:
Resource: Java: How to Program
· Due Date: Day 4 [Individual] forum
· Explain how methods with multiple parameters are declared.
· Describe two examples of Java-based applications that might use methods that have
two or more parameters.
· Provide detail about where those applications would be used.
· Post a 200- to 300-word response.
 
 
Available Tutorials to this Question
Posted by:
b_h
b_h from U. in B.
Rating (488): A+
Questions Asked: 0
Tutorials Posted: 912, earned $16,356.96
 

$10.00 Declaring Java Methods with Multiple Parameters, four examples, and a demo application

  • This tutorial was purchased 12 times and rated A by students like you.
  • Posted on Feb. 05, 2008 at 08:31:15AM
A:
Preview: ... (a particular table or subset of a table), then those separate criteria should be passed in as different parameters.

- Video game: A java program that implements a video game like table tennis needs a method to check to see if the ball has hit a paddle. The method could take as parameters the location of the tennis ball and the locations of each of the two paddles as separate parameters. Then the method would return true or false if there was a collision.

Here's a more concrete example. This class helps compute the Fibonacci numbers. The nth term in the sequence is the sum of the previous two terms. For example, if you know the first two, then you can compute the third.

The parameter n tells which number in the sequence you want. The parameters F0 ...

The full tutorial is about 705 words long .
   
Join Now or Log In
Get Tutoring
Get Paid
Academic Honesty