mardi 27 septembre 2016

Methods and If statements

these 2 questions are for my programming class. I am extremely new to all this, and I am really struggling trying to figure these out. can someone pleeease help me?

IF STATEMENT This program determines whether a student is eligible to be a varsity athlete.  To be eligible the student must have a GPA of at least 2.8, must have passed a physical exam, and must have earned an average of at least 28 credit hours per year completed. Input from the user: GPA whether a physical has been passed number of years completed number of credit hours completed

METHODS Write methods (which can be in your main class) to do the following: Compute the volume of a cone from its radius and height (no output to screen in this method). Compute the mean of an array of doubles passed in as a parameter (no output to screen in this method). Display an array of Strings on the screen, one per line. Return the largest element in an array of ints.  If the array is empty return Integer.MIN_VALUE  (no output to screen in this method) . You can assign test values to variables in your code.  After the methods are invoked, the main program displays the results on the screen.

any and all help would be greatly appreciated. thanks in advance, sorry I'm so new to this.

Aucun commentaire:

Enregistrer un commentaire