(完整版)毕设外文翻译-详细解析Java中抽象类和接口的区别

(完整版)毕设外文翻译-详细解析Java中抽象类和接口的区别
(完整版)毕设外文翻译-详细解析Java中抽象类和接口的区别

Parsing Java Abstraction of the Difference Between Classes and

Interfaces

In Java language, abstract scale-up and with support class abstraction definition of two mechanisms. Because of these two kinds of mechanism of existence, just gives Java powerful object-oriented skills. Abstract scale-up and with between classes abstraction definition for support has great similarities, even interchangeable, so many developers into line non-abstract class definition for abstract scale-up and it is becoming more casual with choice. In fact, both between still has the very big difference, for their choice even reflected in problem domain essence of understanding, to design the intentions of the understanding correctly and reasonable. This paper will for the difference analysis, trying to give a developer with a choice between them are based.

Understand class abstraction

Abstract class and interface in Java language is used for abstract classes (in this article non-abstract class not from abstract scale-up translation, it represents an abstract body, and abstract scale-up for Java language used to define class abstraction in one way, please readers distinguish) defined, then what are the abstract classes, use abstract classes for us any good?

In object-oriented concept, we know all objects is through class to describe, but in turn not such. Not all classes are used to describe object, if a class does not contain enough information to portray a concrete object, this class is abstract classes. Abstract classes are often used to characterization of problem field in our analysis, design that the abstract concepts, is to the series will look different, but essentially the same exact conception of abstraction. For example: if we carry out a graphical editing software development, will find problem domain exists round, triangle so some specific concept, they are different, but they all belong to shape such a concept, shape this concept in problem domain is not exist, it is an abstract concept. Precisely because the abstract concepts in problem field no corresponding specific concept, so to characterization abstract concepts non-abstract class cannot be instantiated.

In an object-oriented field, mainly used for class abstraction types hidden. We can

construct a fixed a group of behavior of abstract description, but this group of behavior but can have any a possible concrete implementation. This abstract describe is abstract classes, and this an arbitrary a possible concrete realization is behaved for all possible derived class. Modules can be operating an abstract body. Due to the module dependent on a fixed abstraction body, so it can are not allowed to modify, Meanwhile, through the abstract derived from the body, also can expand the behavior of this module function. Familiar with OCP readers must know, object-oriented design to be able to achieve a core principle OCP (Open - Closed flying), class abstraction is one of the key.

From the perspectives of grammar definition abstract class and interface

In grammatical perspective, Java language for abstract scale-up and with gives different definitions below to define a way, called produce professional Demo abstract class as an example to illustrate the difference.

In the abstract scale-up manner, produce professional Demo can have their own data members, also can have the members of the abstract method, and with the realization of the way, produce professional Demo can have only static cannot be modified data members, all the members of the methods is abstract. In a sense, with a special kind of abstract class.

From programming, from the perspective of abstract scale-up and with can be used to achieve "cancel" thoughts make themselves. But in the specific use top still have some difference.

First, abstract class in Java language suggests is a kind of inheriting relationship, a class can be used only once inheritance relationship (because Java do not support more inheritance ZhuanZhu). - However, a class but can implement multiple with. Maybe it is Java language designers in considering Java for multiple inheritance support of a compromise to consider it.

Secondly, in the definition of abstract scale-up, we may give methods of default behavior. But in with the definition of method cannot have the default behavior, to bypass this limits, must use entrust, but it will add some complexity, sometimes can cause a lot of trouble.

In class abstraction cannot define the default behavior is there another serious problem that may cause on the maintenance of trouble. Because if later want to modify the

interface (usually by such abstract scale-up or with to represent) to adapt to the new situation (e.g., adding new methods or to have already used the method to add new parameters), will be very troublesome, might spend a lot of time (for a derived class many situation, especially). But if the interface is through scale-up abstract to realize, then may just need to modify defined in the abstract scale-up default behavior is ok.

Similarly, if not in abstract class defined in the default behavior, can lead to the same method to appear in the abstract class every a derived class, violated "a-one rule," principle, causing a-one place, the same code duplication against future maintenance. Therefore, in the abstract scale-up and with a choice between should be careful.

From the design concept with abstract class and interface

It mainly from grammar definition and programming perspective, this paper discusses the area with abstract class and don't, these levels difference is relatively low levels of, the essence. This section will from another level: abstract class and with reflected design concept, analyst the difference. The author thinks that from this level analysis to understand the essence of both concepts.

As already mentioned, abstract class in Java language reveals a kind of inheriting relationship, want to make reasonable, the inheritance relationship between parent class and derived class must exist "is - a" relations, namely the super class and derived class in concept in essence should be the same. For with criterion otherwise, it does not require with of implementers and with defined in concept is essentially a consistent, only is realized with defined a contract is just. In order to facilitate understandings.

Consider such a example, suppose in our problem field has a about filled the abstract concepts, this filled with executive two movements open and close, then we can through scale-up or abstract with to define a said the abstract concept of type, define each pattern .

Other concrete filled type can use extends the abstract class defined or filled with defined using implements the filled. Look like using abstract class and with no much difference.

If now requires more filled with alarm function. How can we design according to the example of the class hierarchy? (in this case, it is mainly to show abstract class and with

reflected in the design ideas, distinction, other aspect problem unrelated all did simplified or omitted)? Below will enumerate possible solutions, and from the design LiNianCeng face these different schemes for analysis.

This method violated the object-oriented design of a core principles ISP (with flying Segregation), in the definition of filled the filled concept itself inherent behavior methods and another concept "alarm" behavior methods mix together. Such a problem is that those who cause depends only upon the concept of modules will be held because "alarm" this concept change (for example: modify the parameters) and alarm method, and vice still change.

Since open and close and alarm belong to two different concepts, according to the ISP principle should consider them separately defined in representatives of these two concepts from the class abstraction. Definition means has: the two concepts are using abstract scale-up defined; two concepts are used with defined; a concept using abstract scale-up defined, another concept using with defined.

Obviously, due to Java language does not support multiple inheritance, so two concepts are using abstract class defined is not feasible. The latter two ways are feasible, but for their choice actually reflected in problem in the field of concept nature's understanding, whether for design intent reflect the correct and reasonable. We are a result analysis and description.

If the two concepts are used with ways to define, then reflects two problems: 1, we may not understand clearly problem domain, AlarmDoor in concept essentially exactly is held or alarm? 2, if we in problem field understanding no problems, for example: we through for problem domain analysis found that AlarmDoor in concept in essence and filled is consistent, then we realize when he failed to correct reveal our design intention, because in these two concepts on the definitions (both use with defined) reflect reflected these meanings.

If we in problem field understanding is: AlarmDoor in concept is essentially, at the same time it is filled with alarm function. How should we come to the design, realization to clear reflect what we mean by this? Front has said, in Java language abstract scale-up said in an inheritance relationship, and inheriting relationship is in nature "is a" relationship. So for

held this concept, we should use abstract scale-up way to define. In addition, AlarmDoor has alarm functions, that it will be able to accomplish alarm concept definition of behavior, so alarm concept can be through with defined.

This realization basically can clearly reflect our for problem domain, the correct understanding of our design intent reveals. Actually the abstract scale-up says is "is - a" relationship with said, was "like - a" relationship, everyone when the choice can be used as a basis, which, of course, is based on understanding the problem domain, for instance: if we think AlarmDoor in concept is essentially alarm, have again at the same time, then held the function of the above definition way will in turn.

Summary

1. Abstract scale-up in Java language suggests is a kind of inheriting relationship, a class can be used only once inheritance relationship. However, a class but can implement multiple with.

2 in the abstract scale-up may have their own data members, also can have the members of the abstract method, while in with, can have only static cannot be modified data members (i.e. must is static, immigration, but in with generally doesn't define data members), all the members of the methods is abstract.

3. With abstract scale-up and reflected the design concept of different. Actually the abstract scale-up says is "is - a" relationship with said, was "like - a" relationship.

4. Realize abstract classes and interface classes must realize, all of the method. Abstract classes may have not abstract methods. Interface cannot have realization method.

5. Interface definition of variable default is public, immigration, and static type to the initial value, so must realize class cannot be redefined, also can't change their values.

6. Class abstraction of variable default is cut type, the value that can be in subclasses redefined, ok also and new assignment.

7. Interface of the method are public default, abstract type.

Conclusion

Abstract class and with is Java language of two kinds of definition non-abstract class way, there are a great similarities. But for their choice but again often reflects on issues in

the field of generalized read essence of understanding, to reflect the design intent is correct and reasonable, whether because they show the concept between different relation (although can realize the function demand). This is actually a kind of language of usage, like the reader friend can finely experience.

详细解析Java中抽象类和接口的区别

在Java语言中,abstract class和interface 是支持抽象类定义的两种机制。正是由于这两种机制的存在,才赋予了Java强大的面向对象能力。abstract class和interface 之间在对于抽象类定义的支持方面具有很大的相似性,甚至可以相互替换,因此很多开发者在进行抽象类定义时对于abstract class和interface的选择显得比较随意。其实,两者之间还是有很大的区别的,对于它们的选择甚至反映出对于问题领域本质的理解、对于设计意图的理解是否正确、合理。本文将对它们之间的区别进行一番剖析,试图给开发者提供一个在二者之间进行选择的依据。

理解抽象类

abstract class和interface在Java语言中都是用来进行抽象类(本文中的抽象类并非从abstract class翻译而来,它表示的是一个抽象体,而abstract class为Java语言中用于定义抽象类的一种方法,请读者注意区分)定义的,那么什么是抽象类,使用抽象类能为我们带来什么好处呢?

在面向对象的概念中,我们知道所有的对象都是通过类来描绘的,但是反过来却不是这样。并不是所有的类都是用来描绘对象的,如果一个类中没有包含足够的信息来描绘一个具体的对象,这样的类就是抽象类。抽象类往往用来表征我们在对问题领域进行分析、设计中得出的抽象概念,是对一系列看上去不同,但是本质上相同的具体概念的抽象。比如:如果我们进行一个图形编辑软件的开发,就会发现问题领域存在着圆、三角形这样一些具体概念,它们是不同的,但是它们又都属于形状这样一个概念,形状这个概念在问题领域是不存在的,它就是一个抽象概念。正是因为抽象的概念在问题领域没有对应的具体概念,所以用以表征抽象概念的抽象类是不能够实例化的。

在面向对象领域,抽象类主要用来进行类型隐藏。我们可以构造出一个固定的一组行为的抽象描述,但是这组行为却能够有任意个可能的具体实现方式。这个抽象描述就是抽象类,而这一组任意个可能的具体实现则表现为所有可能的派生类。模块可以操作一个抽象体。由于模块依赖于一个固定的抽象体,因此它可以是不允许修改的;同时,通过从这个抽象体派生,也可扩展此模块的行为功能。熟悉OCP的读者一定知

道,为了能够实现面向对象设计的一个最核心的原则OCP(Open-Closed Principle),抽象类是其中的关键所在。

从语法定义层面看abstract class和interface

在语法层面,Java语言对于abstract class和interface给出了不同的定义方式,下面以定义一个名为Demo的抽象类为例来说明这种不同。

在abstract class方式中,Demo可以有自己的数据成员,也可以有非 abstract 的成员方法,而在interface方式的实现中,Demo只能够有静态的不能被修改的数据成员,所有的成员方法都是abstract的。从某种意义上说,interface是一种特殊形式的abstract class。

从编程的角度来看,abstract class和interface都可以用来实现"design by contract" 的思想。但是在具体的使用上面还是有一些区别的。

首先,abstract class 在Java 语言中表示的是一种继承关系,一个类只能使用一次继承关系(因为Java不支持多继承 -- 转注)。但是,一个类却可以实现多个interface。也许,这是Java语言的设计者在考虑Java对于多重继承的支持方面的一种折中考虑吧。

其次,在abstract class的定义中,我们可以赋予方法的默认行为。但是在interface 的定义中,方法却不能拥有默认行为,为了绕过这个限制,必须使用委托,但是这会增加一些复杂性,有时会造成很大的麻烦。

在抽象类中不能定义默认行为还存在另一个比较严重的问题,那就是可能会造成维护上的麻烦。因为如果后来想修改类的界面(一般通过abstract class或interface 来表示)以适应新的情况(比如,添加新的方法或者给已用的方法中添加新的参数)时,就会非常的麻烦,可能要花费很多的时间(对于派生类很多的情况,尤为如此)。但是如果界面是通过abstract class来实现的,那么可能就只需要修改定义在abstract class中的默认行为就可以了。

同样,如果不能在抽象类中定义默认行为,就会导致同样的方法实现出现在该抽象类的每一个派生类中,违反了"one rule,one place" 原则,造成代码重复,同样不利于以后的维护。因此,在abstract class和interface间进行选择时要非常的小心。从设计理念层面看abstract class和interface

上面主要从语法定义和编程的角度论述了abstract class和interface的区别,这些层面的区别是比较低层次的、非本质的。本小节将从另一个层面:abstract class和interface所反映出的设计理念,来分析一下二者的区别。作者认为,从这个层面进行分析才能理解二者概念的本质所在。

前面已经提到过,abstract class在Java语言中体现了一种继承关系,要想使得继承关系合理,父类和派生类之间必须存在"is-a"关系,即父类和派生类在概念本质上应该是相同的。对于interface来说则不然,并不要求interface的实现者和interface 定义在概念本质上是一致的,仅仅是实现了interface定义的契约而已。为了使论述便于理解,下面将通过一个简单的实例进行说明。

考虑这样一个例子,假设在我们的问题领域中有一个关于Door的抽象概念,该Door具有执行两个动作open和close,此时我们可以通过abstract class或者interface 来定义一个表示该抽象概念的类型。

其他具体的Door类型可以extends使用abstract class方式定义的Door或者implements使用interface方式定义的Door。看起来好像使用abstract class和interface 没有大的区别。

如果现在要求Door还要具有报警的功能。我们该如何设计针对该例子的类结构呢(在本例中,主要是为了展示abstract class和interface反映在设计理念上的区别,其他方面无关的问题都做了简化或者忽略)?下面将罗列出可能的解决方案,并从设计理念层面对这些不同的方案进行分析。

这种方法违反了面向对象设计中的一个核心原则ISP(Interface Segregation Principle),在Door的定义中把Door概念本身固有的行为方法和另外一个概念"报警器"的行为方法混在了一起。这样引起的一个问题是那些仅仅依赖于Door这个概念的模块会因为"报警器"这个概念的改变(比如:修改alarm方法的参数)而改变,反之依然。

既然open、close和alarm属于两个不同的概念,根据ISP原则应该把它们分别定义在代表这两个概念的抽象类中。定义方式有:这两个概念都使用abstract class方式定义;两个概念都使用interface方式定义;一个概念使用abstract class方式定义,另一个概念使用interface方式定义。

显然,由于Java语言不支持多重继承,所以两个概念都使用abstract class方式定义是不可行的。后面两种方式都是可行的,但是对于它们的选择却反映出对于问题领域中的概念本质的理解、对于设计意图的反映是否正确、合理。我们一一来分析、说明。

如果两个概念都使用interface方式来定义,那么就反映出两个问题:1、我们可能没有理解清楚问题领域,AlarmDoor在概念本质上到底是Door还是报警器?2、如果我们对于问题领域的理解没有问题,比如:我们通过对于问题领域的分析发现AlarmDoor在概念本质上和Door是一致的,那么我们在实现时就没有能够正确的揭示我们的设计意图,因为在这两个概念的定义上(均使用interface方式定义)反映不出上述含义。

如果我们对于问题领域的理解是:AlarmDoor在概念本质上是Door,同时它有具有报警的功能。我们该如何来设计、实现来明确的反映出我们的意思呢?前面已经说过,abstract class在Java语言中表示一种继承关系,而继承关系在本质上是"is-a"关系。所以对于Door这个概念,我们应该使用abstract class方式来定义。另外,AlarmDoor 又具有报警功能,说明它又能够完成报警概念中定义的行为,所以报警概念可以通过interface方式定义。

这种实现方式基本上能够明确的反映出我们对于问题领域的理解,正确的揭示我们的设计意图。其实abstract class表示的是"is-a"关系,interface表示的是"like-a"关系,大家在选择时可以作为一个依据,当然这是建立在对问题领域的理解上的,比如:如果我们认为AlarmDoor在概念本质上是报警器,同时又具有Door的功能,那么上述的定义方式就要反过来了。

小结

1.abstract class在Java语言中表示的是一种继承关系,一个类只能使用一次继承关

系。但是,一个类却可以实现多个interface。

2.在abstract class中可以有自己的数据成员,也可以有非abstract的成员方法,而在

interface中,只能够有静态的不能被修改的数据成员(也就是必须是static final 的,不过在interface中一般不定义数据成员),所有的成员方法都是abstract的。

3.abstract class和interface所反映出的设计理念不同。其实abstract class表示的是

"is-a"关系,interface表示的是"like-a"关系。

4.实现抽象类和接口的类必须实现其中的所有方法。抽象类中可以有非抽象方法。

接口中则不能有实现方法。

5.接口中定义的变量默认是public static final型,且必须给其初值,所以实现类中不

能重新定义,也不能改变其值。

6.抽象类中的变量默认是friendly型,其值可以在子类中重新定义,也可以重新赋

值。

7.接口中的方法默认都是public abstract类型的。

结论

abstract class和i nterface是Java语言中的两种定义抽象类的方式,它们之间有很大的相似性。但是对于它们的选择却又往往反映出对于问题领域中的概念本质的理解、对于设计意图的反映是否正确、合理,因为它们表现了概念间的不同的关系(虽然都能够实现需求的功能)。这其实也是语言的一种的惯用法,希望读者朋友能够细细体会。

毕业设计外文翻译资料

外文出处: 《Exploiting Software How to Break Code》By Greg Hoglund, Gary McGraw Publisher : Addison Wesley Pub Date : February 17, 2004 ISBN : 0-201-78695-8 译文标题: JDBC接口技术 译文: JDBC是一种可用于执行SQL语句的JavaAPI(ApplicationProgrammingInterface应用程序设计接口)。它由一些Java语言编写的类和界面组成。JDBC为数据库应用开发人员、数据库前台工具开发人员提供了一种标准的应用程序设计接口,使开发人员可以用纯Java语言编写完整的数据库应用程序。 一、ODBC到JDBC的发展历程 说到JDBC,很容易让人联想到另一个十分熟悉的字眼“ODBC”。它们之间有没有联系呢?如果有,那么它们之间又是怎样的关系呢? ODBC是OpenDatabaseConnectivity的英文简写。它是一种用来在相关或不相关的数据库管理系统(DBMS)中存取数据的,用C语言实现的,标准应用程序数据接口。通过ODBCAPI,应用程序可以存取保存在多种不同数据库管理系统(DBMS)中的数据,而不论每个DBMS使用了何种数据存储格式和编程接口。 1.ODBC的结构模型 ODBC的结构包括四个主要部分:应用程序接口、驱动器管理器、数据库驱动器和数据源。应用程序接口:屏蔽不同的ODBC数据库驱动器之间函数调用的差别,为用户提供统一的SQL编程接口。 驱动器管理器:为应用程序装载数据库驱动器。 数据库驱动器:实现ODBC的函数调用,提供对特定数据源的SQL请求。如果需要,数据库驱动器将修改应用程序的请求,使得请求符合相关的DBMS所支持的文法。 数据源:由用户想要存取的数据以及与它相关的操作系统、DBMS和用于访问DBMS的网络平台组成。 虽然ODBC驱动器管理器的主要目的是加载数据库驱动器,以便ODBC函数调用,但是数据库驱动器本身也执行ODBC函数调用,并与数据库相互配合。因此当应用系统发出调用与数据源进行连接时,数据库驱动器能管理通信协议。当建立起与数据源的连接时,数据库驱动器便能处理应用系统向DBMS发出的请求,对分析或发自数据源的设计进行必要的翻译,并将结果返回给应用系统。 2.JDBC的诞生 自从Java语言于1995年5月正式公布以来,Java风靡全球。出现大量的用java语言编写的程序,其中也包括数据库应用程序。由于没有一个Java语言的API,编程人员不得不在Java程序中加入C语言的ODBC函数调用。这就使很多Java的优秀特性无法充分发挥,比如平台无关性、面向对象特性等。随着越来越多的编程人员对Java语言的日益喜爱,越来越多的公司在Java程序开发上投入的精力日益增加,对java语言接口的访问数据库的API 的要求越来越强烈。也由于ODBC的有其不足之处,比如它并不容易使用,没有面向对象的特性等等,SUN公司决定开发一Java语言为接口的数据库应用程序开发接口。在JDK1.x 版本中,JDBC只是一个可选部件,到了JDK1.1公布时,SQL类包(也就是JDBCAPI)

毕设外文资料翻译.

理工学院 毕业设计外文资料翻译 专业:计算机科学与技术 姓名:马艳丽 学号: 12L0752218 外文出处:The Design and Implementation of 3D Electronic Map of Campus Based on WEBGIS 附件: 1.外文资料翻译译文;2.外文原文。

附件1:外文资料翻译译文 基于WebGIS的校园三维电子地图的设计与实现 一.导言 如今,数字化和信息化是当今时代的主题。随着信息革命和计算机科学的发展,计算机技术已经渗透到科学的各个领域,并引起了许多革命性的变化,在这些科目,古代制图学也不例外。随着技术和文化的不断进步,地图变化的形式和内容也随之更新。在计算机图形学中,地理信息系统(GIS)不断应用到Web,制作和演示的传统方式经历了巨大的变化,由于先进的信息技术的发展,地图的应用已经大大延长。在这些情况下,绘图将面临广阔的发展前景。电子地图是随之应运而生的产品之一。随着计算机技术,计算机图形学理论,遥感技术,航空摄影测量技术和其他相关技术的飞速发展。用户需要的三维可视化,动态的交互性和展示自己的各种地理相关的数据处理和分析,如此多的关注应支付的研究三维地图。东北石油大学及其周边地区的基础上本文设计并建立三维电子地图。 二.系统设计 基于WebGIS的校园三维电子地图系统的具有普通地图的一般特性。通过按键盘上的箭头键(上,下,左,右),可以使地图向相应的方向移动。通过拖动鼠标,可以查看感兴趣的任何一个地方。使用鼠标滚轮,可以控制地图的大小,根据用户的需求来查看不同缩放级别的地图。在地图的左下角会显示当前鼠标的坐标。在一个div层,我们描绘了一个新建筑物的热点,这层可以根据不同的地图图层的显示,它也可以自动调整。通过点击热点,它可以显示热点的具体信息。也可以输入到查询的信息,根据自己的需要,并得到一些相关的信息。此外,通过点击鼠标,人们可以选择检查的三维地图和卫星地图。 主要功能包括: ?用户信息管理:检查用户名和密码,根据权限设置级别的认证,允许不同权限的用户通过互联网登录系统。 ?位置信息查询:系统可以为用户提供模糊查询和快速定位。

外文翻译java

外文资料译文及原文 Java Java I/O 系统 对编程语言的设计者来说,创建一套好的输入输出(I/O)系统,是一项难度极高的任务。 这一点可以从解决方案的数量之多上看出端倪。这个问题难就难在它要面对的可能性太多了。不仅是因为有那么多I/O的源和目地(文件,控制台,网络连接等等),而且还有很多方法(顺序的『sequential』,随机的『random-access』,缓存的『buffered』,二进制的『binary』,字符方式的『character』,行的『by lines』,字的『by words』,等等)。 Java类库的设计者们用"创建很多类"的办法来解决这个问题。坦率地说Java I/O系统的类实在是太多了,以至于初看起来会把人吓着(但是,具有讽刺意味的是,这种设计实际上是限制了类的爆炸性增长)。此外,Java在1.0版之后又对其I/O类库作了重大的修改,原先是面向byte的,现在又补充了面向Unicode字符的类库。为了提高性能,完善功能,JDK 1.4又加了一个nio(意思是"new I/O"。这个名字会用上很多年)。这么以来,如果你想对Java的I/O 类库有个全面了解,并且做到运用自如,你就得先学习大量的类。此外,了解 I/O类库的演化的历史也是相当重要的。可能你的第一反应是"别拿什么历史来烦我了,告诉我怎么用就可以了!"但问题是,如果你对这段历史一无所知,很快就会被一些有用或是没用的类给搞糊涂了。

本章会介绍Java标准类库中的各种I/O类,及其使用方法。 File 类 在介绍直接从流里读写数据的类之前,我们先介绍一下处理文件和目录的类。 File类有一个极具欺骗性的名字;或许你会认为这是一个关于文件的类,但它不是。你可以用它来表示某个文件的名字,也可以用它来表示目录里一组文件的名字。如果它表示的是一组文件,那么你还可以用list( )方法来进行查询,让它会返回String数组。由于元素数量是固定的,因此数组会比容器更好一些。如果你想要获取另一个目录的清单,再建一个File对象就是了。实际上,叫它"FilePath"可能会更好一些。下面我们举例说明怎样使用这个类及其相关的FilenameFilter接口。 目录列表器 假设你想看看这个目录。有两个办法。一是不带参数调用list( )。它返回的是File对象所含内容的完整清单。但是,如果你要的是一个"限制性列表(restricted list)"的话——比方说,你想看看所有扩展名为.java的文件——那么你就得使用"目录过滤器"了。这是一个专门负责挑选显示File对象的内容的类。 下面就是源代码。看看,用了java.utils.Arrays.sort( )和11章的AlphabeticComparator之后,我们没费吹灰之力就对结果作了排序(按字母顺序): //: c12:DirList.java // Displays directory listing using regular expressions. // {Args: "D.*\.java"} import java.io.*; import java.util.*; import java.util.regex.*; import com.bruceeckel.util.*; public class DirList { public static void main(String[] args) { File path = new File("."); String[] list; if(args.length == 0) list = path.list(); else list = path.list(new DirFilter(args[0])); Arrays.sort(list, new AlphabeticComparator());

汽车专业毕业设计外文翻译

On the vehicle sideslip angle estimation through neural networks: Numerical and experimental results. S. Melzi,E. Sabbioni Mechanical Systems and Signal Processing 25 (2011):14~28 电脑估计车辆侧滑角的数值和实验结果 S.梅尔兹,E.赛博毕宁 机械系统和信号处理2011年第25期:14~28

摘要 将稳定控制系统应用于差动制动内/外轮胎是现在对客车车辆的标准(电子稳定系统ESP、直接偏航力矩控制DYC)。这些系统假设将两个偏航率(通常是衡量板)和侧滑角作为控制变量。不幸的是后者的具体数值只有通过非常昂贵却不适合用于普通车辆的设备才可以实现直接被测量,因此只能估计其数值。几个州的观察家最终将适应参数的参考车辆模型作为开发的目的。然而侧滑角的估计还是一个悬而未决的问题。为了避免有关参考模型参数识别/适应的问题,本文提出了分层神经网络方法估算侧滑角。横向加速度、偏航角速率、速度和引导角,都可以作为普通传感器的输入值。人脑中的神经网络的设计和定义的策略构成训练集通过数值模拟与七分布式光纤传感器的车辆模型都已经获得了。在各种路面上神经网络性能和稳定已经通过处理实验数据获得和相应的车辆和提到几个处理演习(一步引导、电源、双车道变化等)得以证实。结果通常显示估计和测量的侧滑角之间有良好的一致性。 1 介绍 稳定控制系统可以防止车辆的旋转和漂移。实际上,在轮胎和道路之间的物理极限的附着力下驾驶汽车是一个极其困难的任务。通常大部分司机不能处理这种情况和失去控制的车辆。最近,为了提高车辆安全,稳定控制系统(ESP[1,2]; DYC[3,4])介绍了通过将差动制动/驱动扭矩应用到内/外轮胎来试图控制偏航力矩的方法。 横摆力矩控制系统(DYC)是基于偏航角速率反馈进行控制的。在这种情况下,控制系统使车辆处于由司机转向输入和车辆速度控制的期望的偏航率[3,4]。然而为了确保稳定,防止特别是在低摩擦路面上的车辆侧滑角变得太大是必要的[1,2]。事实上由于非线性回旋力和轮胎滑移角之间的关系,转向角的变化几乎不改变偏航力矩。因此两个偏航率和侧滑角的实现需要一个有效的稳定控制系统[1,2]。不幸的是,能直接测量的侧滑角只能用特殊设备(光学传感器或GPS惯性传感器的组合),现在这种设备非常昂贵,不适合在普通汽车上实现。因此, 必须在实时测量的基础上进行侧滑角估计,具体是测量横向/纵向加速度、角速度、引导角度和车轮角速度来估计车辆速度。 在主要是基于状态观测器/卡尔曼滤波器(5、6)的文学资料里, 提出了几个侧滑角估计策略。因为国家观察员都基于一个参考车辆模型,他们只有准确已知模型参数的情况下,才可以提供一个令人满意的估计。根据这种观点,轮胎特性尤其关键取决于附着条件、温度、磨损等特点。 轮胎转弯刚度的提出就是为了克服这些困难,适应观察员能够提供一个同步估计的侧滑角和附着条件[7,8]。这种方法的弊端是一个更复杂的布局的估计量导致需要很高的计算工作量。 另一种方法可由代表神经网络由于其承受能力模型非线性系统,这样不需要一个参

软件开发概念和设计方法大学毕业论文外文文献翻译及原文

毕业设计(论文)外文文献翻译 文献、资料中文题目:软件开发概念和设计方法文献、资料英文题目: 文献、资料来源: 文献、资料发表(出版)日期: 院(部): 专业: 班级: 姓名: 学号: 指导教师: 翻译日期: 2017.02.14

外文资料原文 Software Development Concepts and Design Methodologies During the 1960s, ma inframes and higher level programming languages were applied to man y problems including human resource s yste ms,reservation s yste ms, and manufacturing s yste ms. Computers and software were seen as the cure all for man y bu siness issues were some times applied blindly. S yste ms sometimes failed to solve the problem for which the y were designed for man y reasons including: ?Inability to sufficiently understand complex problems ?Not sufficiently taking into account end-u ser needs, the organizational environ ment, and performance tradeoffs ?Inability to accurately estimate development time and operational costs ?Lack of framework for consistent and regular customer communications At this time, the concept of structured programming, top-down design, stepwise refinement,and modularity e merged. Structured programming is still the most dominant approach to software engineering and is still evo lving. These failures led to the concept of "software engineering" based upon the idea that an engineering-like discipl ine could be applied to software design and develop ment. Software design is a process where the software designer applies techniques and principles to produce a conceptual model that de scribes and defines a solution to a problem. In the beginning, this des ign process has not been well structured and the model does not alwa ys accurately represent the problem of software development. However,design methodologies have been evolving to accommo date changes in technolog y coupled with our increased understanding of development processes. Whereas early desig n methods addressed specific aspects of the

JAVA外文文献+翻译

Java and the Internet If Java is, in fact, yet another computer programming language, you may question why it is so important and why it is being promoted as a revolutionary step in computer programming. The answer isn’t immediately obvious if you’re coming from a traditional programming perspective. Although Java is very useful for solving traditional stand-alone programming problems, it is also important because it will solve programming problems on the World Wide Web. 1.Client-side programming The Web’s in itial server-browser design provided for interactive content, but the interactivity was completely provided by the server. The server produced static pages for the client browser, which would simply interpret and display them. Basic HTML contains simple mechanisms for data gathering: text-entry boxes, check boxes, radio boxes, lists and drop-down lists, as well as a button that can only be programmed to reset the data on the form or “submit” the data on the form back to the server. This submission passes through the Common Gateway Interface (CGI) provided on all Web servers. The text within the submission tells CGI what to do with it. The most common action is to run a program located on the server in a directory that’s typically called “cgi-bin.” (If you watch the address window at the top of your browser when you push a button on a Web page, you can sometimes see “cgi-bin” within all the gobbledygook there.) These programs can be written in most languages. Perl is a common choice because it is designed for text manipulation and is interpreted, so it can be installed on any server regardless of processor or operating system. Many powerful Web sites today are built strictly on CGI, and you can in fact do nearly anything with it. However, Web sites built on CGI programs can rapidly become overly complicated to maintain, and there is also the problem of response time. The response of a CGI program depends on how much data must

设计类外文翻译

设计类外文翻译

贯穿绿色工程的12原则 近年来,许多报纸、书籍、和会议的主题围绕出资行星上的负面影响,人类在其能力来维系生命。常,这些讨论,具体目标也应运而生,如,最大限度地减少浪费,接近可持续发展。目标语句可以提供非常有用的一个视觉所需要的实现,而且多数的这些dis-cussions的重要组成部分,有助于视力。然而,目标是当他们成为reali-ty才生效。方法正在研制达到这些目标跨学门、工业、和部门。很明显,然而,这些方法目前既不系统也不全面。 绿色工程(11)着重论述如何通过科学和技术能否实现可持续发展(12 - 14)。12原则的绿色工程(参见页),提供了一个框架下对科学家和en-gineers从事在设计新材料、产品、过程和系统,是“良性”tohuman健康和环境。一个设计基于12原则行走基线工程质量和安全规格以considerenvironmental、经济、社会因素的影响。宽的适用性的原则是重要的。当处理设计建筑,不管它是toconstruct化合物分子结构要求、产品体系结构,以创造一个汽车、城市新建筑的建

造一个city-the相同的绿色工程原则必须适用、有效和适当的。否则,这些不会原则,而是一个列表的use-ful技术,已经成功地demon-strated特定条件下。在这篇文章中,我们说明这些原则可以应用在一系列的鳞片。也适用于查看12原则para-meters在一个复杂的、完整的体系。就像每一个参数优化系统不能在任何一个时间,特别是当他们在interdepen-dent,也是同样的道理这些原则。有一些案例表明,协同的成功应用的一个最重要的原则提出了一个或更多的其他人。在其他情况下,一个平衡的原则将再保险——quired优化系统整体解决方案。然而,也有一些两个基本概念,de-signers应该努力整合在每opportuni-ty:生命周期的考虑和第一的原则,inherency的绿色工程。 生命周期和inherency 材料和能量的生命周期阶段进入每一个每一件产品和过程有他们自己的生活周期。如果一个产品是有益于环保但是由危险废物或不可再生物质,其im-pacts基本上已被转移到另一边的整体生活周期。例如,如果一个产品或过程具有高效节能甚至能源发电(例如,pho-tovoltaics),但生产

本科毕业设计方案外文翻译范本

I / 11 本科毕业设计外文翻译 <2018届) 论文题目基于WEB 的J2EE 的信息系统的方法研究 作者姓名[单击此处输入姓名] 指导教师[单击此处输入姓名] 学科(专业 > 所在学院计算机科学与技术学院 提交日期[时间 ]

基于WEB的J2EE的信息系统的方法研究 摘要:本文介绍基于工程的Java开发框架背后的概念,并介绍它如何用于IT 工程开发。因为有许多相同设计和开发工作在不同的方式下重复,而且并不总是符合最佳实践,所以许多开发框架建立了。我们已经定义了共同关注的问题和应用模式,代表有效解决办法的工具。开发框架提供:<1)从用户界面到数据集成的应用程序开发堆栈;<2)一个架构,基本环境及他们的相关技术,这些技术用来使用其他一些框架。架构定义了一个开发方法,其目的是协助客户开发工程。 关键词:J2EE 框架WEB开发 一、引言 软件工具包用来进行复杂的空间动态系统的非线性分析越来越多地使用基于Web的网络平台,以实现他们的用户界面,科学分析,分布仿真结果和科学家之间的信息交流。对于许多应用系统基于Web访问的非线性分析模拟软件成为一个重要组成部分。网络硬件和软件方面的密集技术变革[1]提供了比过去更多的自由选择机会[2]。因此,WEB平台的合理选择和发展对整个地区的非线性分析及其众多的应用程序具有越来越重要的意义。现阶段的WEB发展的特点是出现了大量的开源框架。框架将Web开发提到一个更高的水平,使基本功能的重复使用成为可能和从而提高了开发的生产力。 在某些情况下,开源框架没有提供常见问题的一个解决方案。出于这个原因,开发在开源框架的基础上建立自己的工程发展框架。本文旨在描述是一个基于Java的框架,该框架利用了开源框架并有助于开发基于Web的应用。通过分析现有的开源框架,本文提出了新的架构,基本环境及他们用来提高和利用其他一些框架的相关技术。架构定义了自己开发方法,其目的是协助客户开发和事例工程。 应用程序设计应该关注在工程中的重复利用。即使有独特的功能要求,也

毕业设计外文翻译

毕业设计(论文) 外文翻译 题目西安市水源工程中的 水电站设计 专业水利水电工程 班级 学生 指导教师 2016年

研究钢弧形闸门的动态稳定性 牛志国 河海大学水利水电工程学院,中国南京,邮编210098 nzg_197901@https://www.360docs.net/doc/543023462.html,,niuzhiguo@https://www.360docs.net/doc/543023462.html, 李同春 河海大学水利水电工程学院,中国南京,邮编210098 ltchhu@https://www.360docs.net/doc/543023462.html, 摘要 由于钢弧形闸门的结构特征和弹力,调查对参数共振的弧形闸门的臂一直是研究领域的热点话题弧形弧形闸门的动力稳定性。在这个论文中,简化空间框架作为分析模型,根据弹性体薄壁结构的扰动方程和梁单元模型和薄壁结构的梁单元模型,动态不稳定区域的弧形闸门可以通过有限元的方法,应用有限元的方法计算动态不稳定性的主要区域的弧形弧形闸门工作。此外,结合物理和数值模型,对识别新方法的参数共振钢弧形闸门提出了调查,本文不仅是重要的改进弧形闸门的参数振动的计算方法,但也为进一步研究弧形弧形闸门结构的动态稳定性打下了坚实的基础。 简介 低举升力,没有门槽,好流型,和操作方便等优点,使钢弧形闸门已经广泛应用于水工建筑物。弧形闸门的结构特点是液压完全作用于弧形闸门,通过门叶和主大梁,所以弧形闸门臂是主要的组件确保弧形闸门安全操作。如果周期性轴向载荷作用于手臂,手臂的不稳定是在一定条件下可能发生。调查指出:在弧形闸门的20次事故中,除了极特殊的破坏情况下,弧形闸门的破坏的原因是弧形闸门臂的不稳定;此外,明显的动态作用下发生破坏。例如:张山闸,位于中国的江苏省,包括36个弧形闸门。当一个弧形闸门打开放水时,门被破坏了,而其他弧形闸门则关闭,受到静态静水压力仍然是一样的,很明显,一个动态的加载是造成的弧形闸门破坏一个主要因素。因此弧形闸门臂的动态不稳定是造成弧形闸门(特别是低水头的弧形闸门)破坏的主要原是毫无疑问。

JAVA外文文献翻译基于Java技术的Web应用设计模型的比较研究

中文翻译 基于Java技术的Web应用设计模型的比较研究 来源:School of Computer Science and Engineering University of New South Wales Sydney, NSW 2052, Australia 作者:Budi Kurniawan and Jingling Xue 摘要 Servlet技术是在建立可扩展性Web应用中被应用最广泛的技术。在运用JAVA技术开发Web应用中有四种模型,分别是:Model 1、Model 2、Struts和JavaServer Faces JSF。Model 1使用一连串的JSP页面,Model 2采用了模型,视图,控制器MVC模式。Struts是一个采用了Model 2设计模型的框架,JSF是一种支持ready-to-use组件来进行快速Web应用开发的新技术。Model 1对于中等和大型的应用来说很难维护,所以不推荐使用。本文通过利用Model 2、Struts和JSF这三种模型分别构建三个不同版本的在线商店应用程序来比较和评价这三种模型在应用程序开发和性能上的差异。 1.绪论 当今Web应用是一种展现动态内容的最普遍的方式。构建Web应用有许多种方法,其中最流行的是Servlet技术。这种技术的流行是因为它比CGI、PHP等其他技术更具优越性。然而Servlet对于开发来说还是麻烦的,因为它在传送HTML 标签时需要程序员将他们组合成为一个字符串对象,再将这个对象传给浏览器。同样的,对于输出的一个很小的改动也要求Servlet被重新编译。基于这个原因SUN 公司发明了JavaServer Pages JSP技术。JSP允许HTML标签和Java代码混合在

设计类外文翻译

贯穿绿色工程的原则 近年来,许多报纸、书籍、和会议的主题围绕出资行星上的负面影响,人类在其能力来维系生命。常,这些讨论,具体目标也应运而生,如,最大限度地减少浪费,接近可持续发展。目标语句可以提供非常有用的一个视觉所需要的实现,而且多数的这些的重要组成部分,有助于视力。然而,目标是当他们成为才生效。方法正在研制达到这些目标跨学门、工业、和部门。很明显,然而,这些方法目前既不系统也不全面。 绿色工程()着重论述如何通过科学和技术能否实现可持续发展( )。原则的绿色工程(参见页),提供了一个框架下对科学家和从事在设计新材料、产品、过程和系统,是“良性”健康和环境。一个设计基于原则行走基线工程质量和安全规格以、经济、社会因素的影响。宽的适用性的原则是重要的。当处理设计建筑,不管它是化合物分子结构要求、产品体系结构,以创造一个汽车、城市新建筑的建造一个相同的绿色工程原则必须适用、有效和适当的。否则,这些不会原则,而是一个列表的技术,已经成功地特定条件下。在这篇文章中,我们说明这些原则可以应用在一系列的鳞片。也适用于查看原则在一个复杂的、完整的体系。就像每一个参数优化系统不能在任何一个时间,特别是当他们在,也是同样的道理这些原则。有一些案例表明,协同的成功应用的一个最重要的原则提出了一个或更多的其他人。在其他情况下,一个平衡的原则将再保险——优化系统整体解决方案。然而,也有一些两个基本概念应该努力整合在每:生命周期的考虑和第一的原则的绿色工程。 生命周期和 材料和能量的生命周期阶段进入每一个每一件产品和过程有他们自己的生活周期。如果一个产品是有益于环保但是由危险废物或不可再生物质,其基本上已被转移到另一边的整体生活周期。例如,如果一个产品或过程具有高效节能甚至能源发电(例如),但生产过程中影响程度抵消任何能量的收获,没有樊笼可持续发展优势。因此应该考虑的整个生命周期,包括物料及能源的投入。生命周期的物料及能源开始采集(例如,挖掘、钻孔、收获),然后移动整个制造,分销,使用,和结束的生命。这是必须考虑所有的申请时,是需要绿色工程的原则。这一策略的选择进行了补充,更能减低我们固有的良性输入在生命周期阶段的环境影响。使产品、过程和系统更有益于环保一般情况下遵循的两个基本方法:变化的内在属性的系统或改变的情况下条件时才能被感觉到的制度。虽然可能固有的毒性,降低;一个有条件的一种化学物质,包括控制变化的,以及是否接触,有毒化学物质。者优先,原因也是多方面的,最重要的是,以避免“失败”。依靠控制系统环境,如空气净化器或废水的处理,有一个潜在的失败,这可能导致重大危险到人健康和自然系统。然而,随着更多的良性设计,无论在条件或情况下,变化的本质系统不能失败。 在这些情况下,该系统的固有属性是预先定义的,因此,它经常是很必要的,通过提高系统的变化情况和条件。虽然技术和经济因素的影响,往往可以排除通过系统设计具有更多的固有的良性、渐进性的变革在这种情况下,可以有很重大的影响,整个系统。选择一个之间的个人设计在最有益于环保和可持续的方式与设计了一个汽油发动的运动型多用途车是最能符合可持续发展。原则提供了一个绿色工程结构制造出和评估这些设计元素相关的最大限度的可持续发展。工程师可以使用这些原则为指导,以帮助确保设计的产品、过程或系统有基本的元件,条件,和被需要更稳定。 原则 虽然带来的负面影响的固有的有害物质(无论是毒理、乃至全球)可能会降到最低,这是

本科毕业设计外文翻译

Section 3 Design philosophy, design method and earth pressures 3.1 Design philosophy 3.1.1 General The design of earth retaining structures requires consideration of the interaction between the ground and the structure. It requires the performance of two sets of calculations: 1)a set of equilibrium calculations to determine the overall proportions and the geometry of the structure necessary to achieve equilibrium under the relevant earth pressures and forces; 2)structural design calculations to determine the size and properties of thestructural sections necessary to resist the bending moments and shear forces determined from the equilibrium calculations. Both sets of calculations are carried out for specific design situations (see 3.2.2) in accordance with the principles of limit state design. The selected design situations should be sufficiently Severe and varied so as to encompass all reasonable conditions which can be foreseen during the period of construction and the life of the retaining wall. 3.1.2 Limit state design This code of practice adopts the philosophy of limit state design. This philosophy does not impose upon the designer any special requirements as to the manner in which the safety and stability of the retaining wall may be achieved, whether by overall factors of safety, or partial factors of safety, or by other measures. Limit states (see 1.3.13) are classified into: a) ultimate limit states (see 3.1.3); b) serviceability limit states (see 3.1.4). Typical ultimate limit states are depicted in figure 3. Rupture states which are reached before collapse occurs are, for simplicity, also classified and

毕设外文文献翻译

xxxxxxxxx 毕业设计(论文)外文文献翻译 (本科学生用) 题目:Poduct Line Engineering: The State of the Practice 生产线工程:实践的形态 学生姓名:学号: 学部(系): 专业年级: 指导教师:职称或学位: 2011年3月10日

外文文献翻译(译成中文1000字左右): 【主要阅读文献不少于5篇,译文后附注文献信息,包括:作者、书名(或论文题目)、出版社(或刊物名称)、出版时间(或刊号)、页码。提供所译外文资料附件(印刷类含封面、封底、目录、翻译部分的复印件等,网站类的请附网址及原文】 Requirements engineering practices A precise requirements engineering process— a main driver for successful software development —is even more important for product line engineering. Usually, the product line’s scope addresses various domains simultaneously. This makes requirements engineering more complex. Furthermore, SPL development involves more tasks than single-product development. Many product line requirements are complex, interlinked, and divided into common and product-specific requirements. So, several requirements engineering practices are important specifically in SPL development: ? Domain identification and modeling, as well as commonalities and variations across product instances Separate specification and verification for platform and product requirements ? Management of integrating future requirements into the platform and products ? Identification, modeling, and management of requirement dependencies The first two practices are specific to SPL engineering. The latter two are common to software development but have much higher importance for SPLs. Issues with performing these additional activities can severely affect the product line’s long-term success. During the investigation, we found that most organizations today apply organizational and procedural measures to master these challenges. The applicability of more formal requirements engineering techniques and tools appeared rather limited, partly because such techniques are not yet designed to cope with product line evelopment’s inherent complexities. The investigation determined that the following three SPL requirements engineering practices were most important to SPL success. Domain analysis and domain description. Before starting SPL development, organizations should perform a thorough domain analysis. A well-understood domain is a prerequisite for defining a suitable scope for the product line. It’s the foundation for efficiently identifying and distinguishing platform and product requirements. Among the five participants in our investigation, three explicitly modeled the product line requirements. The others used experienced architects and domain experts to develop the SPL core assets without extensive requirements elicitation. Two organizations from the first group established a continuous requirements management that maintained links between product line and product instance requirements. The three other organizations managed their core assets’ evolution using change management procedures and versioning concepts. Their business did not force them to maintain more detailed links between the requirements on core assets and product instances. The impact of architectural decisions on requirements negotiations. A stable but flexible architecture is important for SPL development. However, focusing SPL evolution too much on architectural issues will lead to shallow or even incorrect specifications. It can cause core assets to ignore important SPL requirements so that the core assets lose relevance for SPL development. Organizations can avoid this problem by establishing clear responsibilities for requirements management in addition to architectural roles. The work group participants reported that a suitable organizational tool for balancing requirements and architecture is roundtable meetings in which requirements engineers,

相关文档
最新文档