用友實習筆試題

才智咖 人氣:1.35W

1 要想精神健康,人們必須有自尊。人們只有不斷贏得他們所尊重的人的尊重,才能夠保持他們的自尊,而他們要贏得這種尊重,就必須善待他們所尊重的人。

用友實習筆試題

以下哪個結論可從以上陳述中推出?

(A)精神健康的人會得到別人的善待。

(B)精神健康的人會善待他們所尊重的人。

(C)精神健康的人為得到他人的善待就必須有自尊。

(D)只有善待他人,才能期望得到他人的善待。

(E)自尊的人很少善待他們所尊重的人。

2請簡述什麼是時間複雜度,描述你所知道的排序演算法及其時間複雜度.

3請簡述你基於表示層、業務邏輯層、資料層三層結構應用程式框架的理解。

4當類只能有一個例項而且客戶可以從一個眾所周知的訪問點訪問它時;

當這個唯一例項應該是通過子類化可擴充套件的,並且客戶應該無需更改程式碼就能使用一個擴充套件的例項時。

請指出上述情況可以使用設計模式 ,請寫出該模式的實現程式碼。

5下面的程式碼要根據XML資料來構建一個QueryControllerBean物件,該物件是對Html控制元件的`一個java抽象,QueryControllerBean分為不同的型別,每種型別都有獨特的構造過程,請根據實際場景重構下面的程式碼,給出一個更好的解決方案,達到更好的可讀性,可擴充套件性和可維護性。(給出方案和關鍵的虛擬碼)

public static QueryControllerBean createQueryControllerBean(

QueryMetaDataBean bean, MetaData metaData) {

//前面省去了一些程式碼

String type = ype();

if (ls(“text”)) {// 如果是文字框型別

//構建文字框控制元件的程式碼

} else if (ls("select")) {// 如果是下拉框型別

//構建下拉框控制元件的程式碼

} else if (ls(“reference”)) {// 如果是參照型別

//構建參照控制元件的程式碼

}else if (. . .){

. . .

}else{

. . .

}

//省去了一些程式碼

return controllerBean;

}

6寫一段程式來刪除一個目錄及目錄下的所有內容。

7現在有一個記錄笑話的資料表:jokes。這個表包含五個列:ID、JokeText、JokeDate、AuthorName和AuthorEmail。這些列可以使我們標識笑話(ID),明瞭他們的內容(JokeText),明瞭他們被加入的時間(JokeDate),知道笑話的作者(AuthorName)以及知道笑話作者的email(AuthorEmail)。其中,一個作者可以釋出多個笑話,一個作者也可以包含多個email地址。該表資料示例如下:

ID JokeText JokeDate AuthorName AuthorEmail

1 Why did the… 2007-04-05 Ke Yank

2 Knock knock… 2007-06-08 Joan Smith

3 A man walked… 2007-05-06 Ke Yank

請問:該資料表在設計上存在什麼問題?可以怎樣設計來解決問題,給出您的設計。重新設計後的表符合那些正規化?簡述第三正規化的定義(說出關鍵點即可)。

8有資料表A(a,b,c)和資料表B(d,e,f),要求寫sql文,查出B表滿足A.a=B.d的記錄以及A表的所有記錄。

9請寫出sql語句統計第7題提供的表中各笑話作者的笑話個數。

10 請給出下面兩段文摘的中文翻譯

JBoss -Entity Bean Locking

Entity beans are a great way to provide an object-oriented interface to relational data. Beyond that, they can improve performance by taking the load off of the database through caching and delaying updates until absolutely needed so that the database efficiency can be maximized. But, with caching, data integrity is a problem, so some form of application server level locking is needed for entity beans to provide the transaction isolation properties that you are used to with traditional databases.

Oracle-Disable Shared Server

You disable shared server by setting SHARED_SERVERS to 0. No new client can connect in shared mode. However, when you set SHARED_SERVERS to 0, Oracle Database retains some shared servers until all shared server connections are closed. The number of shared servers retained is Either the number specified by the preceding setting of SHARED_SERVERS or the value of the MAX_SHARED_SERVERS parameter, whichever is smaller. If both SHARED_SERVERS and MAX_SHARED_SERVERS are set to 0, then all shared servers will terminate and requests from remaining shared server clients will be queued until the value of SHARED_SERVERS or MAX_SHARED_SERVERS is raised again.