{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


Exercise4Chp4Solut-2 - a and c d Write valid calls to each...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Name________________________ CSE182 1 CSE 182 Chapter 4 Exercise 1 Solution 1. Use the following method headings to answer the following questions: a) static double determineGrade (int grade1, int grade2, int grade3) b) static void displayResult(double avg) c) static int getValue() a . What is the return type for each of the methods? a) double b) void c) int b . How many parameters does each method have? a) 3 b) 1 c) 0 c . Which of the preceding methods will have a return statement as part of its body?
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: a) and c) d. Write valid calls to each of the preceding methods from the Main method by giving some specific values as their arguments, and creating a variable to receive a value returned by each method if some value is return. for example : a) double finalGrade; finalGrade = determineGrade(87, 92, 97); b) displayResult(87.80); c) int x; x = getValue( );...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online