At last!
You have a switch with cases for 1,2,3,4 and 5. You enter 70, which is not 1,2,3,4 or 5, so it executes the default. That's how switch is supposed to work.

OK so apart from IF else ... statement cant any other condition be used?

So how am I suppose to use switch in this case..
thats what I want to do

No. If you want to test for numbers being in particular ranges you need if/elseif/else. Switch only works for specific values, not for ranges.

ok then I'll need to use that instead

thanks a lot for your guide
am still learning so kindly take it easy with me

appreciated
regarda

or, as suggested earlier:

switch(score){
case 60:
case 61:
case ...
case 69: print statement; break; // the above will execute everything until the first break (this one) they encounter
...
}

or more likely, you're going to want to have a method to determine the grade based on the score. A switch would be rather impractical...
Something like

if (score < 11) { 
  result = "A";
} else if (score < 21) {
  result = "B";
} else // ... etc ...

would be much more efficient.

... or, while we're having fun...
for the simplest possible code and easiest maintenance, build a TreeMap with the upper bound of each range as key and the grade as value, then use ceilingEntry, eg

     TreeMap<Integer, String> map = new TreeMap<>();
     map.put(10,"A");
     map.put(20,"B");
     map.put(30,"C");

    int score = 15;

    String grade = map.ceilingEntry(score).getValue();

    System.out.println(score + " = " + grade);
package system;
import java.util.Scanner;

public class grade {
    public static void main(String[] args) {

        int grade;
        int fees;
        int examscore;
        int assessment;

        //take inputs from keyboard

        Scanner keyboard = new Scanner(System.in);

        System.out.print("Enter exam score: ");
        examscore = keyboard.nextInt();

        System.out.print("Enter class score: ");
        assessment = keyboard.nextInt();

        System.out.print("Enter fees: ");
        fees = keyboard.nextInt();


        System.out.println("\n\n***************************\n");
        grade = examscore + assessment;
        System.out.println("Total score: " + grade);

        if(examscore >= 25) {
            System.out.println("Passed exams");
        } else {
            System.out.println("Failed exams");
        }

        if(assessment >= 15) {
            System.out.println("Passed assessment");
        } else {
            System.out.println("Failed assessement");
        }

        if(fees >= 100) {
            System.out.println("Fees paid in full");
        } else {
            System.out.println("You owe fees");
        }


        if ( examscore >= 25 &&  assessment >= 15) {
            System.out.println("Certificate allowed ");
        } else if ((examscore == 25 && assessment == 14) || (examscore == 24 && assessment == 15)) {
            grade = examscore + assessment;
            System.out.println("Please you're condoned");
        }else {
            System.out.println("Please you have failed ");
        }

        if (((examscore >= 25 && assessment >= 15) || (examscore == 25 && assessment == 14) || (examscore == 24 && assessment == 15))  &&  fees == 100 ){
            System.out.println("Please issue a certificate ");
        } else{
            System.out.println("You are repeated ");
        }
    }
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.