Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Identifying the header lines / prototypes of the following functions: a. A fu

ID: 2981486 • Letter: 1

Question

1. Identifying the header lines / prototypes of the following functions: a. A function called lastChars which uses a string as input and returns the last two characters in the string. b. A function called isSquare that responds to its caller the result of a test: the test is whether or not an integer is a perfect square. (For example, 16 is a perfect square, but 5 is not.) c. A function called sumDigits which returns the sum of the digits of an integer. d. A function called isSmall that returns an answer of true if a double precision parameter has a value between 0 and 0.001. (It returns false otherwise.) e. A function called randomColor. The function generates a random number and based on that number chooses a color. The color is returned. please give me the correct answer , otherwise i will not rate

Explanation / Answer

a)


String lastChars(String str);


b)


booleanisSquare(int number);


c)

intsumDigits(int num);


d)

booleanisSmall(double number);


e)

Color randomColor();


// This color datatype is present in java by importing awt.Color