1、rtl70.bpl是什么?有什么用?
  
2、delphi的Package相对dll有什么优点?

3、以下的记录(结构)变量在内存占多少字节?: 36
   type
     a = packed record
      v1: Byte;
      v2: Word;
      v3: string[16];
      v4: Double;
      v5: string;
      v6: TForm;
     end;
var
  P: ^a;
procedure TForm1.Button1Click(Sender: TObject);
var
  arr:  string[16];
begin
  Edit1.Text := intToStr(sizeof(a));         //36
  Memo1.Lines.Add(intToStr(sizeof(Byte)));   //1
  Memo1.Lines.Add(intToStr(sizeof(Word)));   //2
  Memo1.Lines.Add(intToStr(sizeof(arr)));    //17
  Memo1.Lines.Add(intToStr(sizeof(Double))); //8
  Memo1.Lines.Add(intToStr(sizeof(string))); //4
  Memo1.Lines.Add(intToStr(sizeof(TForm)));  //4
  Memo1.Lines.Add(intToStr(sizeof(p^)));     //36
  Memo1.Lines.Add(intToStr(sizeof(p)));      //4

end;

4、以下的写法是否正确? right
   type
     a = object
       v1: Integer;
     end;
     b = object(a)
       v2: Integer;
     end;

5、以下的写法是否正确? right
   type
     a = class
       v1: Integer;
     end;
     b = class(a)
       v2: Integer;
     end;

类的声明
有两种声明办法

一、自定义类的父类delphi内建类

type 类名 = class(父类)

  成员表达式

end;

(1)保留字Class说明该类是dephi内建类,将继承父类的属性和方法

(2)“父类”默认是delphi的祖先类Tobject

二、完全自定义的类

Type 类名 = object(父类)

  成员表达式

End;

(1)       保留字object说明该类是完全自定义的类

(2)       自类也必须是完全自义的类

注意:用class自定义的类必须遵循delphi内建类的Tobject的特定的构造方法和析构方法,而用object自定义类的方法无此限制(内存管理方式),所以用第一种方法生成对象时必须调用Create构造函数,

第二种就不需要,可直接生成对象,它将做为一般变量,和记录(Record)变量相同,用到

时立即分配内存,用完时自动释放内存

 

自定义Delphi内建类的构造和析构

构造函数

Constructor Create(AOwner :Tcomponent) ;override ;

(1)可以根据实际情况改变参数信息(参数个类,类型,顺序,默认值)

(2)若要继承父类的构造函数,可添加inherited create;

析构函数

Destructor destroy ; override ;

(1)   若在自定类中添加了其它类,一定要记得释放这些对象

(2)   若要继承父类

(3)   值得注意的中destroy中删除对象的变量,即对象的参考,未真正删除对象实体,也就没有释放对象所占的内存,另外,若在没有调用create 的情况下,该对象参考的值为nil,这种情况下调用destroy,会产生错误

用Free可解决上面的问题(真正释放内存;在没有创建的对象的情况下调用Free也不会报错)

还有一个更实用的FreeAndNIl(对象),它不仅释放内存,而且将对象的参考(变量)赋nil值

完全自定义类的构造和析构

自定类也完全可以自己编码自己的构造和析构函数,为其分配内存、释放内存,不免要用到指针,是复杂度很高的工程,此时还是用的自定义的Class比较方便。


6、有一个文件有多行,每行的内容都是“姓名,手机号,固定电话”,现在要将这个文件内容按手机

号排序,请写出编程思路。

7、写出你常用的DELPHI第三方控件(包)名及其功能。

8、写出Win95,Win98,Win2000,WinXP的操作系统版本号及初始的IE版本号。

9、写出WebService的技术特征。 


Delphi软件工程师试题

姓名:               出生日期:               籍贯:        ID:   


1. 您为什么选择软件开发这个行业?(30字左右简写);

 

 

2.如果有您解决不了的软件问题您会采取什么样的解决措施;
 

 

 

 

3.a.请您写出Object Pascal所支持的数据类型;b.请您写出Shl、Shr、Xor、Not 的数学表示法;

The result of a not operation is of the same type as the operand.
 If the operands of an and, or, or xor operation are both integers, the result is of the predefined integer type with the smallest range that includes all possible values of both types.
 The operations x shl y and x shr y shift the value of x to the left or right by y bits, which is equivalent to multiplying or dividing x by 2^y; the result is of the same type as x. For example, if N stores the value 01101 (decimal 13), then N shl 1 returns 11010 (decimal 26). Note that the value of y is interpreted modulo the size of the type of x. Thus for example, if x is an integer, x shl 40 is interpreted as x shl 8 because an integer is 32 bits and 40 mod 32 is 8.
 4.请您写出VCL结构层次(以TObject开始,最少五层);

TObject
TPersistent
TComponent
TControl
TGraphControl,TWinControl
TScrollingWinControl
TCustomForm
TForm

 


5.请您写出一个参数是多维数组的function和调用方法;(在Delphi中写)
When you declare routines that take array parameters, you cannot include index type specifiers in the parameter declarations. That is, the declaration

procedure Sort(A: array[1..10] of Integer);   // syntax error

causes a compilation error. But

type TDigits = array[1..10] of Integer;

procedure Sort(A: TDigits);

 

 

 

 

 

6.在MSSQL2000或Oracle数据库中建立两个表如下表结构:

Prd_Item (产品项目表)
Prd_ID   Integer(整型) 主键(帐单ID)
Prd_ItemName Varchar(字符型, 长度30)(帐单名称)
Prd_ItemPrc  Float/Integer(12, 2)(浮点型) 单价
Prd_Date   Date(日期型)

Prd_Tab (产品项目帐单表)
Prd_ID   Integer(整型, 主键 帐单ID)
Prd_Itemid Integer(整型,明细ID)
Prd_ItemQTY  Float/Integer(12, 2)(浮点型 数量)
Prd_ItemSum  Float/Integer(12, 2)(浮点型 金额)
Prd_Date   Date(日期型)

A.  在Prd_Tab表上写个触发器更新字段Prd_ItemSum = (Prd_ItemQTY * Prd_Item. Prd_ItemPrc);

(SQL2000 中或oracle)
B.  在delphi中建立以上两表的主从架构输入界面,用TQuery or TADOQuery 组件.
C.  用QuickReport做出产品项目帐单报表, 按Prd_ID(帐单ID)分组;

触发器是数据库中的一个object,例如你可以定义一个触发器,在数据表的某一列数据被改动时,让触发器动作,修改其实列的值。

7.请口述数据库架构模式和delphi程序设计模式.


8.请口述ERP的中心思想和管理模式

 

 

posted on 2007-04-23 17:02  左左右右  阅读(741)  评论(0)    收藏  举报