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

正文內(nèi)容

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

2025-03-08 02:19上一頁面

下一頁面
  

【正文】 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。)不能重載。運算符有一個或兩個參數(shù)分別叫做單目或雙目運算符。 另一個多態(tài)的形式是函數(shù) 重載。靜態(tài)方式的束定也叫做早期束定。多態(tài),就是說有多個形式,提供一個基本的軟件接口以建立不同類型的對象操作的統(tǒng)一的方式。當在不必要時使用繼承,會使系統(tǒng)更加難以理解。繼承的另一種方式,也是很少使用的一種方式就是保護繼承。我們可以使用堆棧作為一個數(shù)據(jù)成員 ,或者使用私有繼承,從數(shù)組類中繼承堆棧類。 ISA繼承指兩個類,其中一個類描述了對對象的說明,對對象的設(shè)置說明由另一個類來說明。有些類之間可能不是完全的相關(guān)。可以在設(shè)計的過程中找到對象間的繼承關(guān)系,甚至可以使用傳統(tǒng)的,非面向?qū)ο蟮恼Z言設(shè)計系統(tǒng)。保護成員既可以被類的成員函數(shù)訪問,也可以被派生類的成員函數(shù)訪問。當一個數(shù)據(jù)對象被創(chuàng)建并且具有變量聲明時才分配內(nèi)存。用戶只可以通過一個公共的接口來訪問這個對象。系統(tǒng)被認為是由多個單一獨立的個體組成,其中每個個體只負責對其自身的操作的運行。信息的傳遞是對象間最基本的相互作用機制。多態(tài)可以使不同類型的的對象對相同的信息執(zhí)行相同的操作。對象同抽象數(shù)據(jù)類型很相似,聯(lián)系著數(shù)據(jù)和運算。 當我們設(shè)計一個算法時,需要一個特定的數(shù)據(jù)類型執(zhí)行算法的操作。還包括重復,選擇等特征?;旌险Z言,如 C++,綜合了兩到三種范例。怎樣去設(shè)計一個模式?程序范例提供 了許多不同的方法去設(shè)計和思考軟件系統(tǒng)。程序語言作為一種工具幫助我們解決這些問題。 1 面向?qū)ο蠛?C++ C++是目前所使用的眾多編程語言中的一種。然而,并不是一種程序語言可以最好的解決所有問題。一個范例可以被認為是一個模式或者一個框架來設(shè)計和描述軟件結(jié)構(gòu)。 C++包括了命令和程序范例的特性,例如,其前身 — C,和面向?qū)ο蠓独?。許多主流程序還是這種語言。如果可以定義變量的數(shù)據(jù)類型,而不影響到實際數(shù)據(jù)類型的運行,就可以很容易的制訂出算法。 面向?qū)ο蠓独哂腥N主要特性,第一種,壓縮,其機制是為了實施數(shù)據(jù)抽象。例如,我們有一部分對象它們可以執(zhí)行一類操作,但是只有在運行時我們才知道對象的類型。信息(從其他的對象或程序)傳遞給對象,以便通知對象運行下一個操作。每一個對象的設(shè)置和運行都是自身所包含的。一個 C++的類既包括共有的部分,又包括私有的部分。構(gòu)造函數(shù)和析構(gòu)函數(shù)提供了對象的初始化和釋放功能。和私有成員相同的一點,保護成員不可以被用戶程序訪問。但是,使用面向?qū)ο笳Z言,如 C++,由于語言支持對象間的繼承關(guān)系,從而可以更方便的了解設(shè)計執(zhí)行。大部分的類之間可以歸納為繼承的關(guān)系。 ISA 的關(guān)系是傳統(tǒng)的繼承關(guān)系,也就是派生類型。 可以在兩個類之間使用繼承創(chuàng)建一個互相包含的關(guān)系。保護繼承也是一種可以使用 HASA 關(guān)系的繼承。 5 總之,一個類有兩個主要的接口:一個是給用戶所使用的(公共接口),另一個派生類所使用(公有部分和保護部分的聯(lián)合)。 C++提供了三種類型的多態(tài):虛函數(shù),函數(shù)重載和運算符重載。 虛函數(shù)機制可以通過一個基類的參數(shù)或指針調(diào)用。當一個函數(shù)被使用在多個程序時就是重載。在 C++中,一個運算符函數(shù)的定義就像一個成員函數(shù)的定義,在其名字的前面加上關(guān)鍵字 operator。 在這后兩點的面向?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
點擊復制文檔內(nèi)容
教學課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1