<commit_before>package id.ac.siamodels.prodi.teknikinformatika;

import java.util.ArrayList;
import java.util.List;

import id.ac.unpar.siamodels.Mahasiswa;
import id.ac.unpar.siamodels.matakuliah.interfaces.HasPrasyarat;

public class Kelulusan implements HasPrasyarat{

	public static final String[] PILIHAN_WAJIB={"AIF311","AIF312","AIF313","AIF314","AIF315","AIF316","AIF317"};
	public static final String[][] WAJIB=
	{
		{"AIF101","AIF103","AIF105","MKU001","MKU008","MKU010"},
		{"AIF102","AIF104","AIF106","AMS100","MKU009","MKU011"},
		{"AIF210","AIF203","AIF205","AMS200","MKU012"},
		{"AIF202","AIF204","AIF206","AIF208","AIF210"},
		{"AIF301","AIF303","AIF305","MKU002"},
		{"AIF302","AIF304","AIF306"},
		{"AIF401","AIF403","AIF405"},
		{"AIF402","APS402"}
	};
	public static final String[] AGAMA={"MKU003","MKU004"};
	
	/**pil wajib				wajib													agama
	 *  AIF315 pbw				sem 1: aif101,aif103,aif105,mku001,mku008,mku010		mku003
	 *  AIF311 pemfung			sem 2: aif102,aif104,aif106,ams100,mku009,mku011		mku004
	 *  AIF312 kamin			sem 3: aif201,aif203,aif205,ams200,mku012
	 *  AIF314 grafkom			sem 4: aif202,aif204,aif206,aif208,aif210
	 *  AIF316 pbd				sem 5: aif301,aif303,aif305,mku002
	 *  AIF316 kompar			sem 6: aif302,aif304,aif306
	 *  AIF317 dag				sem 7: aif401,aif403,aif405
	 *  AIF318 pam				sem 8: aif402,aps402
	 */
	List<String> data=new ArrayList<String>();
	boolean check=false;
	
	private void checkBoolean(boolean test)
	{
		if(test==true && this.check==false)
		{
			check=false;
		}
		else if(test==false && this.check==true)
		{
			check=false;
		}
		else if(test==false && this.check==false)
		{
			check=false;
		}
		else
		{
			check=true;
		}
	}
	
	@Override
	public boolean checkPrasyarat(Mahasiswa mahasiswa, List<String> reasonsContainer) {		
		//cek sks
		int sks=mahasiswa.calculateSKSLulus();
		if(sks<144)
		{
			reasonsContainer.add("Masih Kurang "+(144-sks)+" SKS");
		}
		else
		{
			check=true;
		}
		//cek agama
		boolean katolik=false;
		boolean fenom=false;
		if(mahasiswa.hasLulusKuliah("MKU003"))
		{
			katolik=true;
		}
		if(mahasiswa.hasLulusKuliah("MKU004"))
		{
			fenom=true;
		}
		if(katolik==true||fenom==true)
		{
			checkBoolean(true);
		}
		else
		{
			reasonsContainer.add("Belum mengambil MKU003 atau MKU004");
		}
		//cek kuliah wajib
		for(int i=0;i<WAJIB.length;i++)
		{
			for(int j=0;j<WAJIB[i].length;j++)
			{
				if(mahasiswa.hasLulusKuliah(WAJIB[i][j])==false)
				{
					reasonsContainer.add("Belum Lulus Kuliah Wajib"+ WAJIB[i][j]);
				}
				else
				{
					checkBoolean(true);
				}
			}
		}
		//cek pilihan wajib
		int pil_count=0;
		for(int i=0;i<PILIHAN_WAJIB.length;i++)
		{
			if(mahasiswa.hasLulusKuliah(PILIHAN_WAJIB[i]))
			{
				pil_count++;
			}
		}
		if(pil_count<4)
		{
			reasonsContainer.add("Belum Mencukupi 4 Pilihan Wajib, Baru Lulus "+pil_count+" Mata Kuliah");
		}
		else
		{
			checkBoolean(true);
		}
		//cek projek
		boolean proif=false;
		boolean prosi1=false;
		boolean prosi2=false;
		if(mahasiswa.hasLulusKuliah("AIF306"))
		{<commit_msg>Menambah getter untuk atribut 'data'<commit_after>package id.ac.siamodels.prodi.teknikinformatika;

import java.util.ArrayList;
import java.util.List;

import id.ac.unpar.siamodels.Mahasiswa;
import id.ac.unpar.siamodels.matakuliah.interfaces.HasPrasyarat;

public class Kelulusan implements HasPrasyarat{

	public static final String[] PILIHAN_WAJIB={"AIF311","AIF312","AIF313","AIF314","AIF315","AIF316","AIF317"};
	public static final String[][] WAJIB=
	{
		{"AIF101","AIF103","AIF105","MKU001","MKU008","MKU010"},
		{"AIF102","AIF104","AIF106","AMS100","MKU009","MKU011"},
		{"AIF210","AIF203","AIF205","AMS200","MKU012"},
		{"AIF202","AIF204","AIF206","AIF208","AIF210"},
		{"AIF301","AIF303","AIF305","MKU002"},
		{"AIF302","AIF304","AIF306"},
		{"AIF401","AIF403","AIF405"},
		{"AIF402","APS402"}
	};
	public static final String[] AGAMA={"MKU003","MKU004"};
	
	/**pil wajib				wajib													agama
	 *  AIF315 pbw				sem 1: aif101,aif103,aif105,mku001,mku008,mku010		mku003
	 *  AIF311 pemfung			sem 2: aif102,aif104,aif106,ams100,mku009,mku011		mku004
	 *  AIF312 kamin			sem 3: aif201,aif203,aif205,ams200,mku012
	 *  AIF314 grafkom			sem 4: aif202,aif204,aif206,aif208,aif210
	 *  AIF316 pbd				sem 5: aif301,aif303,aif305,mku002
	 *  AIF316 kompar			sem 6: aif302,aif304,aif306
	 *  AIF317 dag				sem 7: aif401,aif403,aif405
	 *  AIF318 pam				sem 8: aif402,aps402
	 */
	List<String> data=new ArrayList<String>();
	boolean check=false;
	
	private void checkBoolean(boolean test)
	{
		if(test==true && this.check==false)
		{
			check=false;
		}
		else if(test==false && this.check==true)
		{
			check=false;
		}
		else if(test==false && this.check==false)
		{
			check=false;
		}
		else
		{
			check=true;
		}
	}
	
	public List<String> getData()
	{
		return this.data;
	}
	
	@Override
	public boolean checkPrasyarat(Mahasiswa mahasiswa, List<String> reasonsContainer) {		
		//cek sks
		int sks=mahasiswa.calculateSKSLulus();
		if(sks<144)
		{
			reasonsContainer.add("Masih Kurang "+(144-sks)+" SKS");
		}
		else
		{
			check=true;
		}
		//cek agama
		boolean katolik=false;
		boolean fenom=false;
		if(mahasiswa.hasLulusKuliah("MKU003"))
		{
			katolik=true;
		}
		if(mahasiswa.hasLulusKuliah("MKU004"))
		{
			fenom=true;
		}
		if(katolik==true||fenom==true)
		{
			checkBoolean(true);
		}
		else
		{
			reasonsContainer.add("Belum mengambil MKU003 atau MKU004");
		}
		//cek kuliah wajib
		for(int i=0;i<WAJIB.length;i++)
		{
			for(int j=0;j<WAJIB[i].length;j++)
			{
				if(mahasiswa.hasLulusKuliah(WAJIB[i][j])==false)
				{
					reasonsContainer.add("Belum Lulus Kuliah Wajib "+ WAJIB[i][j]);
				}
				else
				{
					checkBoolean(true);
				}
			}
		}
		//cek pilihan wajib
		int pil_count=0;
		for(int i=0;i<PILIHAN_WAJIB.length;i++)
		{
			if(mahasiswa.hasLulusKuliah(PILIHAN_WAJIB[i]))
			{
				pil_count++;
			}
		}
		if(pil_count<4)
		{
			reasonsContainer.add("Belum Mencukupi 4 Pilihan Wajib, Baru Lulus "+pil_count+" Mata Kuliah");
		}
		else
		{
			checkBoolean(true);
		}
		//cek projek
		boolean proif=false;
		boolean prosi1=false;
		boolean prosi2=false;
		if(mahasiswa.hasLulusKuliah("AIF306"))
		{
{'fraction_non_alphanumeric': 0.16232821341956347, 'fraction_numerical': 0.0963621665319321, 'mean_word_length': 4.099752679307502, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1219586', 'n_tokens_mistral': 3524, 'n_tokens_neox': 2730, 'n_words': 385}