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

正文內(nèi)容

計(jì)算機(jī)畢業(yè)論文外文翻譯---面向?qū)ο蠛蚦-其他專(zhuān)業(yè)(完整版)

  

【正文】 hem to perform one of their operations. Objects are responsible for maintaining the state of their data. Only the object may modify its internal data. Objects may themselves be implemented via other subobjects. Implementing an object involves a recursive process of breaking it into subobjects until at some level the objects and methods defined on them are primitives. At this point, the methods and data consist of elements that can be implemented using the basic constructs provided by the programming language. One of the most important aspects of the objectoriented paradigm is how it changes our way of thinking about software systems. Systems are thought of as consisting of individual entities that are responsible for carrying out their own operations. Each object is conceived and implemented as selfcontained. Such a model facilitates software design (and later implementation) because objects often model conceptual realworld entities. Designing systems using the objectoriented paradigm results in software systems that behave and appear more like their reallife counterparts. The ObjectOriented Characteristics of C++ ENCAPSULATION in C++. C++ extends C with a facility for defining new data types. A class is like a C struct, but contains data as well as methods. In addition, C++ provides different levels of access to the members of a class in order to control how the members of a class can be manipulated from outside the class. Recall that the importance of data abstraction is to hide the implementation details of a data object from the user. The user only accesses the object through its PUBLIC INTERFACE. A C++ class consists of a public and private part. The public part provides the interface to the users of the class, while the private part can only be used by the functions that make up the class. C++ provides keywords to indicate which members of a class are hidden and which are part of its public interface. The members of the hidden implementation are marked in sections beginning with the keyword private. The public interface part of the class follows the keyword public. By default, the declarations within a class are private, meaning that only the member functions (and friends) of the class have access to them. A class definition does not allocate any memory. Memory is allocated when an array object is created through a variable declaration. Constructors and destructors provide the initialization and clean up of an object. When an object is declared, the constructor is called to initialize the memory used by the object. The destructor performs any cleanup for the object when the object goes out of scope and is destroyed. 10 Note that we didn39。), and the arithmetic if operator (`?:39。) and subtraction (`39。)不能重載。運(yùn)算符有一個(gè)或兩個(gè)參數(shù)分別叫做單目或雙目運(yùn)算符。 另一個(gè)多態(tài)的形式是函數(shù) 重載。靜態(tài)方式的束定也叫做早期束定。多態(tài),就是說(shuō)有多個(gè)形式,提供一個(gè)基本的軟件接口以建立不同類(lèi)型的對(duì)象操作的統(tǒng)一的方式。當(dāng)在不必要時(shí)使用繼承,會(huì)使系統(tǒng)更加難以理解。繼承的另一種方式,也是很少使用的一種方式就是保護(hù)繼承。我們可以使用堆棧作為一個(gè)數(shù)據(jù)成員 ,或者使用私有繼承,從數(shù)組類(lèi)中繼承堆棧類(lèi)。 ISA繼承指兩個(gè)類(lèi),其中一個(gè)類(lèi)描述了對(duì)對(duì)象的說(shuō)明,對(duì)對(duì)象的設(shè)置說(shuō)明由另一個(gè)類(lèi)來(lái)說(shuō)明。有些類(lèi)之間可能不是完全的相關(guān)??梢栽谠O(shè)計(jì)的過(guò)程中找到對(duì)象間的繼承關(guān)系,甚至可以使用傳統(tǒng)的,非面向?qū)ο蟮恼Z(yǔ)言設(shè)計(jì)系統(tǒng)。保護(hù)成員既可以被類(lèi)的成員函數(shù)訪問(wèn),也可以被派生類(lèi)的成員函數(shù)訪問(wèn)。當(dāng)一個(gè)數(shù)據(jù)對(duì)象被創(chuàng)建并且具有變量聲明時(shí)才分配內(nèi)存。用戶只可以通過(guò)一個(gè)公共的接口來(lái)訪問(wèn)這個(gè)對(duì)象。系統(tǒng)被認(rèn)為是由多個(gè)單一獨(dú)立的個(gè)體組成,其中每個(gè)個(gè)體只負(fù)責(zé)對(duì)其自身的操作的運(yùn)行。信息的傳遞是對(duì)象間最基本的相互作用機(jī)制。多態(tài)可以使不同類(lèi)型的的對(duì)象對(duì)相同的信息執(zhí)行相同的操作。對(duì)象同抽象數(shù)據(jù)類(lèi)型很相似,聯(lián)系著數(shù)據(jù)和運(yùn)算。 當(dāng)我們?cè)O(shè)計(jì)一個(gè)算法時(shí),需要一個(gè)特定的數(shù)據(jù)類(lèi)型執(zhí)行算法的操作。還包括重復(fù),選擇等特征?;旌险Z(yǔ)言,如 C++,綜合了兩到三種范例。怎樣去設(shè)計(jì)一個(gè)模式?程序范例提供 了許多不同的方法去設(shè)計(jì)和思考軟件系統(tǒng)。程序語(yǔ)言作為一種工具幫助我們解決這些問(wèn)題。 1 面向?qū)ο蠛?C++ C++是目前所使用的眾多編程語(yǔ)言中的一種。然而,并不是一種程序語(yǔ)言可以最好的解決所有問(wèn)題。一個(gè)范例可以被認(rèn)為是一個(gè)模式或者一個(gè)框架來(lái)設(shè)計(jì)和描述軟件結(jié)構(gòu)。 C++包括了命令和程序范例的特性,例如,其前身 — C,和面向?qū)ο蠓独?。許多主流程序還是這種語(yǔ)言。如果可以定義變量的數(shù)據(jù)類(lèi)型,而不影響到實(shí)際數(shù)據(jù)類(lèi)型的運(yùn)行,就可以很容易的制訂出算法。 面向?qū)ο蠓独哂腥N主要特性,第一種,壓縮,其機(jī)制是為了實(shí)施數(shù)據(jù)抽象。例如,我們有一部分對(duì)象它們可以執(zhí)行一類(lèi)操作,但是只有在運(yùn)行時(shí)我們才知道對(duì)象的類(lèi)型。信息(從其他的對(duì)象或程序)傳遞給對(duì)象,以便通知對(duì)象運(yùn)行下一個(gè)操作。每一個(gè)對(duì)象的設(shè)置和運(yùn)行都是自身所包含的。一個(gè) C++的類(lèi)既包括共有的部分,又包括私有的部分。構(gòu)造函數(shù)和析構(gòu)函數(shù)提供了對(duì)象的初始化和釋放功能。和私有成員相同的一點(diǎn),保護(hù)成員不可以被用戶程序訪問(wèn)。但是,使用面向?qū)ο笳Z(yǔ)言,如 C++,由于語(yǔ)言支持對(duì)象間的繼承關(guān)系,從而可以更方便的了解設(shè)計(jì)執(zhí)行。大部分的類(lèi)之間可以歸納為繼承的關(guān)系。 ISA 的關(guān)系是傳統(tǒng)的繼承關(guān)系,也就是派生類(lèi)型。 可以在兩個(gè)類(lèi)之間使用繼承創(chuàng)建一個(gè)互相包含的關(guān)系。保護(hù)繼承也是一種可以使用 HASA 關(guān)系的繼承。 5 總之,一個(gè)類(lèi)有兩個(gè)主要的接口:一個(gè)是給用戶所使用的(公共接口),另一個(gè)派生類(lèi)所使用(公有部分和保護(hù)部分的聯(lián)合)。 C++提供了三種類(lèi)型的多態(tài):虛函數(shù),函數(shù)重載和運(yùn)算符重載。 虛函數(shù)機(jī)制可以通過(guò)一個(gè)基類(lèi)的參數(shù)或指針調(diào)用。當(dāng)一個(gè)函數(shù)被使用在多個(gè)程序時(shí)就是重載。在 C++中,一個(gè)運(yùn)算符函數(shù)的定義就像一個(gè)成員函數(shù)的定義,在其名字的前面加上關(guān)鍵字 operator。 在這后兩點(diǎn)的面向?qū)ο蠓治鲋?,我們可以看?C++很好的支持了面向?qū)ο蟮姆独? operators work for plex objects just as they do for ints and floats. Operators are defined in much the same was as normal C++ functions and can be members or nonmembers of a class. Operators take one or two arguments and are called unary and binary operators accordingly. In C++, a member operator function is defined like an ordinary member function, but the name is prefixed with the keyword operator. C++ places a number of restrictions on operator overloading. Only the predefined set of C++ operators may be overloaded. It is illegal to define a new operator and then overload it. You cannot turn a unary operator into a binary operator or vice versa. Also, the following operators cannot be overloaded: scope operator (`::39。), class object selector operator (`.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 als
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1