getOwnerID():Integer
Bang Class의 bangOwnerID를 return하는 함수
delete(id : Integer):Void
Integer값을 입력받아 해당되는 id를 가진 StudentInfo 항목을 삭제
newDataInput(studNo : Integer, studName : String, studPhone: Integer):Void
studNo, studName, studPhone 값을 입력받아 StudentInfo 항목을 새로 생성. 생성되는 Default studentTeamNo 값은 studentUniqueNo와 동일하며 studentUnitqueNo는 list에서 가장 마지막 값 다음 값. 이때 내부에서 Display의 refreshBang을 호출.
updateList(studNo: Integer, studName: String, studPhone: Integer, studTeamNo: Integer): Void
Student, Professor 클래스에서 정보를 수정 했을 때 호출하는 Method. studNo, studPhone, studName은 필수 입력 항목이며, studTeamNo는 선택적 입력 항목. StudentInfo list에서 해당하는 학생의 정보를 입력받은 정보로 수정. 이때 내부에서 Display의 refreshBang을 호출.
updateTeam(studNo: Integer, studTeamNo: Integer): Void
studNo에 해당되는 StudentInfo의 학생 정보에서 TeamNo를 studTeamNo로 변경. 이때 내부에서 Display의 refreshBang을 호출.
getAll4Display(): StudentInfo
StudentInfo List를 모두 반환(리스트로 return)
getSubjName(): String
subjName 값을 return
logIn(Id: Integer, display: Display): Void
logInQ에 Id를 append하고, display값을 받아 list에 append한다. (logInQ와 display를 저장하는 list의 Index값은 동일 값이어야 함.
logOut(Id: Integer): Void
logInQ에서 해당 Id를 제외시킨다. display list에서 동일 index의 값도 제외시킨다.
sendMessage(message: Integer, to: Integer, from: Integer): Void
TeamOrganizer에서 호출. 이 Method 내부에서 addMessage를 호출하여 message를 전달.
randomTeamMake(): Void
random team 설정 할때 사용하는 method. TeamOrganizer.getLimit으로 얻어온 team limit에 맞게 TeamNo를 random으로 설정시켜 팀을 구성.
addMessage(message: Integer, to: Integer, from: Integer): Void
to는 message를 보내는 대상이며, from은 메세지를 보낸 사람. message는 내용이며 to에 해당되는 StudentInfo에 messages에 append시킨다.
save(): Void
방 data를 txt에 저장. 저장 시점은 switchOnOff에서 Off가 될 때 수행하거나, logInQ 변수의 값이 0이 될 때 수행하도록 한다.
ordering(): Void
리스트의 순서를 ordering. ordering 하는 기준은 StudentInfo의 studentTeamNo 기준이며, 동일 TeamNo의 경우 팀장(UniqueNo == TeamNo)을 맨 위로, 나머지 학생은 studentNo 순서로 오름차순 정렬.
함수 수행은 data에 변동이 일어나는 경우에 수행함.
studentCheck(id: Integer, name: String): Integer
id와 name을 받아서 StudentInfo list에서 확인. 우선적으로 name과 StudentInfo list상에 있는 StudentInfo 객체의 name과 동일한 것이 있는지 확인. 일치하는 것이 없으면 1을 반환.
일치하는 객체를 찾았으면 id와 객체의 studentNo와 동일한지 확인. 동일하면 0을 반환. 동일하지 않으면 2를 반환.
Bang Bang Bang!