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

正文內(nèi)容

計算機畢業(yè)論文外文翻譯---面向?qū)ο蠛蚦++-其他專業(yè)-預(yù)覽頁

2025-02-20 02:19 上一頁面

下一頁面
 

【正文】 的全面,而不會拘泥于運行的細節(jié)。用戶無法看到數(shù)據(jù)的基本操作,執(zhí)行可以方便的更改而不影響程序的運行。抽象可以把動作和結(jié)果隔離。參數(shù),即存儲的一部分,被引進在范例中。這是計算機體系的 von Neumann 模型。 一種語言不僅要符合一種范例,而且能夠使用多種范例提供的特性和特征。我們可以選擇一種語言,使用范例獨立的完成。 通過范例設(shè)計軟件 當(dāng)設(shè)計一個小的計算機程序或大的軟件系統(tǒng)是,我們要思考問題的解決模式。其他語言可以用來解決不同的問題領(lǐng)域和多方面的用途。每一個問題都需要不同的數(shù)據(jù)結(jié)構(gòu)和算法。第一個編程語言對基本的機器結(jié)構(gòu)有很大的依賴性。為什么會有那么多的語言?為什么總會有新的語言不斷出現(xiàn)?編程語言可以幫助程序員方便實現(xiàn)從設(shè)計到實現(xiàn)。 為什么有這么多高水平的編程語言?有很多語言可以訪問大型數(shù)據(jù)庫,格式化金融報告,控制機器人在工廠工作,處理機件,控制衛(wèi)星實時模擬核反應(yīng)堆,預(yù)測變化 的大氣層狀況,下棋和繪制電路圖。新的語言被開發(fā)來更好的解決一類特定的問題。這些方案被叫做程序范例,幫助我們思考問題,規(guī)范解決。這個模式幫助我們?nèi)ニ伎己鸵?guī)范解決。因此,一種范例可以被看作一種語言的類。 命令范例:命令范例的特性是 計算機的抽象模型和巨大的內(nèi)存存儲。 程序范例:它包括了命令范例,還有對概念命令和表達的抽象機制。程序范例在程序設(shè)計中首次引進了抽象的概念。 2 程序范例和 ADT:數(shù)據(jù)抽象使一個數(shù)據(jù)對象的行為和它的描述或執(zhí)行相分離。通過定義數(shù)據(jù)的用法和操作,假定可以選擇任何一種運行,這種定義就叫做抽象數(shù)據(jù)類型。 面向?qū)ο蟮姆独核匀槐A袅嗽S多程序范例的特征,過程仍然是計算的主要形式。第二種,繼承。當(dāng)一個對象從另一個對象中被創(chuàng)建或取得時 ,就說新對象繼承了它父對象的方法和數(shù)據(jù),并增加了一些新的描述和說明。面向?qū)ο笳Z言包含的機制確保了每一類信息傳遞給正確的對象。 構(gòu)建一個面向?qū)ο蟮某绦蛐枰獩Q定解決問題所需的對象。對象需要負責(zé)維護它所相關(guān)的數(shù)據(jù)的狀態(tài)。這時,這個方法和數(shù)據(jù)所組成的元素可以使用程序語言所提供的基本的構(gòu)造函數(shù)。由于對象常常模仿真實世界的個體的概念,因而這樣的一個模型推動了軟件方面的設(shè)計(以及后來的實行)。除此之外, C++還提供了類中各個成員訪問權(quán)限的不同,以此方便的控制即使是在不同的類,也可以訪問類中的成員。公有的部分提供給用戶關(guān)于這個類的接口,私有的部分只有構(gòu)造這個類的函數(shù)才可以訪問。當(dāng)一個類是私有的類時,意味著只有這個類的函數(shù)或友元可以使用它。當(dāng)一個對象被聲明時,它的構(gòu)造函數(shù)初始化其在內(nèi)存的值。建造一個類可以使它方便的訪問它父類的私有成員。 對象所需要注意的最后一點,信息的重復(fù)傳遞時對象間交流的基本功能。編譯器確保對所需要的對象調(diào)用正確的函數(shù),因此,在 C++中,可以把信息的傳遞當(dāng)作函數(shù)的調(diào)用。 C++語言是混合型的語言,它屬于多范例的語言。 面向?qū)ο笤O(shè)計的一個主要操作就是要確認(rèn)真實世界的個體以及各個個體之間的聯(lián)系。將一系列的類歸為一個類的層次需要明白各個類之間的關(guān)系和他們之間的細節(jié)。 第一種關(guān)系是 ISA 關(guān)系。派生類型是一些基本類型即父類型的專門化,在 C++中,超級類型就是基類,派生類型就是派生類。 在 C++中使用 HASA 關(guān)系可以使用成員或是私有繼承。私有繼承只有在不是接口的部分可以被使用,基類是一個細節(jié)的執(zhí)行。當(dāng)這樣使用基類中的成員時,用戶不可以只依靠繼承來編寫代碼。當(dāng)使用保護繼承時,在基類中的公有部分和保護部分,在派生類中就都變?yōu)楸Wo部分。這時當(dāng)你必須重復(fù)使用基類中的函數(shù)時,可以使用其繼承。繼承的部分是基本相同的。 C++多態(tài):多態(tài)是面向?qū)ο蟪绦虻娜齻€特性中最重要的部分。 虛函數(shù)可以使繼承的同層相關(guān)的對象用同一種方式操作。 當(dāng)定義一個成員函數(shù)時,在它前面加上關(guān)鍵字 virtual,實際過程的調(diào)用依賴于對象實例的類型,通過這樣來判斷如何調(diào)用。一個基類的指針可以指向一個基本類型的對象或任何從基類派生出的類型的對象。這些函數(shù)在類定義時被賦予 0 值。重載允許在同樣的名稱下執(zhí)行一系列相似的功能。我們可以使用運算符重載加減操作就像整形和浮點型數(shù)據(jù)。 C++在運算符 的重載上有一些限制,只有先定義運算符的操作才可以被重載,只定義了運算符就重載是錯誤的。),類運算 (`.39。 6 ObjectOrientation and C++ C++ is just one of many programming languages in use today. Why are there so many languages? Why do new ones appear every few years? Programming languages have evolved to help programmers ease the transition from design to implementation. The first programming languages were very dependent on the underlying machine architecture. Writing programs at this level of detail is very cumbersome. Just as hardware engineers learned how to build puter systems out of other ponents, language designers also realized that programs could be written at a much higher level, thereby shielding the programmer from the details of the underlying machine. Why are there such a large number of highlevel programming languages? There are languages for accessing large inventory databases, formatting financial reports, controlling robots on the factory floor, processing lists, controlling satellites in real time, simulating a nuclear reactor, predicting changing atmospheric conditions, playing chess, and drawing circuit boards. Each of these problems requires different sets of data structures and algorithms. Programming languages are tools to help us solve problems. However, there is not one programming language that is best for every type of problem. New programming languages are often developed to provide better tools for solving a particular class of problems. Other languages are intended to be useful for a variety of problem domains and are more general purpose. Each programming language imparts a particular programming style or design philosophy on its programmers. With the multitude of programming languages available today, a number of such design philosophies have emerged. These design philosophies, called programming paradigms, help us to think about problems and formulate solutions. Software Design through Paradigms When designing small puter programs or large software systems, we often have a mental model of the problem we are trying to solve. How do we devise a mental model of a software system? Programming paradigms offer many different ways of designing and thinking about software systems. A paradigm can be thought of as a mental model or as a framework for designing and describing a software system39。s look at several different class relationships. The first relationship is the ISA relationship. This type of relationship represents a specialization between types or classes. ISA inheritance holds for two classes if the objects described by one class belongs to the set of objects described by the other more general class. The ISA relationship is the traditional form of inheritance called subtyping. The subtype is a specialization of some more general type known as the supertype. In C++, the supertype is called the base class and the subtype the derived class. To implement the ISA relationship in C++ we use public inheritance. When public inheritance is used the public parts of the base class bee public in the derived class and the protected parts of the base class bee protected in the derived class. To implement the HASA relationship in C++ we use either position or private inheritance. For example, a stack can be implemented using an array. We can either use the stack as a data member (position) or derive the stack class from the array class using private inheritance. It is also possible to use inheritance to achieve a containership relationship between two classes. Private inheritance is used when the inheritance is not part of the interface。), member object selection operator (`
點擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1