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

正文內容

基于安卓的移動課堂應用開發(fā)畢業(yè)論文-資料下載頁

2025-08-18 14:34本頁面

【導讀】隨著計算機技術的飛速發(fā)展,一方面,各種各樣的類庫、框架層出不窮;另一方面,用戶對于軟件質量和功能的要求也越來越高。編程工作并不像有些人聲稱的那樣,門檻變。得越來越低,相反,由于系統(tǒng)變得越來越復雜,對編程人員來說,要求反而變高了。對這復雜的系統(tǒng)、和步步緊逼的交付日期。作為軟件工程師們的經驗結晶——設計模式,便是我們應對軟件復雜度的有力武器。而作為設計模式一個核心的原則——模塊化,則有助于我們分解復雜度。只集中注意于某一個局部,而不是同時處理龐大的細節(jié)。

  

【正文】 起來,這里我們使用了一個私有的鎖對象而不是直接使用 Service 實例。與此同時,我們將二者均聲明為 final ,以確保其內存可見性。而對于操作的同步,則之間使用 Java 內建的 Monitor 實現(xiàn)。 為了將下載進度發(fā)布至 View 組件 ,這里我們需要了觀察者模式。通過跟蹤當前已下載的文件大小,我們可以得出下載的百分比。實現(xiàn)代碼見附錄 E。 21 6 總結與展望 總結 通過使用 DocumentView 框架,整個應用有著非常一致的結構 ,這對于應用的維護和擴展是至關重要的 。并且,由于框架實現(xiàn)非常的輕量,整個框架所實現(xiàn)的功能都有著高效的利用率。經過大量實踐驗證的 UI 與邏輯分離的原則,使得應用的實現(xiàn)非常的輕松,多數(shù)頁面甚至編碼后可以一次運行便成功。 但是,其實該框架實現(xiàn)也有著一些不足。由于 Java 的泛型實現(xiàn)需要向下兼容,引入了所謂的類型 擦除。于是,當我們實現(xiàn) GenericActivity 時,只得通過傳入一個 ClassT 對象,并約定 Document 類的實現(xiàn)必須提供一個默認構造函數(shù)。 雖然這保證了類型安全,但也就絕對談不上優(yōu)雅。 再有一點,雖然我們約定在 GenericActivity 的子類必須回調超類的 onCreateDocument 方法,以實例化 Document 對象,但是,就目前語言所提供的工具而已,我們并能夠在語言層級約束客戶必須調用該方法。事實上,在應用編寫的過程中,我自己就曾有一次忘記調用該方法。 好的設計總是有著 一些折衷。為了類型安全和代碼的復用,我選擇了接受上述兩個缺點。 展望 有些經驗豐富的開發(fā)人員將模式視為一種思維工具,他們建議首先考慮這樣的模式,即并非可直接用于開發(fā)的應用程序的所屬領域。有時候,可將模式的重要理念推廣到另一個領域,進而得到全新的模式或原有模式的變種。 除了編程語言,程序員的效率還依賴于庫、框架和一系列的中間件。合適的模式能夠幫助程序員理解并高效地使用它們。隨著越來越多的開發(fā)人員人數(shù)認識到模式的優(yōu)點,有希望涌現(xiàn)這樣的一系列模式 —— 它們都是軟件經驗的結晶。未來的框架文檔可能包含闡述如何有效 使用框架的模式。 22 參 考 文 獻 [1] Cay , Cary Cornel 著, JAVA核心技術 [M],卷一,卷二,第九版英文版人民郵電出版社 [2] Reto Meier 著,佘建偉、趙凱(譯), Android 4 高級編程 [M](第 3版 ) 清華大學出版社 [3] Joshua Bloch 著,楊春花、俞黎敏 譯, Effective Java[M] 中文版 第 2版 機械工業(yè)出版社 [4] Brian Goetz, Tim Peierls, Joshua Bloch, Joseph Bowbeer, David Holmes, Doug Lea 著,童云蘭 等譯, Java 并發(fā)編程實戰(zhàn) [M],機械工業(yè)出版社 [5] Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides 著,李英軍、馬曉星、蔡敏、劉建中 等譯,設計模式:可復用面向對象軟件的基礎 [M],機械工業(yè)出版社 [6] Craig Larman 著,李洋、鄭? 等譯, UML和模式應用 [M] 第三版,機械工業(yè)出版社 [7] 任 玉剛 著, Android開發(fā)藝術探索 [M],中國工信出版社,電子工業(yè)出版社 2020 [8] Frank Buschmann, Regine Meunier, Hans Rohnert, Peter Sommerlad, Micheal Stal 著,PatternOriented Software Architecture[M], Volume 1 – A Ssytem of Patterns, John Wiley amp。 Sons, Ltd 1996 [9] Douglas Schmidt, Michael Stal, Hans Rohnert, Frank Buschmann 著, PatternOriented Software Architecture[M], Volume 2 – Patterns for Concurrent and Networked Objects, John Wiley amp。 Sons, Ltd 2020 [10] James Gosling, Bill Joy, Guy Steele, Gilad Bracha and Alex Buckley 著 , The Java Language Specification[S], Java SE 8 Edition. Oracle America, Inc. and/or its affiliates 23 致 謝 本設計(論文)是在我的指導教師 原玲 副教授的親切關懷和悉心指導下完成的。他嚴肅的科學態(tài)度,嚴謹?shù)闹螌W精神,精益求精的工作作風,深深地感染和激勵著我。從題目的選擇到最終完成, 原玲 老師都始終給予我細心的指導和不懈的支持。 24 附錄 A 一個簡單的注冊頁面實現(xiàn) public class RegisterActivity extends Activity implements { @Override protected void onCreate(Bundle savedInstanceState) { (savedInstanceState)。 // init view ... } @Override public void onClick(View v) { // on register button click // create a new thread to perform work request new Thread(new Runnable() { @Override public void run() { // perform work request // and publish response to the UI thread } }).start()。 } } 附錄 B GenericActivity public abstract class GenericActivity ViewOps, 25 DocumentOps extends BasicDocumentOpsViewOps extends AppCompatActivity { private DocumentOps mDocument。 protected void onCreateDocument(ViewOps view, Class? extends DocumentOps documentOpsClass) { initDocument(documentOpsClass)。 (view)。 } public DocumentOps getDocument() { return mDocument。 } protected void onDestroyDocument() { ()。 mDocument = null。 } } 附錄 C AbstractDocumentViewOps public abstract class AbstractDocumentViewOps implements BasicDocumentOpsViewOps { private volatile WeakReferenceViewOps mReference。 @Override public void setView(ViewOps view) { mReference = new WeakReference(view)。 } public @Nullable ViewOps getView() { return mReference == null ? null : ()。 26 } } 附錄 D 避免 Document 的重復創(chuàng)建 protected void onCreateDocument( ViewOps view, Class? extends DocumentOps documentOpsClass) { FragmentManager manager = getFragmentManager()。 RetainedFragmentDocumentOps fragment = (RetainedFragmentDocumentOps) (RETAINED_FRAGMENT_TAG)。 mRetainedFragment = fragment。 if (mRetainedFragment == null) { initRetainedFragment(manager)。 initDocument(documentOpsClass)。 } else { mDocument = ()。 } (view)。 } public class RetainedFragmentDocumentOps extends Fragment { private DocumentOps mDocument。 public DocumentOps getDocument() { return mDocument。 } public void setDocument(DocumentOps document) { 27 mDocument = document。 } } 附錄 E 下載進度的發(fā)布 public interface DownloadObserver { void onStateChange(String path, int percent)。 } private volatile DownloadObserver mObserver。 public void registerDownloadObserver(DownloadObserver observer) { mObserver = observer。 } public void unregisterDownloadObserver() { mObserver = null。 } public void storeToDisk(InputStream in, long totalBytes) throws IOException { // ... long downloaded = 0。 byte[] buffer = new byte[4096]。 int len。 while ((len = (buffer)) 0) { downloaded += len。 notifyObserver((int) (downloaded * 100 / totalBytes))。 (buffer, 0, len)。 } // ... 28 } private void notifyObserver(int percent) { DownloadObserver observer = mObserver。 if (observer != null) { (mRemotePath, percent)。 } }
點擊復制文檔內容
高考資料相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1