Solved

One more question of Number of parameters

Posted on 2008-10-09
6
180 Views
Last Modified: 2013-11-23
Hi

As you can see the code, if the question asks you to write down the numbers of parameters and return type.

The answer would be

Number of parameters: 2 (String & double)
Return type: rentHouse ? (I'm not sure)

Thanks.

Thanks.
public boolean rentHouse(String address, double weeklyRent, House rentedHouse)

Open in new window

0
Comment
Question by:bt1942
  • 4
  • 2
6 Comments
 
LVL 6

Accepted Solution

by:
manuel_m earned 500 total points
ID: 22676249
Ok, same here.

Count the number of parameters.
address of type String
weeklyRent of type double
and rentedHouse obviously of type House.

so we have 3 parameters.

The return type here is between the public modifier and the method name rentHouse.
0
 

Author Comment

by:bt1942
ID: 22676273
manuel_m // Ok I see, so the return type is boolean?
0
 

Author Comment

by:bt1942
ID: 22676279
manuel_m // Oh ok my mistake.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:bt1942
ID: 22676285
manuel_m // if they are same like (int day, int month, int year) do you count this as 1 or 3?
0
 

Author Closing Comment

by:bt1942
ID: 31504566
Thanks for the comment.
0
 
LVL 6

Expert Comment

by:manuel_m
ID: 22676310
> if they are same like (int day, int month, int year) do you count this as 1 or 3?

The count is 3 !

You always have to count all the parameters given in a method. It doesn't matter what type they are :-)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show, step by step, how to integrate R code into a R Sweave document
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now