//Copy Constructor public MataKuliah(MataKuliah n) { setNamaMatkul(n.getNamaMatKul()); setRuanganDom(n.getRuanganDom()); setRuanganSol(n.getRuanganSol()); jamDom = new int[2]; setJamDomAwal(n.getJamDomAwal()); setJamDomAkhir(n.getJamDomAkhir()); setJamSol(n.getJamSol()); hariDom = new int[n.getHariDom().Length]; setHariDom(n.getHariDom()); setHariSol(n.getHariSol()); setSks(n.getSks()); }
public Boolean checkAvail(MataKuliah MK, List <Ruangan> LR) { Boolean avail = false; int i = 0; while (i < LR.Count()) { if (MK.getRuanganSol() == LR[i].getNamaRuangan()) { break; } i++; } if (i < LR.Count()) { if (i != 0) { --i; } if ((MK.getJamSol() >= LR[i].getjamMulai()) && (MK.getJamSol() + MK.getSks() <= LR[i].getjamAkhir())) { foreach (int j in LR[i].getHariAvailable()) { if (MK.getHariSol() == j) { avail = true; break; } } } } else { avail = false; return(avail); } return(avail); }