forked from OOP-ADF/Task_1
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIndexPoint.java
More file actions
62 lines (47 loc) · 1.54 KB
/
IndexPoint.java
File metadata and controls
62 lines (47 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/* Nama : Muhammad Rakha
* Nim : 1301154124
* Kelas : IF 39-12
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package test4;
import java.util.Scanner;
/**
*
* @author Alienware
*/
public class Test4 {
public static void main(String[] args) {
int quiz,uts,uas;
String grade = null;
Scanner input = new Scanner(System.in);
System.out.print("Masukkan Nilai Quiz: ");
quiz=input.nextInt();
System.out.print("Masukkan Nilai UTS: ");
uts=input.nextInt();
System.out.print("Masukkan Nilai UAS: ");
uas=input.nextInt();
int nilai = ((quiz*25)/100)+((35*uts)/100)+((uas*40)/100);
if (nilai >= 85){
grade="EXCELLENT";
}
else if ((nilai >= 75) && (nilai < 85)){
grade="VERY GOOD";
}
else if ((nilai >= 65) && (nilai < 75)){
grade="GOOD";
}
else if ((nilai >= 50) && (nilai < 65)) {
grade="ACCEPTED";
}
else {
grade="FAILED";
}
System.out.println("Hasil adalah : "+nilai);
System.out.println("grade= "+grade);
}
private static void grade(String failed) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
}