Lompat ke konten Lompat ke sidebar Lompat ke footer

UAS Algoritma dan Pemrograman Java Netbeans

Soal:


/*
 * 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 ujian;

import java.util.Random;

/**
 * NPM   : 
 * Nama  : 
 * Kelas : 
 */
public class UAS {
    static final String HARI[] = {"Senin","Selasa","Rabu","Kamis","Jum'at","Sabtu","Minggu"}; // Jangan dimodifikasi
    static final String BULAN[] = {"Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agu","Sep","Okt","Nop","Des"}; // Jangan dimodifikasi
    static final String CLUB[] = {"Liverpool","Manchester City","Leicester City","Chelsea","Manchester United",
        "Sheffield United","Wolverhampton","Tottenham Hotspur","Arsenal","Burnley",
        "Crystal Palace","Everton","Newcastle","Southampton","Brighton",
        "West Ham","Watford","Bournemouth","Aston Villa","Norwich City"}; // Jangan dimodifikasi
    static final int JADWAL[][]={ //Pekan , urutan pertandingan, hari, tanggal, bulan tahun, jam, menit, index_Club_Home, index_Club_Away
        {1,1,5,10,7,2019,2,0,0,19}, {1,2,5,10,7,2019,18,30,15,1}, {1,3,5,10,7,2019,21,0,17,5}, {1,4,5,10,7,2019,21,0,9,13}, {1,5,5,10,7,2019,21,0,10,11},
        {1,6,5,10,7,2019,21,0,16,14}, {1,7,5,10,7,2019,23,30,7,18}, {1,8,6,11,7,2019,20,0,2,6}, {1,9,6,11,7,2019,20,0,12,8}, {1,10,6,11,7,2019,22,30,4,3},
        {2,1,5,17,7,2019,18,30,8,9}, {2,2,5,17,7,2019,21,0,18,17}, {2,3,5,17,7,2019,21,0,14,15}, {2,4,5,17,7,2019,21,0,11,16}, {2,5,5,17,7,2019,21,0,19,12},
        {2,6,5,17,7,2019,21,0,13,0}, {2,7,5,17,7,2019,23,30,1,7}, {2,8,6,18,7,2019,20,0,5,10}, {2,9,6,18,7,2019,22,30,3,2}, {2,10,1,20,7,2019,2,0,6,4},
        {3,1,5,24,7,2019,2,0,18,11}, {3,2,5,24,7,2019,18,30,19,3}, {3,3,5,24,7,2019,21,0,14,13}, {3,4,5,24,7,2019,21,0,4,10}, {3,5,5,24,7,2019,21,0,5,2},
        {3,6,5,24,7,2019,21,0,16,15}, {3,7,6,25,7,2019,20,0,17,1}, {3,8,6,25,7,2019,22,30,6,9}, {3,9,5,24,7,2019,23,30,0,8}, {3,10,6,25,7,2019,22,30,7,12},
        {4,1,5,31,7,2019,18,30,13,4}, {4,2,5,31,7,2019,21,0,3,5}, {4,3,5,31,7,2019,21,0,10,18}, {4,4,5,31,7,2019,21,0,2,17}, {4,5,5,31,7,2019,21,0,1,14},
        {4,6,5,31,7,2019,21,0,12,16}, {4,7,5,31,7,2019,21,0,15,19}, {4,8,5,31,7,2019,23,30,9,0}, {4,9,6,1,8,2019,20,0,11,6}, {4,10,6,1,8,2019,22,30,8,7},
        {5,1,5,14,8,2019,18,30,0,12}, {5,2,5,14,8,2019,21,0,14,9}, {5,3,5,14,8,2019,21,0,4,2}, {5,4,5,14,8,2019,21,0,5,13}, {5,5,5,14,8,2019,21,0,7,10},
        {5,6,5,14,8,2019,21,0,6,3}, {5,7,5,14,8,2019,23,30,19,1}, {5,8,6,15,8,2019,20,0,17,11}, {5,9,6,15,8,2019,22,30,16,8}, {5,10,1,17,8,2019,2,0,18,15},
        {6,1,5,21,8,2019,2,0,13,17}, {6,2,5,21,8,2019,18,30,2,7}, {6,3,5,21,8,2019,21,0,9,19}, {6,4,5,21,8,2019,21,0,10,6}, {6,5,5,21,8,2019,21,0,11,5},
        {6,6,5,21,8,2019,21,0,1,16}, {6,7,5,21,8,2019,23,30,12,14}, {6,8,6,22,8,2019,20,0,15,4}, {6,9,6,22,8,2019,22,30,8,18}, {6,10,6,22,8,2019,22,30,3,0},
        {7,1,5,28,8,2019,18,30,5,0}, {7,2,5,28,8,2019,21,0,18,9}, {7,3,5,28,8,2019,21,0,17,15}, {7,4,5,28,8,2019,21,0,3,14}, {7,5,5,28,8,2019,21,0,10,19},
        {7,6,5,28,8,2019,21,0,7,13}, {7,7,5,28,8,2019,21,0,6,16}, {7,8,5,28,8,2019,23,30,2,12}, {7,9,6,29,8,2019,22,30,11,1}, {7,10,1,1,9,2019,2,0,4,8},
        {8,1,5,5,9,2019,21,0,8,17}, {8,2,5,5,9,2019,21,0,14,7}, {8,3,5,5,9,2019,21,0,9,11}, {8,4,5,5,9,2019,21,0,0,2}, {8,5,5,5,9,2019,21,0,1,6},
        {8,6,5,5,9,2019,21,0,12,4}, {8,7,5,5,9,2019,21,0,19,18}, {8,8,5,5,9,2019,21,0,13,3}, {8,9,5,5,9,2019,21,0,16,5}, {8,10,5,5,9,2019,21,0,15,10},
        {9,1,5,19,9,2019,21,0,18,14}, {9,2,5,19,9,2019,21,0,17,19}, {9,3,5,19,9,2019,21,0,3,12}, {9,4,5,19,9,2019,21,0,10,1}, {9,5,5,19,9,2019,21,0,11,15},
        {9,6,5,19,9,2019,21,0,2,9}, {9,7,5,19,9,2019,21,0,4,0}, {9,8,5,19,9,2019,21,0,5,8}, {9,9,5,19,9,2019,21,0,7,16}, {9,10,5,19,9,2019,21,0,6,13},
        {10,1,5,26,9,2019,21,0,8,10}, {10,2,5,26,9,2019,21,0,14,11}, {10,3,5,26,9,2019,21,0,9,3}, {10,4,5,26,9,2019,21,0,0,7}, {10,5,5,26,9,2019,21,0,1,18},
        {10,6,5,26,9,2019,21,0,12,6}, {10,7,5,26,9,2019,21,0,19,4}, {10,8,5,26,9,2019,21,0,13,2}, {10,9,5,26,9,2019,21,0,16,17}, {10,10,5,26,9,2019,21,0,15,5},
        {11,1,5,2,10,2019,22,0,8,6}, {11,2,5,2,10,2019,22,0,18,0}, {11,3,5,2,10,2019,22,0,17,4}, {11,4,5,2,10,2019,22,0,14,19}, {11,5,5,2,10,2019,22,0,10,2},
        {11,6,5,2,10,2019,22,0,11,7}, {11,7,5,2,10,2019,22,0,1,13}, {11,8,5,2,10,2019,22,0,5,9}, {11,9,5,2,10,2019,22,0,16,3}, {11,10,5,2,10,2019,22,0,15,12},
        {12,1,5,9,10,2019,22,0,9,15}, {12,2,5,9,10,2019,22,0,3,10}, {12,3,5,9,10,2019,22,0,2,8}, {12,4,5,9,10,2019,22,0,0,1}, {12,5,5,9,10,2019,22,0,4,14},
        {12,6,5,9,10,2019,22,0,12,17}, {12,7,5,9,10,2019,22,0,19,16}, {12,8,5,9,10,2019,22,0,13,11}, {12,9,5,9,10,2019,22,0,7,5}, {12,10,5,9,10,2019,22,0,6,18},
        {13,1,5,23,10,2019,22,0,8,13}, {13,2,5,23,10,2019,22,0,18,12}, {13,3,5,23,10,2019,22,0,17,6}, {13,4,5,23,10,2019,22,0,14,2}, {13,5,5,23,10,2019,22,0,10,0},
        {13,6,5,23,10,2019,22,0,11,19}, {13,7,5,23,10,2019,22,0,1,3}, {13,8,5,23,10,2019,22,0,5,4}, {13,9,5,23,10,2019,22,0,16,9}, {13,10,5,23,10,2019,22,0,15,7},
        {14,1,5,30,10,2019,22,0,9,10}, {14,2,5,30,10,2019,22,0,3,15}, {14,3,5,30,10,2019,22,0,2,11}, {14,4,5,30,10,2019,22,0,0,14}, {14,5,5,30,10,2019,22,0,4,18},
        {14,6,5,30,10,2019,22,0,12,1}, {14,7,5,30,10,2019,22,0,19,8}, {14,8,5,30,10,2019,22,0,13,16}, {14,9,5,30,10,2019,22,0,7,17}, {14,10,5,30,10,2019,22,0,6,5},
        {15,1,2,4,11,2019,2,45,8,14}, {15,2,2,4,11,2019,2,45,9,1}, {15,3,2,4,11,2019,2,45,2,16}, {15,4,2,4,11,2019,2,45,5,12}, {15,5,2,4,11,2019,2,45,6,15},
        {15,6,2,4,11,2019,3,0,4,7}, {15,7,3,5,11,2019,2,45,3,18}, {15,8,3,5,11,2019,2,45,13,19}, {15,9,3,5,11,2019,3,0,10,17}, {15,10,3,5,11,2019,3,0,0,11},
        {16,1,5,7,11,2019,22,0,18,2}, {16,2,5,7,11,2019,22,0,17,0}, {16,3,5,7,11,2019,22,0,14,6}, {16,4,5,7,11,2019,22,0,11,3}, {16,5,5,7,11,2019,22,0,1,4},
        {16,6,5,7,11,2019,22,0,12,13}, {16,7,5,7,11,2019,22,0,19,5}, {16,8,5,7,11,2019,22,0,7,9}, {16,9,5,7,11,2019,22,0,16,10}, {16,10,5,7,11,2019,22,0,15,8},
        {17,1,5,14,11,2019,22,0,8,1}, {17,2,5,14,11,2019,22,0,9,12}, {17,3,5,14,11,2019,22,0,3,17}, {17,4,5,14,11,2019,22,0,10,14}, {17,5,5,14,11,2019,22,0,2,19},
        {17,6,5,14,11,2019,22,0,0,16}, {17,7,5,14,11,2019,22,0,4,11}, {17,8,5,14,11,2019,22,0,5,18}, {17,9,5,14,11,2019,22,0,13,15}, {17,10,5,14,11,2019,22,0,6,7},
        {18,1,5,21,11,2019,22,0,18,13}, {18,2,5,21,11,2019,22,0,17,9}, {18,3,5,21,11,2019,22,0,14,5}, {18,4,5,21,11,2019,22,0,11,8}, {18,5,5,21,11,2019,22,0,1,2},
        {18,6,5,21,11,2019,22,0,12,10}, {18,7,5,21,11,2019,22,0,19,6}, {18,8,5,21,11,2019,22,0,7,3}, {18,9,5,21,11,2019,22,0,16,4}, {18,10,5,21,11,2019,22,0,15,0},
        {19,1,3,26,11,2019,22,0,18,19}, {19,2,3,26,11,2019,22,0,17,8}, {19,3,3,26,11,2019,22,0,3,13}, {19,4,3,26,11,2019,22,0,10,15}, {19,5,3,26,11,2019,22,0,11,9},
        {19,6,3,26,11,2019,22,0,2,0}, {19,7,3,26,11,2019,22,0,4,12}, {19,8,3,26,11,2019,22,0,5,16}, {19,9,3,26,11,2019,22,0,7,14}, {19,10,3,26,11,2019,22,0,6,1},
        {20,1,5,28,11,2019,22,0,8,3}, {20,2,5,28,11,2019,22,0,14,17}, {20,3,5,28,11,2019,22,0,9,4}, {20,4,5,28,11,2019,22,0,0,6}, {20,5,5,28,11,2019,22,0,1,5},
        {20,6,5,28,11,2019,22,0,12,11}, {20,7,5,28,11,2019,22,0,19,7}, {20,8,5,28,11,2019,22,0,13,10}, {20,9,5,28,11,2019,22,0,16,18}, {20,10,5,28,11,2019,22,0,15,2},
        {21,1,2,1,0,2020,22,0,8,4}, {21,2,2,1,0,2020,22,0,14,3}, {21,3,2,1,0,2020,22,0,9,18}, {21,4,2,1,0,2020,22,0,0,5}, {21,5,2,1,0,2020,22,0,1,11},
        {21,6,2,1,0,2020,22,0,12,2}, {21,7,2,1,0,2020,22,0,19,10}, {21,8,2,1,0,2020,22,0,13,7}, {21,9,2,1,0,2020,22,0,16,6}, {21,10,2,1,0,2020,22,0,15,17},
        {22,1,5,11,0,2020,22,0,18,1}, {22,2,5,11,0,2020,22,0,17,16}, {22,3,5,11,0,2020,22,0,3,9}, {22,4,5,11,0,2020,22,0,10,8}, {22,5,5,11,0,2020,22,0,11,14},
        {22,6,5,11,0,2020,22,0,2,13}, {22,7,5,11,0,2020,22,0,4,19}, {22,8,5,11,0,2020,22,0,5,15}, {22,9,5,11,0,2020,22,0,7,0}, {22,10,5,11,0,2020,22,0,6,12},
        {23,1,5,18,0,2020,22,0,8,5}, {23,2,5,18,0,2020,22,0,14,18}, {23,3,5,18,0,2020,22,0,9,2}, {23,4,5,18,0,2020,22,0,0,4}, {23,5,5,18,0,2020,22,0,1,10},
        {23,6,5,18,0,2020,22,0,12,3}, {23,7,5,18,0,2020,22,0,19,17}, {23,8,5,18,0,2020,22,0,13,6}, {23,9,5,18,0,2020,22,0,16,7}, {23,10,5,18,0,2020,22,0,15,11},
        {24,1,2,22,0,2020,2,45,18,16}, {24,2,2,22,0,2020,2,45,17,14}, {24,3,2,22,0,2020,2,45,11,12}, {24,4,2,22,0,2020,2,45,2,15}, {24,5,2,22,0,2020,2,45,5,1},
        {24,6,2,22,0,2020,2,45,6,0}, {24,7,2,22,0,2020,3,0,4,9}, {24,8,3,23,0,2020,2,45,3,8}, {24,9,3,23,0,2020,2,45,7,19}, {24,10,3,23,0,2020,3,0,10,13},
        {25,1,5,1,1,2020,22,0,17,18}, {25,2,5,1,1,2020,22,0,9,8}, {25,3,5,1,1,2020,22,0,10,5}, {25,4,5,1,1,2020,22,0,2,3}, {25,5,5,1,1,2020,22,0,0,13},
        {25,6,5,1,1,2020,22,0,4,6}, {25,7,5,1,1,2020,22,0,12,19}, {25,8,5,1,1,2020,22,0,7,1}, {25,9,5,1,1,2020,22,0,16,11}, {25,10,5,1,1,2020,22,0,15,14},
        {26,1,5,8,1,2020,22,0,8,12}, {26,2,5,8,1,2020,22,0,18,7}, {26,3,5,8,1,2020,22,0,14,16}, {26,4,5,8,1,2020,22,0,3,4}, {26,5,5,8,1,2020,22,0,11,10},
        {26,6,5,8,1,2020,22,0,1,15}, {26,7,5,8,1,2020,22,0,19,0}, {26,8,5,8,1,2020,22,0,5,17}, {26,9,5,8,1,2020,22,0,13,9}, {26,10,5,8,1,2020,22,0,6,2},
        {27,1,5,22,1,2020,22,0,8,11}, {27,2,5,22,1,2020,22,0,9,17}, {27,3,5,22,1,2020,22,0,3,7}, {27,4,5,22,1,2020,22,0,10,12}, {27,5,5,22,1,2020,22,0,2,1},
        {27,6,5,22,1,2020,22,0,0,15}, {27,7,5,22,1,2020,22,0,4,16}, {27,8,5,22,1,2020,22,0,5,14}, {27,9,5,22,1,2020,22,0,13,18}, {27,10,5,22,1,2020,22,0,6,19},
        {28,1,5,29,1,2020,22,0,18,5}, {28,2,5,29,1,2020,22,0,17,3}, {28,3,5,29,1,2020,22,0,14,10}, {28,4,5,29,1,2020,22,0,11,4}, {28,5,5,29,1,2020,22,0,1,8},
        {28,6,5,29,1,2020,22,0,12,9}, {28,7,5,29,1,2020,22,0,19,2}, {28,8,5,29,1,2020,22,0,7,6}, {28,9,5,29,1,2020,22,0,16,0}, {28,10,5,29,1,2020,22,0,15,13},
        {29,1,5,7,2,2020,22,0,8,15}, {29,2,5,7,2,2020,22,0,9,7}, {29,3,5,7,2,2020,22,0,3,11}, {29,4,5,7,2,2020,22,0,10,16}, {29,5,5,7,2,2020,22,0,2,18},
        {29,6,5,7,2,2020,22,0,0,17}, {29,7,5,7,2,2020,22,0,4,1}, {29,8,5,7,2,2020,22,0,5,19}, {29,9,5,7,2,2020,22,0,13,12}, {29,10,5,7,2,2020,22,0,6,14},
        {30,1,5,14,2,2020,22,0,18,3}, {30,2,5,14,2,2020,22,0,17,10}, {30,3,5,14,2,2020,22,0,14,8}, {30,4,5,14,2,2020,22,0,11,0}, {30,5,5,14,2,2020,22,0,1,9},
        {30,6,5,14,2,2020,22,0,12,5}, {30,7,5,14,2,2020,22,0,19,13}, {30,8,5,14,2,2020,22,0,7,4}, {30,9,5,14,2,2020,22,0,16,2}, {30,10,5,14,2,2020,22,0,15,6},
        {31,1,5,21,2,2020,22,0,9,16}, {31,2,5,21,2,2020,22,0,3,1}, {31,3,5,21,2,2020,22,0,2,14}, {31,4,5,21,2,2020,22,0,0,10}, {31,5,5,21,2,2020,22,0,4,5},
        {31,6,5,21,2,2020,22,0,12,18}, {31,7,5,21,2,2020,22,0,19,11}, {31,8,5,21,2,2020,22,0,13,8}, {31,9,5,21,2,2020,22,0,7,15}, {31,10,5,21,2,2020,22,0,6,17},
        {32,1,5,4,3,2020,21,0,8,19}, {32,2,5,4,3,2020,21,0,18,6}, {32,3,5,4,3,2020,21,0,17,12}, {32,4,5,4,3,2020,21,0,14,4}, {32,5,5,4,3,2020,21,0,10,9},
        {32,6,5,4,3,2020,21,0,11,2}, {32,7,5,4,3,2020,21,0,1,0}, {32,8,5,4,3,2020,21,0,5,7}, {32,9,5,4,3,2020,21,0,16,13}, {32,10,5,4,3,2020,21,0,15,3},
        {33,1,5,11,3,2020,21,0,9,5}, {33,2,5,11,3,2020,21,0,3,16}, {33,3,5,11,3,2020,21,0,2,10}, {33,4,5,11,3,2020,21,0,0,18}, {33,5,5,11,3,2020,21,0,4,17},
        {33,6,5,11,3,2020,21,0,12,15}, {33,7,5,11,3,2020,21,0,19,14}, {33,8,5,11,3,2020,21,0,13,1}, {33,9,5,11,3,2020,21,0,7,11}, {33,10,5,11,3,2020,21,0,6,8},
        {34,1,5,18,3,2020,21,0,8,2}, {34,2,5,18,3,2020,21,0,18,4}, {34,3,5,18,3,2020,21,0,17,7}, {34,4,5,18,3,2020,21,0,14,0}, {34,5,5,18,3,2020,21,0,10,3},
        {34,6,5,18,3,2020,21,0,11,13}, {34,7,5,18,3,2020,21,0,1,12}, {34,8,5,18,3,2020,21,0,5,6}, {34,9,5,18,3,2020,21,0,16,19}, {34,10,5,18,3,2020,21,0,15,9},
        {35,1,5,25,3,2020,21,0,18,10}, {35,2,5,25,3,2020,21,0,17,2}, {35,3,5,25,3,2020,21,0,14,1}, {35,4,5,25,3,2020,21,0,0,9}, {35,5,5,25,3,2020,21,0,4,13},
        {35,6,5,25,3,2020,21,0,19,15}, {35,7,5,25,3,2020,21,0,5,3}, {35,8,5,25,3,2020,21,0,7,8}, {35,9,5,25,3,2020,21,0,16,12}, {35,10,5,25,3,2020,21,0,6,11},
        {36,1,5,2,4,2020,21,0,8,0}, {36,2,5,2,4,2020,21,0,9,6}, {36,3,5,2,4,2020,21,0,3,19}, {36,4,5,2,4,2020,21,0,10,4}, {36,5,5,2,4,2020,21,0,11,18},
        {36,6,5,2,4,2020,21,0,2,5}, {36,7,5,2,4,2020,21,0,1,17}, {36,8,5,2,4,2020,21,0,12,7}, {36,9,5,2,4,2020,21,0,13,14}, {36,10,5,2,4,2020,21,0,15,16},
        {37,1,5,9,4,2020,21,0,18,8}, {37,2,5,9,4,2020,21,0,17,13}, {37,3,5,9,4,2020,21,0,14,12}, {37,4,5,9,4,2020,21,0,0,3}, {37,5,5,9,4,2020,21,0,4,15},
        {37,6,5,9,4,2020,21,0,19,9}, {37,7,5,9,4,2020,21,0,5,11}, {37,8,5,9,4,2020,21,0,7,2}, {37,9,5,9,4,2020,21,0,16,1}, {37,10,5,9,4,2020,21,0,6,10},
        {38,1,6,17,4,2020,21,0,8,16}, {38,2,6,17,4,2020,21,0,9,14}, {38,3,6,17,4,2020,21,0,3,6}, {38,4,6,17,4,2020,21,0,10,7}, {38,5,6,17,4,2020,21,0,11,17},
        {38,6,6,17,4,2020,21,0,2,4}, {38,7,6,17,4,2020,21,0,1,19}, {38,8,6,17,4,2020,21,0,12,0}, {38,9,6,17,4,2020,21,0,13,5}, {38,10,6,17,4,2020,21,0,15,18}
    }; // Jangan dimodifikasi
    static int SKOR_PERTANDINGAN[][] = new int[JADWAL.length][2]; // Jangan dimodifikasi
    static Random R = new Random(); // Jangan dimodifikasi
    
    static int getSkorAkhir(){
        return R.nextInt(5);
    }
    
    static void setSkorAkhirPertandingan(int i){
        SKOR_PERTANDINGAN[i][0] = getSkorAkhir(); //Skor Akhir Club Home
        SKOR_PERTANDINGAN[i][1] = getSkorAkhir(); //Skor Akhir Club Away
    }
    
    static void tampilkanPertandingan(int i) {
        int jadwal[] = JADWAL[i];
        System.out.println(jadwal[0]+" ; "+jadwal[1]+" ; "+HARI[jadwal[2]]+", "+jadwal[3]+"-"+BULAN[jadwal[4]]+"-"+jadwal[5]+" ; "+jadwal[6]+":"+jadwal[7]+" ; "+CLUB[jadwal[8]]+" >< "+CLUB[jadwal[9]]);
    }
    
    static void tampilkanHasilPertandingan(int i) {
        int jadwal[] = JADWAL[i];
        System.out.println(jadwal[0]+" ; "+jadwal[1]+" ; "+HARI[jadwal[2]]+", "+jadwal[3]+"-"+BULAN[jadwal[4]]+"-"+jadwal[5]+" ; "+jadwal[6]+":"+jadwal[7]+" ; "+CLUB[jadwal[8]]+" >< "+CLUB[jadwal[9]]+" = "+SKOR_PERTANDINGAN[i][0]+" >< "+SKOR_PERTANDINGAN[i][1]);
    }
    
    public static void main(String[] args) {
        //Contoh cara penggunggan (silakan dihapus saat dikumpulkan)
        tampilkanPertandingan(0);
        //Sebelum hasil akhir ditampilkan, set skor hasil pertandingan terlebih dahulu
        setSkorAkhirPertandingan(0);
        tampilkanHasilPertandingan(0);
        
        /*
        SOAL :
        Buat coding untuk membuat menu utama yang berisi pilihan :
        1. Tampilkan Semua Pertandingan
        2. Tampilkan Hasil Semua Pertandingan
        3. Tampilkan Pertandingan Club tertentu
        4. Tampilkan Hasil Pertandingan Club tertentu
        5. Tampilkan Tabel Klasemen, tidak terurut
        6. Tampilkan Tabel Klasemen, terurut
        7. Tampilkan Nama Club Pemenang
        8. Keluar
        
        Kemudian lanjutkan coding untuk menampilkan tampilan pilihan yang diminta, dengan memanggil fungsi di bawah funsi main.
        Sebelumnya buat dahulu coding pada tiap fungsi yang ada.
        
        fungsi-fungsi yang berada di atas fungsi main tidak boleh dimodifikasi.
        
        Cara Mengumpulkan Jawaban :
        1. Lengkapi identitas kalian pada line 9, 10 & 11.
        2. Cetak file UAS.java ke format PDF (bukan screenshot/print-screen), simpan dengan nama UAS.pdf.
        3. Unggah File UAS.pdf ke Folder UJIAN, ada di Folder yang sudah saya bagikan sebelumnya.
        4. Batas Akhir Pengunggahan 10 Juli 2020. Urutan pengumpulan = Bonus kelipatan 5.
        5. Jika ingin konsultasi secara langsung silakan ikuti petunjuk yang sudah saya berikan atau silakan posting di grup Telegram Aplro2 atau Japri jika ingin privat.
        6. Yang dinilai: Usaha Anda untuk mengerjakan, bukan tingkat kebenaran jawaban.
        
        Revisi coding per 22 Juni 2020 :
        1. line 22 : update nilai indeks Bulan dari 1 s.d 12 menjadi 0 s.d 11
        2. line 101 : penambahan Variabel R untuk menghasilkan bilangan acak dan import pada line 8.
        3. line 104 : update coding untuk mengahasilkan skor secara acak
        
        Bila ada kesalahan dari saya, silakan posting di grup
        */
    }
    
    static void tampilkanSemuaPertandingan(){
        //Silakan buat coding untuk menampilkan semua pertandingan
    }
    
    static void tampilkanHasilSemuaPertandingan(){
        //Silakan buat coding untuk menampilkan semua pertandingan, beserta hasil akhir pertandingannya.
    }
    
    static void tampilkanPertandinganClub(int i){
        //Silakan buat coding untuk menampilkan semua pertandingan dimana club ke-i bertanding sebagai Home atau Away.
    }
    
    static void tampilkanPertandinganClubDanHasil(int i){
        //Silakan buat coding untuk menampilkan semua pertandingan dimana club ke-i bertanding sebagai Home atau Away, beserta hasil akhir pertandingannya.
    }
    
    static void tampilkanKlasemen(){
        /*
        Silakan buat coding untuk menampilkan Hasil Klasemen (peraturan bisa di-googling atau tanya teman) tanpa diurutkan.
        Jika Perlu Array untuk bantuan silakan.
        Format Output :
        Nomor ; Nama Club ; Banyak pertandingan yang dimenangkan ; Banyak pertandingan yang seri ; Banyak pertandingan yang kalah ; Banyak Gol yang dicetak ; Banyak Gol yang masuk ke gawang ; Selisih Gol yang dicetak dgn yg masuk k gawang ; Poin Skor.
        */
    }
    
    static void tampilkanKlasemenUrut(){
        //Sama dengan tampilkanKlasemen, tetapi hasilnya diurutkan berdasarkan Poin Skor yang didapat.
    }
    
    static void tamplikanNamaClubYangMenang(){
        //Silakan buat coding untuk menampilkan Nama Club yang mempunyai Poin Skor tertinggi (sesuai aturan Klasemen)
    }
}

Jawaban:


/*
 * 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 uas;
import java.util.Random;
import java.util.Scanner;
/**
 * NPM   : 19.1.03.02.0145
 * Nama  : HELMY KURNIAWAN
 * Kelas : 1G/TRANSFER KARYAWAN
 */
public class UAS {
    static final String HARI[] = {"Senin","Selasa","Rabu","Kamis","Jum'at","Sabtu","Minggu"}; // Jangan dimodifikasi
    static final String BULAN[] = {"Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agu","Sep","Okt","Nop","Des"}; // Jangan dimodifikasi
    static final String CLUB[] = {"Liverpool","Manchester City","Leicester City","Chelsea","Manchester United",
        "Sheffield United","Wolverhampton","Tottenham Hotspur","Arsenal","Burnley",
        "Crystal Palace","Everton","Newcastle","Southampton","Brighton",
        "West Ham","Watford","Bournemouth","Aston Villa","Norwich City"}; // Jangan dimodifikasi
    static final int JADWAL[][]={ //Pekan , urutan pertandingan, hari, tanggal, bulan tahun, jam, menit, index_Club_Home, index_Club_Away
        {1,1,5,10,7,2019,2,0,0,19}, {1,2,5,10,7,2019,18,30,15,1}, {1,3,5,10,7,2019,21,0,17,5}, {1,4,5,10,7,2019,21,0,9,13}, {1,5,5,10,7,2019,21,0,10,11},
        {1,6,5,10,7,2019,21,0,16,14}, {1,7,5,10,7,2019,23,30,7,18}, {1,8,6,11,7,2019,20,0,2,6}, {1,9,6,11,7,2019,20,0,12,8}, {1,10,6,11,7,2019,22,30,4,3},
        {2,1,5,17,7,2019,18,30,8,9}, {2,2,5,17,7,2019,21,0,18,17}, {2,3,5,17,7,2019,21,0,14,15}, {2,4,5,17,7,2019,21,0,11,16}, {2,5,5,17,7,2019,21,0,19,12},
        {2,6,5,17,7,2019,21,0,13,0}, {2,7,5,17,7,2019,23,30,1,7}, {2,8,6,18,7,2019,20,0,5,10}, {2,9,6,18,7,2019,22,30,3,2}, {2,10,1,20,7,2019,2,0,6,4},
        {3,1,5,24,7,2019,2,0,18,11}, {3,2,5,24,7,2019,18,30,19,3}, {3,3,5,24,7,2019,21,0,14,13}, {3,4,5,24,7,2019,21,0,4,10}, {3,5,5,24,7,2019,21,0,5,2},
        {3,6,5,24,7,2019,21,0,16,15}, {3,7,6,25,7,2019,20,0,17,1}, {3,8,6,25,7,2019,22,30,6,9}, {3,9,5,24,7,2019,23,30,0,8}, {3,10,6,25,7,2019,22,30,7,12},
        {4,1,5,31,7,2019,18,30,13,4}, {4,2,5,31,7,2019,21,0,3,5}, {4,3,5,31,7,2019,21,0,10,18}, {4,4,5,31,7,2019,21,0,2,17}, {4,5,5,31,7,2019,21,0,1,14},
        {4,6,5,31,7,2019,21,0,12,16}, {4,7,5,31,7,2019,21,0,15,19}, {4,8,5,31,7,2019,23,30,9,0}, {4,9,6,1,8,2019,20,0,11,6}, {4,10,6,1,8,2019,22,30,8,7},
        {5,1,5,14,8,2019,18,30,0,12}, {5,2,5,14,8,2019,21,0,14,9}, {5,3,5,14,8,2019,21,0,4,2}, {5,4,5,14,8,2019,21,0,5,13}, {5,5,5,14,8,2019,21,0,7,10},
        {5,6,5,14,8,2019,21,0,6,3}, {5,7,5,14,8,2019,23,30,19,1}, {5,8,6,15,8,2019,20,0,17,11}, {5,9,6,15,8,2019,22,30,16,8}, {5,10,1,17,8,2019,2,0,18,15},
        {6,1,5,21,8,2019,2,0,13,17}, {6,2,5,21,8,2019,18,30,2,7}, {6,3,5,21,8,2019,21,0,9,19}, {6,4,5,21,8,2019,21,0,10,6}, {6,5,5,21,8,2019,21,0,11,5},
        {6,6,5,21,8,2019,21,0,1,16}, {6,7,5,21,8,2019,23,30,12,14}, {6,8,6,22,8,2019,20,0,15,4}, {6,9,6,22,8,2019,22,30,8,18}, {6,10,6,22,8,2019,22,30,3,0},
        {7,1,5,28,8,2019,18,30,5,0}, {7,2,5,28,8,2019,21,0,18,9}, {7,3,5,28,8,2019,21,0,17,15}, {7,4,5,28,8,2019,21,0,3,14}, {7,5,5,28,8,2019,21,0,10,19},
        {7,6,5,28,8,2019,21,0,7,13}, {7,7,5,28,8,2019,21,0,6,16}, {7,8,5,28,8,2019,23,30,2,12}, {7,9,6,29,8,2019,22,30,11,1}, {7,10,1,1,9,2019,2,0,4,8},
        {8,1,5,5,9,2019,21,0,8,17}, {8,2,5,5,9,2019,21,0,14,7}, {8,3,5,5,9,2019,21,0,9,11}, {8,4,5,5,9,2019,21,0,0,2}, {8,5,5,5,9,2019,21,0,1,6},
        {8,6,5,5,9,2019,21,0,12,4}, {8,7,5,5,9,2019,21,0,19,18}, {8,8,5,5,9,2019,21,0,13,3}, {8,9,5,5,9,2019,21,0,16,5}, {8,10,5,5,9,2019,21,0,15,10},
        {9,1,5,19,9,2019,21,0,18,14}, {9,2,5,19,9,2019,21,0,17,19}, {9,3,5,19,9,2019,21,0,3,12}, {9,4,5,19,9,2019,21,0,10,1}, {9,5,5,19,9,2019,21,0,11,15},
        {9,6,5,19,9,2019,21,0,2,9}, {9,7,5,19,9,2019,21,0,4,0}, {9,8,5,19,9,2019,21,0,5,8}, {9,9,5,19,9,2019,21,0,7,16}, {9,10,5,19,9,2019,21,0,6,13},
        {10,1,5,26,9,2019,21,0,8,10}, {10,2,5,26,9,2019,21,0,14,11}, {10,3,5,26,9,2019,21,0,9,3}, {10,4,5,26,9,2019,21,0,0,7}, {10,5,5,26,9,2019,21,0,1,18},
        {10,6,5,26,9,2019,21,0,12,6}, {10,7,5,26,9,2019,21,0,19,4}, {10,8,5,26,9,2019,21,0,13,2}, {10,9,5,26,9,2019,21,0,16,17}, {10,10,5,26,9,2019,21,0,15,5},
        {11,1,5,2,10,2019,22,0,8,6}, {11,2,5,2,10,2019,22,0,18,0}, {11,3,5,2,10,2019,22,0,17,4}, {11,4,5,2,10,2019,22,0,14,19}, {11,5,5,2,10,2019,22,0,10,2},
        {11,6,5,2,10,2019,22,0,11,7}, {11,7,5,2,10,2019,22,0,1,13}, {11,8,5,2,10,2019,22,0,5,9}, {11,9,5,2,10,2019,22,0,16,3}, {11,10,5,2,10,2019,22,0,15,12},
        {12,1,5,9,10,2019,22,0,9,15}, {12,2,5,9,10,2019,22,0,3,10}, {12,3,5,9,10,2019,22,0,2,8}, {12,4,5,9,10,2019,22,0,0,1}, {12,5,5,9,10,2019,22,0,4,14},
        {12,6,5,9,10,2019,22,0,12,17}, {12,7,5,9,10,2019,22,0,19,16}, {12,8,5,9,10,2019,22,0,13,11}, {12,9,5,9,10,2019,22,0,7,5}, {12,10,5,9,10,2019,22,0,6,18},
        {13,1,5,23,10,2019,22,0,8,13}, {13,2,5,23,10,2019,22,0,18,12}, {13,3,5,23,10,2019,22,0,17,6}, {13,4,5,23,10,2019,22,0,14,2}, {13,5,5,23,10,2019,22,0,10,0},
        {13,6,5,23,10,2019,22,0,11,19}, {13,7,5,23,10,2019,22,0,1,3}, {13,8,5,23,10,2019,22,0,5,4}, {13,9,5,23,10,2019,22,0,16,9}, {13,10,5,23,10,2019,22,0,15,7},
        {14,1,5,30,10,2019,22,0,9,10}, {14,2,5,30,10,2019,22,0,3,15}, {14,3,5,30,10,2019,22,0,2,11}, {14,4,5,30,10,2019,22,0,0,14}, {14,5,5,30,10,2019,22,0,4,18},
        {14,6,5,30,10,2019,22,0,12,1}, {14,7,5,30,10,2019,22,0,19,8}, {14,8,5,30,10,2019,22,0,13,16}, {14,9,5,30,10,2019,22,0,7,17}, {14,10,5,30,10,2019,22,0,6,5},
        {15,1,2,4,11,2019,2,45,8,14}, {15,2,2,4,11,2019,2,45,9,1}, {15,3,2,4,11,2019,2,45,2,16}, {15,4,2,4,11,2019,2,45,5,12}, {15,5,2,4,11,2019,2,45,6,15},
        {15,6,2,4,11,2019,3,0,4,7}, {15,7,3,5,11,2019,2,45,3,18}, {15,8,3,5,11,2019,2,45,13,19}, {15,9,3,5,11,2019,3,0,10,17}, {15,10,3,5,11,2019,3,0,0,11},
        {16,1,5,7,11,2019,22,0,18,2}, {16,2,5,7,11,2019,22,0,17,0}, {16,3,5,7,11,2019,22,0,14,6}, {16,4,5,7,11,2019,22,0,11,3}, {16,5,5,7,11,2019,22,0,1,4},
        {16,6,5,7,11,2019,22,0,12,13}, {16,7,5,7,11,2019,22,0,19,5}, {16,8,5,7,11,2019,22,0,7,9}, {16,9,5,7,11,2019,22,0,16,10}, {16,10,5,7,11,2019,22,0,15,8},
        {17,1,5,14,11,2019,22,0,8,1}, {17,2,5,14,11,2019,22,0,9,12}, {17,3,5,14,11,2019,22,0,3,17}, {17,4,5,14,11,2019,22,0,10,14}, {17,5,5,14,11,2019,22,0,2,19},
        {17,6,5,14,11,2019,22,0,0,16}, {17,7,5,14,11,2019,22,0,4,11}, {17,8,5,14,11,2019,22,0,5,18}, {17,9,5,14,11,2019,22,0,13,15}, {17,10,5,14,11,2019,22,0,6,7},
        {18,1,5,21,11,2019,22,0,18,13}, {18,2,5,21,11,2019,22,0,17,9}, {18,3,5,21,11,2019,22,0,14,5}, {18,4,5,21,11,2019,22,0,11,8}, {18,5,5,21,11,2019,22,0,1,2},
        {18,6,5,21,11,2019,22,0,12,10}, {18,7,5,21,11,2019,22,0,19,6}, {18,8,5,21,11,2019,22,0,7,3}, {18,9,5,21,11,2019,22,0,16,4}, {18,10,5,21,11,2019,22,0,15,0},
        {19,1,3,26,11,2019,22,0,18,19}, {19,2,3,26,11,2019,22,0,17,8}, {19,3,3,26,11,2019,22,0,3,13}, {19,4,3,26,11,2019,22,0,10,15}, {19,5,3,26,11,2019,22,0,11,9},
        {19,6,3,26,11,2019,22,0,2,0}, {19,7,3,26,11,2019,22,0,4,12}, {19,8,3,26,11,2019,22,0,5,16}, {19,9,3,26,11,2019,22,0,7,14}, {19,10,3,26,11,2019,22,0,6,1},
        {20,1,5,28,11,2019,22,0,8,3}, {20,2,5,28,11,2019,22,0,14,17}, {20,3,5,28,11,2019,22,0,9,4}, {20,4,5,28,11,2019,22,0,0,6}, {20,5,5,28,11,2019,22,0,1,5},
        {20,6,5,28,11,2019,22,0,12,11}, {20,7,5,28,11,2019,22,0,19,7}, {20,8,5,28,11,2019,22,0,13,10}, {20,9,5,28,11,2019,22,0,16,18}, {20,10,5,28,11,2019,22,0,15,2},
        {21,1,2,1,0,2020,22,0,8,4}, {21,2,2,1,0,2020,22,0,14,3}, {21,3,2,1,0,2020,22,0,9,18}, {21,4,2,1,0,2020,22,0,0,5}, {21,5,2,1,0,2020,22,0,1,11},
        {21,6,2,1,0,2020,22,0,12,2}, {21,7,2,1,0,2020,22,0,19,10}, {21,8,2,1,0,2020,22,0,13,7}, {21,9,2,1,0,2020,22,0,16,6}, {21,10,2,1,0,2020,22,0,15,17},
        {22,1,5,11,0,2020,22,0,18,1}, {22,2,5,11,0,2020,22,0,17,16}, {22,3,5,11,0,2020,22,0,3,9}, {22,4,5,11,0,2020,22,0,10,8}, {22,5,5,11,0,2020,22,0,11,14},
        {22,6,5,11,0,2020,22,0,2,13}, {22,7,5,11,0,2020,22,0,4,19}, {22,8,5,11,0,2020,22,0,5,15}, {22,9,5,11,0,2020,22,0,7,0}, {22,10,5,11,0,2020,22,0,6,12},
        {23,1,5,18,0,2020,22,0,8,5}, {23,2,5,18,0,2020,22,0,14,18}, {23,3,5,18,0,2020,22,0,9,2}, {23,4,5,18,0,2020,22,0,0,4}, {23,5,5,18,0,2020,22,0,1,10},
        {23,6,5,18,0,2020,22,0,12,3}, {23,7,5,18,0,2020,22,0,19,17}, {23,8,5,18,0,2020,22,0,13,6}, {23,9,5,18,0,2020,22,0,16,7}, {23,10,5,18,0,2020,22,0,15,11},
        {24,1,2,22,0,2020,2,45,18,16}, {24,2,2,22,0,2020,2,45,17,14}, {24,3,2,22,0,2020,2,45,11,12}, {24,4,2,22,0,2020,2,45,2,15}, {24,5,2,22,0,2020,2,45,5,1},
        {24,6,2,22,0,2020,2,45,6,0}, {24,7,2,22,0,2020,3,0,4,9}, {24,8,3,23,0,2020,2,45,3,8}, {24,9,3,23,0,2020,2,45,7,19}, {24,10,3,23,0,2020,3,0,10,13},
        {25,1,5,1,1,2020,22,0,17,18}, {25,2,5,1,1,2020,22,0,9,8}, {25,3,5,1,1,2020,22,0,10,5}, {25,4,5,1,1,2020,22,0,2,3}, {25,5,5,1,1,2020,22,0,0,13},
        {25,6,5,1,1,2020,22,0,4,6}, {25,7,5,1,1,2020,22,0,12,19}, {25,8,5,1,1,2020,22,0,7,1}, {25,9,5,1,1,2020,22,0,16,11}, {25,10,5,1,1,2020,22,0,15,14},
        {26,1,5,8,1,2020,22,0,8,12}, {26,2,5,8,1,2020,22,0,18,7}, {26,3,5,8,1,2020,22,0,14,16}, {26,4,5,8,1,2020,22,0,3,4}, {26,5,5,8,1,2020,22,0,11,10},
        {26,6,5,8,1,2020,22,0,1,15}, {26,7,5,8,1,2020,22,0,19,0}, {26,8,5,8,1,2020,22,0,5,17}, {26,9,5,8,1,2020,22,0,13,9}, {26,10,5,8,1,2020,22,0,6,2},
        {27,1,5,22,1,2020,22,0,8,11}, {27,2,5,22,1,2020,22,0,9,17}, {27,3,5,22,1,2020,22,0,3,7}, {27,4,5,22,1,2020,22,0,10,12}, {27,5,5,22,1,2020,22,0,2,1},
        {27,6,5,22,1,2020,22,0,0,15}, {27,7,5,22,1,2020,22,0,4,16}, {27,8,5,22,1,2020,22,0,5,14}, {27,9,5,22,1,2020,22,0,13,18}, {27,10,5,22,1,2020,22,0,6,19},
        {28,1,5,29,1,2020,22,0,18,5}, {28,2,5,29,1,2020,22,0,17,3}, {28,3,5,29,1,2020,22,0,14,10}, {28,4,5,29,1,2020,22,0,11,4}, {28,5,5,29,1,2020,22,0,1,8},
        {28,6,5,29,1,2020,22,0,12,9}, {28,7,5,29,1,2020,22,0,19,2}, {28,8,5,29,1,2020,22,0,7,6}, {28,9,5,29,1,2020,22,0,16,0}, {28,10,5,29,1,2020,22,0,15,13},
        {29,1,5,7,2,2020,22,0,8,15}, {29,2,5,7,2,2020,22,0,9,7}, {29,3,5,7,2,2020,22,0,3,11}, {29,4,5,7,2,2020,22,0,10,16}, {29,5,5,7,2,2020,22,0,2,18},
        {29,6,5,7,2,2020,22,0,0,17}, {29,7,5,7,2,2020,22,0,4,1}, {29,8,5,7,2,2020,22,0,5,19}, {29,9,5,7,2,2020,22,0,13,12}, {29,10,5,7,2,2020,22,0,6,14},
        {30,1,5,14,2,2020,22,0,18,3}, {30,2,5,14,2,2020,22,0,17,10}, {30,3,5,14,2,2020,22,0,14,8}, {30,4,5,14,2,2020,22,0,11,0}, {30,5,5,14,2,2020,22,0,1,9},
        {30,6,5,14,2,2020,22,0,12,5}, {30,7,5,14,2,2020,22,0,19,13}, {30,8,5,14,2,2020,22,0,7,4}, {30,9,5,14,2,2020,22,0,16,2}, {30,10,5,14,2,2020,22,0,15,6},
        {31,1,5,21,2,2020,22,0,9,16}, {31,2,5,21,2,2020,22,0,3,1}, {31,3,5,21,2,2020,22,0,2,14}, {31,4,5,21,2,2020,22,0,0,10}, {31,5,5,21,2,2020,22,0,4,5},
        {31,6,5,21,2,2020,22,0,12,18}, {31,7,5,21,2,2020,22,0,19,11}, {31,8,5,21,2,2020,22,0,13,8}, {31,9,5,21,2,2020,22,0,7,15}, {31,10,5,21,2,2020,22,0,6,17},
        {32,1,5,4,3,2020,21,0,8,19}, {32,2,5,4,3,2020,21,0,18,6}, {32,3,5,4,3,2020,21,0,17,12}, {32,4,5,4,3,2020,21,0,14,4}, {32,5,5,4,3,2020,21,0,10,9},
        {32,6,5,4,3,2020,21,0,11,2}, {32,7,5,4,3,2020,21,0,1,0}, {32,8,5,4,3,2020,21,0,5,7}, {32,9,5,4,3,2020,21,0,16,13}, {32,10,5,4,3,2020,21,0,15,3},
        {33,1,5,11,3,2020,21,0,9,5}, {33,2,5,11,3,2020,21,0,3,16}, {33,3,5,11,3,2020,21,0,2,10}, {33,4,5,11,3,2020,21,0,0,18}, {33,5,5,11,3,2020,21,0,4,17},
        {33,6,5,11,3,2020,21,0,12,15}, {33,7,5,11,3,2020,21,0,19,14}, {33,8,5,11,3,2020,21,0,13,1}, {33,9,5,11,3,2020,21,0,7,11}, {33,10,5,11,3,2020,21,0,6,8},
        {34,1,5,18,3,2020,21,0,8,2}, {34,2,5,18,3,2020,21,0,18,4}, {34,3,5,18,3,2020,21,0,17,7}, {34,4,5,18,3,2020,21,0,14,0}, {34,5,5,18,3,2020,21,0,10,3},
        {34,6,5,18,3,2020,21,0,11,13}, {34,7,5,18,3,2020,21,0,1,12}, {34,8,5,18,3,2020,21,0,5,6}, {34,9,5,18,3,2020,21,0,16,19}, {34,10,5,18,3,2020,21,0,15,9},
        {35,1,5,25,3,2020,21,0,18,10}, {35,2,5,25,3,2020,21,0,17,2}, {35,3,5,25,3,2020,21,0,14,1}, {35,4,5,25,3,2020,21,0,0,9}, {35,5,5,25,3,2020,21,0,4,13},
        {35,6,5,25,3,2020,21,0,19,15}, {35,7,5,25,3,2020,21,0,5,3}, {35,8,5,25,3,2020,21,0,7,8}, {35,9,5,25,3,2020,21,0,16,12}, {35,10,5,25,3,2020,21,0,6,11},
        {36,1,5,2,4,2020,21,0,8,0}, {36,2,5,2,4,2020,21,0,9,6}, {36,3,5,2,4,2020,21,0,3,19}, {36,4,5,2,4,2020,21,0,10,4}, {36,5,5,2,4,2020,21,0,11,18},
        {36,6,5,2,4,2020,21,0,2,5}, {36,7,5,2,4,2020,21,0,1,17}, {36,8,5,2,4,2020,21,0,12,7}, {36,9,5,2,4,2020,21,0,13,14}, {36,10,5,2,4,2020,21,0,15,16},
        {37,1,5,9,4,2020,21,0,18,8}, {37,2,5,9,4,2020,21,0,17,13}, {37,3,5,9,4,2020,21,0,14,12}, {37,4,5,9,4,2020,21,0,0,3}, {37,5,5,9,4,2020,21,0,4,15},
        {37,6,5,9,4,2020,21,0,19,9}, {37,7,5,9,4,2020,21,0,5,11}, {37,8,5,9,4,2020,21,0,7,2}, {37,9,5,9,4,2020,21,0,16,1}, {37,10,5,9,4,2020,21,0,6,10},
        {38,1,6,17,4,2020,21,0,8,16}, {38,2,6,17,4,2020,21,0,9,14}, {38,3,6,17,4,2020,21,0,3,6}, {38,4,6,17,4,2020,21,0,10,7}, {38,5,6,17,4,2020,21,0,11,17},
        {38,6,6,17,4,2020,21,0,2,4}, {38,7,6,17,4,2020,21,0,1,19}, {38,8,6,17,4,2020,21,0,12,0}, {38,9,6,17,4,2020,21,0,13,5}, {38,10,6,17,4,2020,21,0,15,18}
    }; // Jangan dimodifikasi
    static int SKOR_PERTANDINGAN[][] = new int[JADWAL.length][2]; // Jangan dimodifikasi
    static Random R = new Random(); // Jangan dimodifikasi
    static int HASIL[][] = new int[JADWAL.length][4];
    static int KLASEMEN[][] = new int[CLUB.length][8];
    static int KLASEMENSORT[][] = new int[CLUB.length][8];
    static int getSkorAkhir(){
        return R.nextInt(5);
    }
    
    static void setSkorAkhirPertandingan(int i){
        SKOR_PERTANDINGAN[i][0] = getSkorAkhir(); //Skor Akhir Club Home
        SKOR_PERTANDINGAN[i][1] = getSkorAkhir(); //Skor Akhir Club Away
    }
    
    static void tampilkanPertandingan(int i) {
        int jadwal[] = JADWAL[i];
        System.out.println(jadwal[0]+" ; "+jadwal[1]+" ; "+HARI[jadwal[2]]+", "+jadwal[3]+"-"+BULAN[jadwal[4]]+"-"+jadwal[5]+" ; "+jadwal[6]+":"+jadwal[7]+" ; "+CLUB[jadwal[8]]+" >< "+CLUB[jadwal[9]]);
    }
    
    static void tampilkanHasilPertandingan(int i) {
        int jadwal[] = JADWAL[i];
        System.out.println(jadwal[0]+" ; "+jadwal[1]+" ; "+HARI[jadwal[2]]+", "+jadwal[3]+"-"+BULAN[jadwal[4]]+"-"+jadwal[5]+" ; "+jadwal[6]+":"+jadwal[7]+" ; "+CLUB[jadwal[8]]+" >< "+CLUB[jadwal[9]]+" = "+SKOR_PERTANDINGAN[i][0]+" >< "+SKOR_PERTANDINGAN[i][1]);
    }
    
 public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int p = 0;
while(p != 8){
 if (p == 0) {
Menu();
System.out.print("Masukkan Perintah : ");
p = in.nextInt();
 }
 if (p == 1) {
tampilkanSemuaPertandingan();
 System.out.print("Masukkan Lanjut(0) / Keluar(8) : ");


 p = in.nextInt();
 }else if (p == 2) {
tampilkanHasilSemuaPertandingan();
System.out.print("Masukkan Lanjut(0) / Keluar(8) : ");
 p = in.nextInt();
}else if (p == 3) {
 Club();
 System.out.print("Masukkan Nomor Club : ");
int c = in.nextInt();
 tampilkanPertandinganClub(c);
System.out.print("Masukkan Lanjut(0) / Keluar(8) : ");
 p = in.nextInt();
 }else if (p == 4){
 Club();
 System.out.print("Masukkan Nomor Club : ");
 int c = in.nextInt();
tampilkanPertandinganClubDanHasil(c);
 System.out.print("Masukkan Lanjut(0) / Keluar(8) : ");
 p = in.nextInt();
 }else if (p == 5) {
 tampilkanKlasemen();
 System.out.print("Masukkan Lanjut(0) / Keluar(8) : ");
p = in.nextInt();
}else if (p == 6) {
 tampilkanKlasemenUrut();
System.out.print("Masukkan Lanjut(0) / Keluar(8) : ");
p = in.nextInt();
 }else if (p == 7) {
 tamplikanNamaClubYangMenang();
 System.out.print("Masukkan Lanjut(0) / Keluar(8) : ");
p = in.nextInt();
 } else {
  p = 0;
}
 }
  }
 static void Menu(){
 System.out.println("~~~~~~~~~ MENU PERTANDINGAN ~~~~~~~~~");
 System.out.println("1. Tampilkan Semua Pertandingan");
 System.out.println("2. Tampilkan Hasil Semua Pertandingan");
System.out.println("3. Tampilkan Pertandingan Club tertentu");
 System.out.println("4. Tampilkan Hasil Pertandingan Club tertentu");
 System.out.println("5. Tampilkan Tabel Klasemen, tidak terurut");
System.out.println("6. Tampilkan Tabel Klasemen, terurut");
System.out.println("7. Tampilkan Nama Club Pemenang");
System.out.println("8. Keluar");
 System.out.println("By www.Helmykediri.com");
 }
 static void Club(){
 System.out.println("~~~~~~~~~~~~~ NAMA CLUB ~~~~~~~~~~~~~");
for (int i = 0; i < CLUB.length; i++) {
 String club = CLUB[i];
 System.out.println(i+". " + club);
}
  System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  }
static void tampilkanSemuaPertandingan(){
 //Silakan buat coding untuk menampilkan semua pertandingan
System.out.println("~~~~~~~~~~~~~ SEMUA PERTANDINGAN~~~~~~~~~~~~~");
 for (int i = 0; i < JADWAL.length; i++) {
 tampilkanPertandingan(i);
  }

System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
 }

 static void tampilkanHasilSemuaPertandingan(){
 //Silakan buat coding untuk menampilkan semua pertandingan, beserta hasil akhir pertandingannya.
 System.out.println("~~~~~~~ SEMUA HASIL PERTANDINGAN ~~~~~~~");
 for (int i = 0; i < JADWAL.length; i++) {
setSkorAkhirPertandingan(i);
 tampilkanHasilPertandingan(i);
  }
  System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
 }

 static void tampilkanPertandinganClub(int i){
 //Silakan buat coding untuk menampilkan semua pertandingan dimana club ke-i bertanding sebagai Home atau Away.
System.out.println("~~~~~~~~~~~~~ PERTANDINGAN CLUB~~~~~~~~~~~~~");
 for (int j = 0; j < JADWAL.length; j++) {
  if (JADWAL[j][8] == i || JADWAL[j][9] == i) {
 tampilkanPertandingan(j);
 }
 }

System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
 }

static void tampilkanPertandinganClubDanHasil(int i){
//Silakan buat coding untuk menampilkan semua pertandingan dimana club ke-i bertanding sebagai Home atau Away, beserta hasil akhir pertandingannya.
System.out.println("~~~~~~~~ HASIL PERTANDINGAN CLUB ~~~~~~~~");
 for (int j = 0; j < JADWAL.length; j++) {
if (JADWAL[j][8] == i || JADWAL[j][9] == i) {
 setSkorAkhirPertandingan(j);
 tampilkanHasilPertandingan(j);
  }
  }

System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  }

  static void tampilkanKlasemen(){
  /*
 Silakan buat coding untuk menampilkan Hasil Klasemen (peraturan
bisa di-googling atau tanya teman) tanpa diurutkan.
 Jika Perlu Array untuk bantuan silakan.
Format Output :
 Nomor ; Nama Club ; Banyak pertandingan yang dimenangkan ;
Banyak pertandingan yang seri ; Banyak pertandingan yang kalah ; Banyak Gol
yang dicetak ; Banyak Gol yang masuk ke gawang ; Selisih Gol yang dicetak
dgn yg masuk k gawang ; Poin Skor.
 */
for (int i = 0; i < JADWAL.length; i++) {
setSkorAkhirPertandingan(i);
 HASIL[i][0] = JADWAL[i][8]; // Home Player
 HASIL[i][1] = JADWAL[i][9]; // Away Player
 HASIL[i][2] = SKOR_PERTANDINGAN[i][0]; // Home Goal
 HASIL[i][3] = SKOR_PERTANDINGAN[i][1]; // Away Goal
 KLASEMEN[HASIL[i][0]][0] = HASIL[i][0]; // Home
 KLASEMEN[HASIL[i][0]][4] = KLASEMEN[HASIL[i][0]][4] +HASIL[i][2]; // Home GF
 KLASEMEN[HASIL[i][0]][5] = KLASEMEN[HASIL[i][0]][5] +HASIL[i][3]; // Home GA

KLASEMEN[HASIL[i][0]][6] = KLASEMEN[HASIL[i][0]][5] -KLASEMEN[HASIL[i][0]][4]; // Home +/-
if (KLASEMEN[HASIL[i][0]][6] < 0) {
 KLASEMEN[HASIL[i][0]][6] =Math.abs(KLASEMEN[HASIL[i][0]][6]);
 }
 if (HASIL[i][2] > HASIL[i][3]) {
 KLASEMEN[HASIL[i][0]][1] = KLASEMEN[HASIL[i][0]][1] +1;
 KLASEMEN[HASIL[i][0]][7] = KLASEMEN[HASIL[i][0]][7] +3;
} else if (HASIL[i][2] < HASIL[i][3]){
 KLASEMEN[HASIL[i][0]][3] = KLASEMEN[HASIL[i][0]][3] +1;
KLASEMEN[HASIL[i][0]][7] = KLASEMEN[HASIL[i][0]][7] +0;
} else {
 KLASEMEN[HASIL[i][0]][2] = KLASEMEN[HASIL[i][0]][2] +1;
 KLASEMEN[HASIL[i][0]][7] = KLASEMEN[HASIL[i][0]][7] +1;
 }
 KLASEMEN[HASIL[i][1]][0] = HASIL[i][1]; // Away
 KLASEMEN[HASIL[i][1]][4] = KLASEMEN[HASIL[i][1]][4] +HASIL[i][3]; // Away GF
 KLASEMEN[HASIL[i][1]][5] = KLASEMEN[HASIL[i][1]][5] +HASIL[i][2]; // Away GA
 KLASEMEN[HASIL[i][1]][6] = KLASEMEN[HASIL[i][1]][4] -
KLASEMEN[HASIL[i][1]][5]; // Away +/-
 if (KLASEMEN[HASIL[i][1]][6] < 0) {
KLASEMEN[HASIL[i][1]][6] =Math.abs(KLASEMEN[HASIL[i][1]][6]);
 }
 if (HASIL[i][2] < HASIL[i][3]) {
 KLASEMEN[HASIL[i][1]][1] = KLASEMEN[HASIL[i][1]][1] +1;
 KLASEMEN[HASIL[i][1]][7] = KLASEMEN[HASIL[i][1]][7] +3;
 } else if (HASIL[i][2] > HASIL[i][3]){
 KLASEMEN[HASIL[i][1]][3] = KLASEMEN[HASIL[i][1]][3] +1;
KLASEMEN[HASIL[i][1]][7] = KLASEMEN[HASIL[i][1]][7] +0;
 } else {

 KLASEMEN[HASIL[i][1]][2] = KLASEMEN[HASIL[i][1]][2] +1;
 KLASEMEN[HASIL[i][1]][7] = KLASEMEN[HASIL[i][1]][7] +1;
  }
  }

System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
 System.out.println("~~~~~~~~\t\t\t HASIL KLASEMEN TIDAK DIURUTKAN \t\t\t ~~~~~~~~~");

System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
 System.out.println("Nomor\t ; Code ; Nama Club \t\t\t ; W\t ;D\t ; L\t ; GF\t ; GA\t ; +/-\t ; Pts\t ");

System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
for (int i = 0; i < KLASEMEN.length; i++) {
 int p = CLUB[KLASEMEN[i][0]].length();
String tab;
 if (p <= 7) { tab = "\t\t\t";
 } else if (p >= 13) { tab = "\t\t";
} else {tab = "\t\t\t";}
 System.out.println(i+"\t ; "+KLASEMEN[i][0]+"\t ;"+CLUB[KLASEMEN[i][0]]+tab+" ; "+KLASEMEN[i][1]+"\t ; "+KLASEMEN[i][2]+"\t; "+KLASEMEN[i][3]+"\t ; "+KLASEMEN[i][4]+"\t ; "+KLASEMEN[i][5]+"\t ;"+KLASEMEN[i][6]+"\t ; "+KLASEMEN[i][7]+"\t ; ");
 }
System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
 }

static void tampilkanKlasemenUrut(){
 //Sama dengan tampilkanKlasemen, tetapi hasilnya diurutkanberdasarkan Poin Skor yang didapat.
for (int i = 0; i < JADWAL.length; i++) {
setSkorAkhirPertandingan(i);
 HASIL[i][0] = JADWAL[i][8]; // Home Player
 HASIL[i][1] = JADWAL[i][9]; // Away Player
 HASIL[i][2] = SKOR_PERTANDINGAN[i][0]; // Home Goal
 HASIL[i][3] = SKOR_PERTANDINGAN[i][1]; // Away Goal

KLASEMEN[HASIL[i][0]][0] = HASIL[i][0]; // Home
 KLASEMEN[HASIL[i][0]][4] = KLASEMEN[HASIL[i][0]][4] +HASIL[i][2]; // Home GF
 KLASEMEN[HASIL[i][0]][5] = KLASEMEN[HASIL[i][0]][5] +HASIL[i][3]; // Home GA
KLASEMEN[HASIL[i][0]][6] = KLASEMEN[HASIL[i][0]][4] -KLASEMEN[HASIL[i][0]][5]; // Home +/-
 if (KLASEMEN[HASIL[i][0]][6] < 0) {
 KLASEMEN[HASIL[i][0]][6] =Math.abs(KLASEMEN[HASIL[i][0]][6]);
  }
 if (HASIL[i][2] > HASIL[i][3]) {
 KLASEMEN[HASIL[i][0]][1] = KLASEMEN[HASIL[i][0]][1] +1;
 KLASEMEN[HASIL[i][0]][7] = KLASEMEN[HASIL[i][0]][7] +3;
 } else if (HASIL[i][2] < HASIL[i][3]){
 KLASEMEN[HASIL[i][0]][3] = KLASEMEN[HASIL[i][0]][3] +1;
 KLASEMEN[HASIL[i][0]][7] = KLASEMEN[HASIL[i][0]][7] +0;
 } else {
 KLASEMEN[HASIL[i][0]][2] = KLASEMEN[HASIL[i][0]][2] +1;
 KLASEMEN[HASIL[i][0]][7] = KLASEMEN[HASIL[i][0]][7] +1;
 }
KLASEMEN[HASIL[i][1]][0] = HASIL[i][1]; // Away
 KLASEMEN[HASIL[i][1]][4] = KLASEMEN[HASIL[i][1]][4] +HASIL[i][3]; // Away GF
 KLASEMEN[HASIL[i][1]][5] = KLASEMEN[HASIL[i][1]][5] +HASIL[i][2]; // Away GA
 KLASEMEN[HASIL[i][1]][6] = KLASEMEN[HASIL[i][1]][5] -KLASEMEN[HASIL[i][1]][4]; // Away +/-
 if (KLASEMEN[HASIL[i][1]][6] < 0) {
 KLASEMEN[HASIL[i][1]][6] =Math.abs(KLASEMEN[HASIL[i][1]][6]);
 }
 if (HASIL[i][2] < HASIL[i][3]) {
 KLASEMEN[HASIL[i][1]][1] = KLASEMEN[HASIL[i][1]][1] +1;
 KLASEMEN[HASIL[i][1]][7] = KLASEMEN[HASIL[i][1]][7] +3;
 } else if (HASIL[i][2] > HASIL[i][3]){

 KLASEMEN[HASIL[i][1]][3] = KLASEMEN[HASIL[i][1]][3] +1;
KLASEMEN[HASIL[i][1]][7] = KLASEMEN[HASIL[i][1]][7] +0;
 } else {
KLASEMEN[HASIL[i][1]][2] = KLASEMEN[HASIL[i][1]][2] +1;
 KLASEMEN[HASIL[i][1]][7] = KLASEMEN[HASIL[i][1]][7] +1;
 }
  }

System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
 System.out.println("~~~~~~~~\t\t\t HASIL KLASEMEN TIDAKDIURUTKAN \t\t\t ~~~~~~~~~");

System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
 System.out.println("Nomor\t ; Nama Club \t\t\t ; W\t ; D\t ;L\t ; GF\t ; GA\t ; +/-\t ; Pts\t ");

System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
 for (int i = 0; i < KLASEMEN.length; i++) {
int p = CLUB[KLASEMEN[i][0]].length();
 String tab;
  if (p <= 7) { tab = "\t\t\t";
 } else if (p >= 13) { tab = "\t\t";
} else {tab = "\t\t\t";}
 System.out.println(i+"\t ; "+KLASEMEN[i][0]+"\t ;"+CLUB[KLASEMEN[i][0]]+tab+" ; "+KLASEMEN[i][1]+"\t ; "+KLASEMEN[i][2]+"\t; "+KLASEMEN[i][3]+"\t ; "+KLASEMEN[i][4]+"\t ; "+KLASEMEN[i][5]+"\t ;"+KLASEMEN[i][6]+"\t ; "+KLASEMEN[i][7]+"\t ; ");
 }
 for (int i = 0; i < KLASEMEN.length; i++) {
for (int j = i + 1; j < KLASEMEN.length; j++) {
 if (KLASEMEN[i][7] < KLASEMEN[j][7]) {
 int[] temp = new int[8];
 temp = KLASEMEN[i];
 KLASEMEN[i] = KLASEMEN[j];
 KLASEMEN[j] = temp;
  }
  }

 }

System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");

System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
 System.out.println("~~~~~~~~\t\t\t HASIL KLASEMEN YANGDIURUTKAN \t\t\t ~~~~~~~~~");

System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  System.out.println("Nomor\t ; Nama Club \t\t\t ; W\t ; D\t ;L\t ; GF\t ; GA\t ; +/-\t ; Pts\t ");

System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
 for (int i = 0; i < KLASEMEN.length; i++) {
 int p = CLUB[KLASEMEN[i][0]].length();
String tab;
  if (p <= 7) { tab = "\t\t\t";
  } else if (p >= 13) { tab = "\t\t";
} else {tab = "\t\t\t";}
System.out.println(i+"\t ; "+KLASEMEN[i][0]+"\t ;"+CLUB[KLASEMEN[i][0]]+tab+" ; "+KLASEMEN[i][1]+"\t ; "+KLASEMEN[i][2]+"\t; "+KLASEMEN[i][3]+"\t ; "+KLASEMEN[i][4]+"\t ; "+KLASEMEN[i][5]+"\t ;"+KLASEMEN[i][6]+"\t ; "+KLASEMEN[i][7]+"\t ; ");
  }

System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  }

 static void tamplikanNamaClubYangMenang(){
 //Silakan buat coding untuk menampilkan Nama Club yang mempunyai Poin Skor tertinggi (sesuai aturan Klasemen)
for (int i = 0; i < JADWAL.length; i++) {
 setSkorAkhirPertandingan(i);
HASIL[i][0] = JADWAL[i][8]; // Home Player
HASIL[i][1] = JADWAL[i][9]; // Away Player
 HASIL[i][2] = SKOR_PERTANDINGAN[i][0]; // Home Goal
 HASIL[i][3] = SKOR_PERTANDINGAN[i][1]; // Away Goal
 KLASEMEN[HASIL[i][0]][0] = HASIL[i][0]; // Home
 KLASEMEN[HASIL[i][0]][4] = KLASEMEN[HASIL[i][0]][4] +
HASIL[i][2]; // Home GF
KLASEMEN[HASIL[i][0]][5] = KLASEMEN[HASIL[i][0]][5] +
HASIL[i][3]; // Home GA
 KLASEMEN[HASIL[i][0]][6] = KLASEMEN[HASIL[i][0]][4] -
KLASEMEN[HASIL[i][0]][5]; // Home +/-
 if (KLASEMEN[HASIL[i][0]][6] < 0) {
 KLASEMEN[HASIL[i][0]][6] =
Math.abs(KLASEMEN[HASIL[i][0]][6]);
  }
 if (HASIL[i][2] > HASIL[i][3]) {
KLASEMEN[HASIL[i][0]][1] = KLASEMEN[HASIL[i][0]][1] +1;
 KLASEMEN[HASIL[i][0]][7] = KLASEMEN[HASIL[i][0]][7] +3;
 } else if (HASIL[i][2] < HASIL[i][3]){
KLASEMEN[HASIL[i][0]][3] = KLASEMEN[HASIL[i][0]][3] +1;
KLASEMEN[HASIL[i][0]][7] = KLASEMEN[HASIL[i][0]][7] +0;
} else {
 KLASEMEN[HASIL[i][0]][2] = KLASEMEN[HASIL[i][0]][2] +1;
 KLASEMEN[HASIL[i][0]][7] = KLASEMEN[HASIL[i][0]][7] +1;
 }
 KLASEMEN[HASIL[i][1]][0] = HASIL[i][1]; // Away
 KLASEMEN[HASIL[i][1]][4] = KLASEMEN[HASIL[i][1]][4] +
HASIL[i][3]; // Away GF
 KLASEMEN[HASIL[i][1]][5] = KLASEMEN[HASIL[i][1]][5] +
HASIL[i][2]; // Away GA
 KLASEMEN[HASIL[i][1]][6] = KLASEMEN[HASIL[i][1]][5] -
KLASEMEN[HASIL[i][1]][4]; // Away +/-
 if (KLASEMEN[HASIL[i][1]][6] < 0) {
 KLASEMEN[HASIL[i][1]][6] =
Math.abs(KLASEMEN[HASIL[i][1]][6]);
  }
 if (HASIL[i][2] < HASIL[i][3]) {
KLASEMEN[HASIL[i][1]][1] = KLASEMEN[HASIL[i][1]][1] +1;
 KLASEMEN[HASIL[i][1]][7] = KLASEMEN[HASIL[i][1]][7] +3;
 } else if (HASIL[i][2] > HASIL[i][3]){
 KLASEMEN[HASIL[i][1]][3] = KLASEMEN[HASIL[i][1]][3] +1;
 KLASEMEN[HASIL[i][1]][7] = KLASEMEN[HASIL[i][1]][7] +0;
  } else {
  KLASEMEN[HASIL[i][1]][2] = KLASEMEN[HASIL[i][1]][2] +1;
 KLASEMEN[HASIL[i][1]][7] = KLASEMEN[HASIL[i][1]][7] +1;
 }
 }
for (int i = 0; i < KLASEMEN.length; i++) {
for (int j = i + 1; j < KLASEMEN.length; j++) {
 if (KLASEMEN[i][7] < KLASEMEN[j][7]) {
int[] temp = new int[8];
 temp = KLASEMEN[i];
 KLASEMEN[i] = KLASEMEN[j];
 KLASEMEN[j] = temp;
 }
  }
  }

System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");

System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
System.out.println("~~~~~~~~\t\t\t HASIL KLASEMEN YANG DIURUTKAN \t\t\t ~~~~~~~~~");

System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");

System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
 for (int i = 0; i < KLASEMEN.length; i++) {
 int p = CLUB[KLASEMEN[i][0]].length();
  String tab;
  if (p <= 7) { tab = "\t\t\t";
  } else if (p >= 13) { tab = "\t\t";
 } else {tab = "\t\t\t";}
 System.out.println(i+"\t ; "+KLASEMEN[i][0]+"\t ;"+CLUB[KLASEMEN[i][0]]+tab+" ; "+KLASEMEN[i][1]+"\t ; "+KLASEMEN[i][2]+"\t; "+KLASEMEN[i][3]+"\t ; "+KLASEMEN[i][4]+"\t ; "+KLASEMEN[i][5]+"\t ;"+KLASEMEN[i][6]+"\t ; "+KLASEMEN[i][7]+"\t ; ");
  }

System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
 System.out.println("KLUB PEMENANG KLASEMEN :"+CLUB[KLASEMEN[0][0]]);
  System.out.println("W\t ; D\t ; L\t ; GF\t ; GA\t ; +/-\t ;Pts\t ");
  System.out.println(KLASEMEN[0][1]+"\t ; "+KLASEMEN[0][2]+"\t ;"+KLASEMEN[0][3]+"\t ; "+KLASEMEN[0][4]+"\t ; "+KLASEMEN[0][5]+"\t ;"+KLASEMEN[0][6]+"\t ; "+KLASEMEN[0][7]+"\t ; ");

System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
 }
 }

Hasilnya:


UAS Algoritma dan Pemrograman Java

Helmy Kediri
Helmy Kediri Sebaik-baik manusia adalah yang paling bermanfaat bagi orang lain. Ketika seseorang telah meninggal dunia, maka terputuslah amalnya kecuali 3 (perkara) : shadaqah jariyah, ilmu yang bermanfaat, dan anak saleh yang mendokan orang tuanya