//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 void ubahMataKuliah(ref List <MataKuliah> LMK, MataKuliah MK, int hari, int jam, String namaRuangan) { if (LMK != null) { int i = 0; while (i < LMK.Count()) { if (LMK[i].getNamaMatKul() == MK.getNamaMatKul()) { break; } else { ++i; } } LMK[i].setHariSol(hari); LMK[i].setJamSol(jam); LMK[i].setRuanganSol(namaRuangan); } }