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

正文內(nèi)容

[工學(xué)]chap2順序表-資料下載頁

2024-10-18 23:34本頁面
  

【正文】 // public Person(String last, String first, int a) { // constructor lastName = last。 firstName = first。 age = a。 } // 第二章 線性表 38 // public boolean delete(String searchName) { // delete person from array int j。 for(j=0。 jnElems。 j++) // look for it if( a[j].getLast().equals(searchName) ) break。 if(j==nElems) // can39。t find it return false。 else // found it { for(int k=j。knElems。k++) // shift down a[k] = a[k+1]。 nElems。 // decrement size return true。 } } // end delete() // public void displayA() // displays array contents { for(int j=0。 jnElems。 j++) // for each element, a[j].display()。 // display it } // } // end class ClassDataArray class ClassDataArray { private Person[] a。 // reference to array private int nElems。 // number of data items public ClassDataArray(int max) { // constructor a = new Person[max]。 // create the array nElems = 0。 // no items yet } // public Person find(String searchName){ // find specified value int j。 for(j=0。 jnElems。 j++) // for each element, if( a[j].getLast().equals(searchName) ) // break。 // exit loop before end if(j == nElems) // gone to end? return null。 // yes, can39。t find it else return a[j]。 // no, found it } // end find() // // put person into array public void insert(String last, String first, int age) { a[nElems] = new Person(last, first, age)。 nElems++。 // increment size } 第二章 線性表 39 String searchKey = Stimson。 // search for item Person found。 found=(searchKey)。 if(found != null) { (Found )。 ()。 } else (Can39。t find + searchKey)。 (Deleting Smith, Yee, and Creswell)。 (Smith)。 // delete 3 items (Yee)。 (Creswell)。 ()。 // display items again } // end main() } // end class ClassDataApp // // data items as class objects // to run this program: Cjava ClassDataApp /////////////////////// class ClassDataApp { public static void main(String[] args) { int maxSize = 100。 // array size ClassDataArray arr。 // reference to array arr = new ClassDataArray(maxSize)。 // create the array // insert 10 items (Evans, Patty, 24)。 (Smith, Lorraine, 37)。 (Yee, Tom, 43)。 (Adams, Henry, 63)。 (Hashimoto, Sato, 21)。 (Stimson, Henry, 29)。 (Velasquez, Jose, 72)。 (Lamarque, Henry, 54)。 (Vang, Minh, 22)。 (Creswell, Lucinda, 18)。 ()。 // display items 第二章 線性表 40 ? 線性表 ?線性表的概念 ?順序存儲(chǔ)的線性表 ? 順序表的類定義 ? 順序表的操作 ? 順序表操作的算法分析 ? 綜合舉例 ?鏈?zhǔn)酱鎯?chǔ)的線性表
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1