安卓-外文翻译

上传人:沈*** 文档编号:136440566 上传时间:2022-08-16 格式:DOC 页数:11 大小:42.50KB
收藏 版权申诉 举报 下载
安卓-外文翻译_第1页
第1页 / 共11页
安卓-外文翻译_第2页
第2页 / 共11页
安卓-外文翻译_第3页
第3页 / 共11页
资源描述:

《安卓-外文翻译》由会员分享,可在线阅读,更多相关《安卓-外文翻译(11页珍藏版)》请在装配图网上搜索。

1、文献翻译 题 目 基于安卓的学生成绩管理系统的设计与实现 学生姓名 专业班级 计本1203班 学 号 院 (系) 数计学院 指导教师 完成时间 2016.4.25 文献翻译书名:C#设计模式 作者姓名:(美)麦斯科(Metsker,S.J.)著出处:/ 2006-7-1 / 中国电力出版社主要内容:针对日常的软件开发问题,设计模式提供了一种优雅的、通用的可重用解决方案。程序员可以通过设计模式组织程序中的对象,使其更易于编写和修改。本书正是一本设计模式的实用指南,帮助你采用最常见的模式来编写C#程序。C#设计模式(附光盘)由JamesW.Cooper编著,首先简明扼要地介绍了C#、面向对象编程、

2、继承和UML图,然后分章描述了23种设计模式及各自的使用场合,并阐明了模式在大型设计中的作用。每种模式的用法都配有相应的示例程序演示,这些程序收录在随书配套光盘中,可以直接运行、测试、编辑和使用。简介c#C#编程语言是为开发微软公司的NET框架上的程序而设计的。本章将简要介绍NET从何而来,以及它的基本架构。这只是为了确保你从正确的一步开始,让我借此机会提醒你一件可能显面易见的事情:C的发音为see sharp。1.1.120世纪90年代后期的Windows编程在20世纪90年代后期,使用微软平台的Windows编程分化成许多分支。大多数程序员在使用Visual Basic(VB)、C或C。一

3、些C和C程序员在使用纯Win32 APl,但大多数人在使用MFC(Microsoft Found撕on Classes,微软基础类库)。其他人已经转向了COM(Component ObjectMdodel,组件对象模型)。所有这些技术都有自己的问题。纯Win32 APl不是面向对象的,而且使用它的工作量比使用VIFC的更大。MFC是面向对象的,但是它却不一致,并逐渐变得陈旧。COM虽然概念上简单,但它的实际代码复杂,并且需要很多丑陋的、不雅的底层基础代码。所有这些编程技术的另外一个缺点是它们主要针对桌面程序而不是Intemet的开发。那时,Web编程还是以后的事情,而且看起来和桌面编程非常不同

4、。.NET(C#)把attribute翻译成特性,用来标识类,把property翻译为属性,性质,用于存取类的字段,把markup翻译成标记,tag还是翻译成标签比较好.NET(C#).NET Framework称为公共语言运行库(CLR)或.NET运行库.它的核心是其运行库的执行环境。通常将在CLR的控制下运行的代码称为托管代码(managed code).在CLR执行开发的源代码之前,需要编译它们为中间语言(IL),CLR再把IL编译为平台专用的代码。程序集(assembly)是包含编译好的,面向.NET Framework的代码的逻辑单元.可执行代码和库代码使用相同的程序集结构.程序集的

5、一个重要特性是它们包含的元数据描述了对应代码中定义的类型和方法.NET(C#)ASP页面有时显示比较慢,因为服务器端代码是解释性的不是编译的.由于ASP代码不是结构化的所以难于维护,加上ASP不支持错误处理和语法检查。而ASP.NET页面是结构化的。每个页面都是一个继承了.NET类System.Web.UI.Page的类。另外ASP.NET的后台编码功能允许进一步采用结构化的方式.页面请求是和WEB服务器在编译后高速缓存ASP.NET页面。.NET(C#)覆盖(override)和重载(overload):覆盖是指子类重新定义父类的虚函数的做法。重载,是指允许存在多个同名函数,而这些函数的参数

6、表不同(或许参数个数不同,或许参数类型不同,或许两者都不同)。其实,重载的概念并不属于“面向对象编程”,重载的实现是:编译器根据函数不同的参数表,对同名函数的名称做修饰然后这些同名函数就成了不同的函数(至少对于编译器来说是这样的)。如,有两个同名函数:function func(p:integer):integer; 和function func(p:string):integer;。那么编译器做过修饰后的函数名称可能是这样的:int_func、str_func。对于这两个函数的调用,在编译器间就已经确定了,是静态的(记住:是静态)。也就是说,它们的地址在编译期就绑定了(早绑定),因此,重载和

7、多态无关!真正和多态相关的是“覆盖”。当子类重新定义了父类的虚函数后,父类指针根据赋给它的不同的子类指针,动态(记住:是动态!)的调用属于子类的该函数,这样的函数调用在编译期间是无法确定的(调用的子类的虚函数的地址无法给出)。因此,这样的函数地址是在运行期绑定的(晚邦定)。结论就是:重载只是一种语言特性,与多态无关,与面向对象也无关! .NET(C#)C#中ref和out的区别:方法参数上的 out 方法参数关键字使方法引用传递到方法的同一个变量。当控制传递回调用方法时,在方法中对参数所做的任何更改都将反映在该变量中。 当希望方法返回多个值时,声明 out 方法非常有用。使用 out 参数的方

8、法仍然可以返回一个值。一个方法可以有一个以上的 out 参数。 若要使用 out 参数,必须将参数作为 out 参数显式传递到方法。out 参数的值不会传递到 out 参数。 不必初始化作为 out 参数传递的变量。然而,必须在方法返回之前为 out 参数赋值。 属性不是变量,不能作为 out 参数传递。 方法参数上的 ref 方法参数关键字使方法引用传递到方法的同一个变量。当控制传递回调用方法时,在方法中对参数所做的任何更改都将反映在该变量中。 若要使用 ref 参数,必须将参数作为 ref 参数显式传递到方法。ref 参数的值被传递到 ref 参数。 传递到 ref 参数的参数必须最先初始

9、化。将此方法与 out 参数相比,后者的参数在传递到 out 参数之前不必显式初始化。 属性不是变量,不能作为 ref 参数传递。 两者都是按地址传递的,使用后都将改变原来的数值。ref可以把参数的数值传递进函数,但是out是要把参数清空就是说你无法把一个数值从out传递进去的,out进去后,参数的数值为空,所以你必须初始化一次。 Design and implementation of student achievement management system Document translationAiming at the problem of daily software develo

10、pment, design pattern provides an elegant, generic and reusable solutions. Programmers can through the object design pattern organization program, making it easier to write and modify. This book is a practical guide to the design patterns, to help you with the most common pattern to write C# program

11、. The C# design pattern (with CD-ROM) by JamesW.Cooper, first of all be concise and to the point introduces C#, object-oriented programming, inheritance and UML graph, and then describes 23 kinds of design patterns and application occasions of each chapter, and expounds the patterns in large design

12、function. Each kind of model usage are equipped with corresponding example demonstration program, the program included in the CD-ROM with book matching, can be directly run, test, edit and use.Introduction to c#C# programming language is the.NET framework for the development of the Microsoft Corp on

13、 the program design. This chapter will briefly introduce the.NET come from, and its basic architecture. Just to make sure you start from a step in the right direction, let me take this opportunity to remind you of a possible significant surface easy to see things: C, pronounced see sharp.Windows pro

14、gramming in the late 90 century 1.1.120In the late nineteen ninties, using Microsoft platform Windows programming differentiation into many branches. Most programmers use Visual Basic (VB), C or C + +. Some of the C and C + + programmers in the use of pure Win32 to APl, but most people in the use of

15、 MFC (Microsoft Found on Classes tear, Microsoft Foundation Class Library). Other people have turned to the COM (Component, ObjectMdodel, component object model).All of these technologies have their own problems. Win32 APl is not a pure object oriented, and use its workload is bigger than the use of

16、 VIFC. MFC is object oriented, but it is not consistent, and gradually become obsolete. Although COM is simple in concept, but the actual code its complex, low-level code and need a lot of ugly, indecent.Another disadvantage of all these programming techniques are mainly for the desktop application

17、and development is not Intemet. Then, Web programming or after things, and looks very different from coding for the desktop.NET (C#)Translate attribute into characteristic, used to identify the class, methodThe property translated into property, property, used for field access classTranslating marku

18、p tag, tag label or translated into better.NET (C#)The core of.NET Framework is its runtime execution environment.Known as the common language runtime (CLR) or the.NET runtime.Usually will run under the control of the CLR code known as managed code (managed code).Before the CLR implementation of the

19、 development of the source code, to compile them into intermediate language (IL), CLR and IL compiled into a platform specific code.The assembly (assembly) is compiled, logic unit for the.NET Framework code.The executable code and database code using the same assembly structure.An important characte

20、ristic of the assemblys metadata they contain describes the type and method definitions corresponding code.NET (C#)ASP pages are sometimes slower, because the server-side code is interpreted not compiled.Because the ASP code is not structured so difficult to maintain, and ASP does not support error

21、handling and grammar check.While the ASP.NET page is structured. Each page is a successor to the.NET System.Web.UI.Page class.In addition to background coding function ASP.NET to allow further using a structured way.The page request is compiled and WEB server in the ASP.NET cache page.NET (C#)Cover

22、(override) and heavy (overload):Coverage means that subclasses redefine the virtual function of the parent class method.Overloading, refers to allow multiple functions with the same name, and the parameters of these functions are different (perhaps the number of parameters are different, perhaps dif

23、ferent parameter types, maybe both are different).In fact, the concept of heavy load does not belong to the object oriented programming,Heavy load: the compiler implementation is according to the parameter table function different, the name of the functions with the same name as modificationThen the

24、se functions with the same name as the different function (at least for the compiler).For example, there are two functions with the same name: function func (p:integer): integer; and function func (p:string): integer;.Then the compiler had modified the function name may be this: int_func, str_func.F

25、or the two function calls, the compiler have been identified, is static (remember: static).That is to say, their address is bound at compile time (early binding),Therefore, overloading and polymorphism! The real and polymorphism is related to the cover.When the class to define virtual functions the

26、parent class, the parent class pointer according to assign it to the different sub class pointer, dynamic (remember: dynamic!) The function call belongs to the subclass,This function calls cannot be determined at compile time (virtual function call subclass addresses cannot be given).Therefore, such

27、 a function address is in operation period (late binding) bound.The conclusion is: heavy just a language feature, and polymorphism, it has nothing to do with the object oriented!.NET (C#)The difference between ref and out in C#:The out method parameters on the parameters of keyword method reference

28、to the same variable method.When control passes back to the calling method, any changes made to the parameter in the method will be reflected in the variable.When you want to return multiple values, the out method is very useful statement.Methods using the out parameter can still return a value. A method can be

展开阅读全文
温馨提示:
1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
2: 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
3.本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!