184k views
4 votes
Write three function prototypes:

Function 1: Return type: void Function name: printHeading Parameters: one string called heading
Function 2: Return type: int Function name: year Page Parameters: one int called current Year, one int called birthYear
Function 3: Return type: void Function name: printable Parameters: one array of strings called names, one array of ints called birthDays, one int called size

User Doboy
by
8.3k points

1 Answer

6 votes

Answer:

Declaration for function 1:

void printHeading(String heading);

Declaration for function 2:

int yearPage(int currentYear, int birthYear);

Declaration for function 3:

void printable(String [] names, int [] birthDays, int size);

Step-by-step explanation:

Prototypes of any function includes its return type followed by its name followed by list of arguments used by it enclosed within parenthesis.

Syntax for method declaration:

return_type function_name (list_of_arguments);

User Thrag
by
8.3k points