public class Student
}
private string _firstName; //Student's first name
private string _lastName; //Student's last name
private string _studentCode; //Student's code
private int _entryTerm; //Student's entry number
First name get/set//
( public void setFirstName(string fname
; _firstName = fname }
{
} ()public int getFirstName
;return _lastName
{
Last name get/set//
}(public void setLastName(string lname
;lastName = lname_
{
}()public int getLastName
;return _lastName
{
Student code get/set//
}( public void setStudentCode(string scode
;studentCode = scode_
{
}()public int getStudentCode
;return _studentCode
{
Entry term get/set//
} (public void setEntryTerm(string eterm
;entryTerm = eterm_
{
}()public int getEntryTerm
;return _entryTerm
{
get/set end//
(public void Add(List stulist, string fname, string lname, string scode, string eterm
(if (stulist != null}
}
;()Student stu = new Student
;(stu.setFirstName(fname
;(stu.setLastName(lname
;(stu.setStudentCode(scode
;(stu.setEntryTerm(eterm
;(stulist.Add(stu
{
{
Creats the list of students//
(public studentSearch (Liststulist; string scode
; Student result
} (foreach (Student stu in stulist
} (if(stu.scode == scode
;result = stu
; break
{
; return result
{
{
Search ability//
{
برچسب:
نویسنده: هلیا جلالی