September 04, 2010, 12:55:01 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  Home Help Media Affiliates Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: MyGrade  (Read 2285 times)
0 Members and 1 Guest are viewing this topic.
Arkie
Javaforums.net Admin
Senior Member
*

Reputation: 16
Developer @ Javaforums.net
Offline Offline
Posts: 2620
Referrals: 13

WWW Awards
« on: July 01, 2007, 03:58:35 PM »

Question:
Create a method that takes 2 parameters and take the average of the two numbers.
Display the numbers and the text based on:

If the grade is exactly 10, display: Your grade: 10 Excellent!
If the grade is lower than 10 but equal or higher than 7, display: Your grade: 8.0 Above Average!
If the grade is lower than 7 but equal or higher than 6, display: Your grade: 6.5 Average!
If the grade is lower than 6 but equal or higher than 1, display: Your grade: 2.0 Bad!
You must also check if the grade(s) given cannot be greater than 10

Code
GeSHi (java):
  1. public void gradeCalculator(double grade1, double grade2) {
  2. // your code here
  3. }
Created by GeSHI 1.0.7.20

Hint 1:

Possible output:
Your grade: 10.0 Excellent!
Your grade: 8.0 Above Average!
Your grade: 6.5 Average!
Your grade: 4.0 Bad!

The anwer(s) will be given after a few days.
Logged

Java and .NET developer

To students: It doesn't matter how hard you've studied; the material won't be on the exam anyway.

Fan of http://www.retardedweblogger.com
Oh man, too much stuff to do in so little time.

http://img222.imageshack....707/arkietomatoesmall.jpg
Blizzcon 2k9 Grubby and Cassandra Ng engaged ! <3
Triple D, eerste Denken Dan Doen
Javaforums.net :: a community about Java software development.
« on: July 01, 2007, 03:58:35 PM »

 Logged
Arkie
Javaforums.net Admin
Senior Member
*

Reputation: 16
Developer @ Javaforums.net
Offline Offline
Posts: 2620
Referrals: 13

WWW Awards
« Reply #1 on: July 06, 2007, 11:29:06 AM »

Possible answer:


Logged

Java and .NET developer

To students: It doesn't matter how hard you've studied; the material won't be on the exam anyway.

Fan of http://www.retardedweblogger.com
Oh man, too much stuff to do in so little time.

http://img222.imageshack....707/arkietomatoesmall.jpg
Blizzcon 2k9 Grubby and Cassandra Ng engaged ! <3
Triple D, eerste Denken Dan Doen
Javaforums.net :: a community about Java software development.
   

Your Ad Here
 Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Your Ad Here
Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC
TinyPortal v0.9.8 © Bloc
Valid XHTML 1.0! Valid CSS!
Page created in 0.277 seconds with 32 queries.

Google visited last this page August 28, 2010, 09:29:05 PM