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

正文內(nèi)容

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

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

下一頁面
  

【正文】 g. The virtual function mechanism can only be invoked through the use of a base class reference or pointer. Recall that a base class pointer can point to an object of the base type or an object of any type that is derived from the base class. Virtual functions are also used to implement the logic gate hierarchy .The class gate is an abstract base class at the root of the inheritance hierarchy. A class is considered abstract when some of its virtual member functions do not have an implementation. These functions are assigned to be zero in the class classes must provide implementations for them. Another form of polymorphism found in C++ is function overloading. A function is said to be overloaded when it is declared more than once in a program. Overloading allows a set of functions that perform a similar operation to be collected under the same name. When there are several declarations of the same function, the piler determines which function should be called by examining the return type and argument signature of the function call. 13 When we define new data types, it is often useful to define standard operations that are found in similar types. For example, a plex type also has addition and subtraction defined for it. We can use operator overloading so that the addition (`+39。s structure. The model helps us think about and formulate solutions. We can use the mental model of a paradigm independently from the programming language chosen for implementation. However, when the chosen language provides constructs and mechanisms that are similar to those that are found in the paradigm, the 7 implementation will be more straightforward. Usually, there are several languages that belong to a paradigm. For this reason, a programming paradigm is also considered a class of languages. A language does not have to fit into just one paradigm. More often, languages provide features or characteristics from several paradigms. Hybrid languages, such as C++, bine characteristics from two or more paradigms. C++ includes characteristics from the imperative and procedural paradigms just like its predecessor language, C and the objectoriented paradigm. THE IMPERATIVE PARADIGM. The imperative paradigm is characterized by an abstract model of a puter with a large memory store. This is the classic von Neumann model of puter architecture. Computations, which consist of a sequence of mands, are stored as encoding within the store. Commands enable the machine to find solutions using assignment to modify the store, variables to read the store, arithmetic and logic to evaluate expressions, and conditional branching to control the flow of execution. THE PROCEDURAL PARADIGM. The procedural paradigm includes the imperative paradigm, but extends it with an abstraction mechanism for generalizing mands and expressions into procedures. Parameters, which are essentially aliases for a portion of the store, were also introduced by this paradigm. Other features include iteration, recursion, and selection. Most mainstreams programming today is done in a procedural language. The procedural paradigm was the first paradigm to introduce the notion of abstraction into program design. The purpose of abstraction in programming is to separate behavior from implementation. Procedures are a form of abstraction. The procedure performs some task or function. Other parts of the program call the procedure, knowing that it will perform the task correctly and efficiently, but without knowing exactly how the procedure is implemented. THE PROCEDURAL PARADIGM WITH ADTs. DATA ABSTRACTION is concerned with separating the behavior of a data object from its representation or implementation. For example, a stack contains the operations Push, Pop, and IsEmpty. A stack object provides users with these operations, but does not reveal how the stack is actually implemented. The stack could be implemented using an array or a list. Users of the stack object do not care how the stack is implemented, only that it performs the above operations correctly and efficiently. Because the underlying implementation of the data object is hidden from its users, the implementation can easily be changed without affecting the programs that use it. When we design algorithms, we often need a particular data type to use in order to carry out the algorithm39。),選擇運(yùn)算 (`?:39。你不能把單目運(yùn)算符返回到雙目運(yùn)算或多目運(yùn)算中。運(yùn)算符的定義和 C++函數(shù)的定義相似,可以作為類的成員或非成員。當(dāng)有相同函數(shù)時,編譯器通過檢查它的返回值和參數(shù)決定哪個被調(diào)用。派生類必須給出他們的實現(xiàn)。虛函數(shù)也可以用在邏輯的運(yùn)算上。這是一個動態(tài)的約束。當(dāng)所有的函數(shù)傳遞同樣的信息值時,虛函數(shù)的機(jī)制確保在動態(tài)運(yùn)行時了調(diào)用正確的函數(shù)。多態(tài),和繼承一起,對面向?qū)ο蟪绦蛴泻艽蟮挠猛尽T诨愔械墓步涌谑褂霉欣^承,在派生類中隊用戶也是公有接口。如果你所有的派生類是基類的一個說明構(gòu)造時,只有使用公有繼承,否則,要使用私有繼承。當(dāng)繼承是接口的部分時,派生類要使用保護(hù)繼承,但是不是接口的所有部分都可以被用戶使用。這是一個修改為不同的基類的運(yùn)行。在私有繼承的情況下,原來基類中的公有部分和保護(hù)部分,在派生類中都變?yōu)樗接胁糠帧@?,一個堆棧可以被當(dāng)作一個數(shù)組使用。 在 C++中執(zhí)行 ISA 關(guān)系需要使用公有繼承。這種關(guān)系是類型與類型,類與類之間特有的關(guān)系。但不是所有的類之間都可以建立繼承的關(guān)系。當(dāng)設(shè)計一個軟件系統(tǒng)時,需要建立一系列的對象,并且需要互相關(guān)聯(lián)的一系列對象。 C++可以認(rèn)為是 C 語言的擴(kuò)展的過程語言或面向?qū)ο笳Z言。 當(dāng)設(shè)計了一種方案,一種程序語言就可以被選擇執(zhí)行。例如一個語句 i (),我們可以有效的把信息傳給 a2 的對象,以確定組的大小并返回其值。 C++定義了關(guān)鍵字 protected 來完成繼承的實現(xiàn)。當(dāng)對象離開它所在的范圍時,調(diào)用析構(gòu)函數(shù)釋放對象。 一個類的定義并不分配內(nèi)存。 C++提供了關(guān)鍵字來說明類中哪些 成員是不可見的,哪 些部分是其公共接口。 重復(fù)的調(diào)用一個抽象的數(shù)據(jù)可以對用戶隱藏對一個數(shù)據(jù)對象的操作細(xì)節(jié)。設(shè)計 3 一個系統(tǒng)使用面向?qū)ο蟮姆独?,從而使得系統(tǒng)的操作和運(yùn)行更類似于真實世界中所對應(yīng)的真實個體。 學(xué)習(xí)面向?qū)ο蠓独钪匾囊稽c(diǎn)是如何改變我們思考建造軟件體系的思路。只有對象本身才可以改變它內(nèi)部的數(shù)據(jù)值。這些對象被用來構(gòu)建計算,定義軟件系統(tǒng)的操作運(yùn)行。 壓縮,繼承和多態(tài)被認(rèn)為是面向?qū)ο蟪绦虻幕咎卣?,所有的面向?qū)ο蟪绦蛘Z言必須提供這些特征。面向?qū)ο蟮牡谌N特性是多態(tài)。繼承允許從已存在的對象中創(chuàng)建新的對象。但是,程序不僅僅是抽象值的運(yùn)算,在面向?qū)ο蠓独N還有對對象的運(yùn)算。抽象數(shù)據(jù)類型的使用使得算法的設(shè)計得到更大的推廣,使得我們在算法設(shè)計時,注重了算法
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1