Question:
Homework help, please?
?
2016-09-27 12:19:30 UTC
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.
Three answers:
2016-09-27 21:51:22 UTC
Better late than never right?



So i see you used the term "methods" so i assume this is java.



if statements:



1. Import all your necessary libraries, don't forget your name header too.

2. make the main method.

3. within that, make the scanner object for user input.

4. System.out.println("Aye wats ur GPA?");

5. double gpa = nextDouble(); // use your scanner object as needed

// Do this for all your input needs

6. make an if statement, if (gpa > 2.7 && physicalPassed && (credits / years >= 28)) // i used a boolean value for the physical passed input



The methods part you should try out.
Chris
2016-09-27 12:53:09 UTC
Here's a few lines to get you started: http://ideone.com/VI4gfe
?
2016-09-27 12:42:42 UTC
that's just it I don't know where to start


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...