freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

武科大-java實驗答案-全-資料下載頁

2025-06-20 08:12本頁面
  

【正文】 。 /* (new Student(aaa,001,25))。 (new Student(bbb,002,21))。 if(! (new Student(ccc,002,21))) (學號雷同)。 (new Student(ccc,003,21))。 (0)。 ()。 */ (1)。 (002)。 (\n刪除后信息)。 (,new NameComparator())。 (0)。 } } class NameComparator implements Comparator { public int pare(Object obj1,Object obj2) {Student e1=(Student)obj1。 Student e2=(Student)obj2。 if(()==0) return 0。 else if(()0) return 1。 else return 1。 } }import .*。import .*。 class Student implements Serializable,Comparable{ String name。 String sno。 int age。 Student(String name,String sno,int age) { =name。 =sno。 =age。 } void displayInfo() { (name=+name+sno=+sno+age=+age)。 } String getSno() {return sno。 } int getAge() { return age。 } String getName() { return name。 } public int pareTo(Object obj) {Student p1。 p1=(Student)obj。 if (age) return 1。 else if(age) return 1。 return 0。 } } class StudentAll { VectorStudent studentSet。 StudentAll() { studentSet=new VectorStudent()。 } boolean addStudent(Student s) {boolean flag=true。 for(Student se:studentSet) if(().equals(())) {flag=false。 break。} if(flag) (s)。 return flag。 } boolean removeStudent(String sno) { boolean flag=false。 for(Student se:studentSet) if(().equals(sno)) { (se)。 flag=true。break。} return flag。 } int getStudentNum() { return ()。 } void saveStudent() {try{ PrintWriter ps=new PrintWriter(new FileWriter())。 for (Student se:studentSet) { (())。 ( )。 (())。 ( )。 (())。 }()。 }catch(IOException e){} } void displayAllStudent(int displaySource) {String name,sno。 int age。 if(displaySource==1) { ()。 try{ Scanner ps=new Scanner(new FileInputStream())。 while(()) { name=()。 sno=()。 age=()。 (new Student(name,sno,age))。 }()。 }catch(IOException e){} } for(Student se:studentSet) {()。 } } } public class TestStudentAll { public static void main(String args[]) {int i。 StudentAll stSet=new StudentAll()。 /* (new Student(aaa,001,25))。 (new Student(bbb,002,21))。 if(! (new Student(ccc,002,21))) (學號雷同)。 (new Student(ccc,003,21))。 (0)。 ()。 */ (1)。 (002)。 (\n刪除后信息)。 ()。 (0)。 } }5(2)import .*。class FileCopy{ public static void main(String[] args) { try{String s1。 int a=0。 s1=abc+a。 int LineCount=0。 BufferedReader input=new BufferedReader(new FileReader())。 BufferedWriter output=new BufferedWriter(new FileWriter())。 String c=()。 String s。 while(c!=null) { s=deleteComment(c)。 s=()。 if (!()) { (LineCount+:+deleteComment(c))。 ()。 (deleteComment(c))。 LineCount++。 } c=()。 } ()。 ()。 } catch(IOException e) {(e)。} } static String deleteComment(String s) { int pos=0。 if(s==null) return s。 pos=(//)。 if (pos0) return s。 else return (0,pos)。 }}
點擊復制文檔內(nèi)容
畢業(yè)設計相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1