.net软件工程师笔试题目
1.??? 請為ASP.Net下一個定義。
2.??? 請解釋B/S,并比較C/S,給出B/S的優點。
3.??? 請說明人們提出“面向對象編程”概念的用意是什么?
4.??? 閱讀以下C++代碼,并回答問題。
??? CPerson *aPerson = new CChinese();
??? aPerson->Say();
??? aPerson = new CAmerican();
??? aPerson->Say();
??? return 0;
(1)?????? 上述代碼的范型是“結構化編程”、“面向對象編程”、“泛型編程”中的哪一種,為什么?
(2)?????? 為上述代碼構造一個函數簽名。
(3)?????? 說出上述代碼存在的問題。
(4)?????? 請說出“CPerson”、“CChinese”、“CAmerican”三者之間的關系。
(5)?????? 請說明第二個“aPerson->Say( )”代碼調用的是“CChinese”還是“CAmerican”的“Say”函數?這體現了什么特征?
5.??? 請說出三種程序的基本結構。
6.??? 請說明什么是“客戶程序”。
7.??? 請指出以下哪幾個變量名取得比較好?
(1)abc?????? (2)m_Name?????? (3)aCat????? (4)curTime?????? (5)currentTime?
(6)seekCount4Person????????????? (7)sc_Person???? (8)found??? (9)fnd???????
(10)iCount??????? (11)count??
8.??? 請說明“關系表達式和邏輯表達式”與“命題邏輯和謂詞邏輯”之間的關系。
9.??? 請說出C++中獨立函數的構成元素。
10.????????????? 請解釋“接口”的概念。
11.????????????? 閱讀以下C++代碼,并回答問題。
int add( int x = 0, int y = 0 )
{?? return x + y;}
float add( float x = .0f, float y = .0f )
{ return x + y;}
double add( double x, double y )
{?? return x + y;}
void main(void){
? cout << add( 1, 2 ) << endl;
? cout << add( 3.5, 4.7 ) << endl;
? cout << add( ) << endl;? }
(1)?????? 上述代碼使用到的是“Overload”技術還是“Override”技術?
(2)?????? 在C++中可以采用什么技術簡化上述代碼,請實現之。
(3)?????? 說出上述代碼存在的問題。
12.????????????? 請說出C++中“成員變量的私有”、“定義類的成員”、“某個類是另外一個類的子類”、“Override和virtual成員函數”四種代碼表現分別體現了面向對象的四大基本特征的哪一個?
13.????????????? 請說出C++中“類的組合”、“成員函數的參數為某個類的對象”、“某個類是另外一個類的子類”、“純虛成員函數”四種代碼表現分別體現了面向對象的四種基本關系的哪一種?
14.????????????? 請說出為什么在C++中析構函數最好定義為虛函數?
15.????????????? 請說明C++中,怎樣讓一個客戶程序無法實例化某個類的對象。
16.????????????? 請說明C++中,怎樣讓整個程序只能實例化一次某個類的對象。
17.????????????? 請看以下的UML圖,編寫“CAnimal”、“CDog”、“CEye”三個類的C++聲明代碼。
18.????????????? 閱讀以下C++代碼,并回答問題。
class CString? {
public:
? int Compare(const char* s);
?????????????????????? ??? CString(CString& s);
int Compare(CString& s);
? CString& Add(CString& s);
? int GetLength();
? const char* C_Str();
? CString(char c, unsigned int n = 1);
? CString(const char* s);
? CString();
? virtual ~CString();
protected:
? int CalLength(const char* s);
? ??? ??? void Clear();
? void Init();
private:
? unsigned int m_length;?? ???
char* m_str;
};
(1)????? 請說明該類有幾個構造函數?
(2)????? “const char* C_Str()”為什么要加上const關鍵字?
(3)????? 如果“CString s = otherString;”會不會調用構造函數,如果調用將會調用哪個構造函數?
(4)????? 請實現“GetLength”成員函數。
(5)????? 請實現“CString(char c, unsigned int n = 1);”構造函數。
(6)????? 請實現“Compare(const char*s);”成員函數。
(7)????? 請實現“Clear();”成員函數。
(8)????? 如果增加“InputString”成員函數用于從鍵盤輸入字符串,請問是否合適,為什么?
(9)????? 請問代碼“Compare(CString& s){ return Compare(s.C_Str());}”是否可行,如果可行,有什么好處?
19.????????????? 請說明數據庫中View是“外模式”、“模式”還是“內模式”?
20.????????????? 請看下屬公式說明的是什么連接運算?
?
?
?
21.????????????? 閱讀以下數據庫模式,并回答問題。
Course( CourseID#, Name, CheckType, Property )
Student( StudentID#, Name, ClassID )
Class( ClassID#, Name, SpecialityID, DepartmentName )
Speciality(SpecialityID#, Name, DepartmentID )
Department(DepartmentID#, Name, Address )
ChooseCourse(StudentID#, ClassID#, CourseID#, Term#, Score1, Score2)
注意:上述“#”表示主碼。
(1)????? 寫SQL,求每門課程的修讀人數(結果中包含課程名稱)。
(2)????? 寫SQL,求修讀人數大于30人的課程(結果中包含課程名稱)。
(3)????? 寫SQL,求修讀課程數多于1門的學生(結果中包含學生姓名)。
(4)????? 寫SQL,求“信管04-1班”每位同學選修的學分總數(結果中包含學生姓名)。
(5)????? 寫SQL,求每個學院(部門)的學生人數 。
(6)????? 請說出上述數據庫模式是否符合第四范式?如果不符合,請將其進行規范化處理。
(7)????? 請說出為什么需要規范化處理?
(8)????? 請為上述規范化到第四范式的數據庫繪制出概念模型(ER圖)。
22.????????????? 請完成下表的填寫。
| 隔離級別 | 臟讀 | 不可重復讀取 | 幻像 |
| READ UNCOMMITTED | ? | ? | ? |
| READ COMMITTED(默認) | 否 | ? | ? |
| REPEATABLE READ | ? | ? | 是 |
| SERIALIZABLE | ? | 否 | ? |
注意:“是”表示某隔離級別會出現某種錯誤的情況,“否”則反之。
23.????????????? 請按照下圖解釋“三層系統架構”。
| ? |
| ? |
| ? |
| Presentation |
| Business |
| Data |
| DB |
| 網頁 |
?
24.????????????? 請完成以下翻譯(可以精簡成內容提要)。
Passage One:
The .NET Framework provides a first-class foundation for building and consuming Web services based off of the fundamental protocols of XML, SOAP, and WSDL. But despite the interoperable and loosely coupled beauty of these traditional Web services, before long one finds one's self wanting for more. For instance, in the area of security, it seems contradictory to depend on HTTP security mechanisms when SOAP messages were designed to hold metadata-like security information. Similarly, the request/response nature of HTTP, which fits perfectly for many message exchange patterns, seems like an overly restrictive one-size-fits-all solution when other message exchange patterns would fit your business needs better. This is a particularly frustrating restriction because the SOAP specification goes out of its way to avoid such limitations in Web service message exchange.
Web Services Enhancements (WSE) is the Microsoft extension to the Web service support in the .NET Framework that builds on the foundation of XML, SOAP, and WSDL with higher-level protocols that support such things as message-based security, policy-based administration, and the flexibility to move message-exchange out of the HTTP-only world. The result is a Web service platform that can save developers from the tedious, time-consuming, and fragile world of developing higher-level requirements themselves. Instead they can rely on the supported and interoperable solution that is provided by WSE.
Passage Two:
The BaseDataBoundControl is the root of all data-bound control classes. It defines the DataSource and DataSourceID properties and validates their assigned content. DataSource accepts enumerable objects obtained and assigned the ASP.NET 1.x way.
Mycontrol1.DataSource = dataSet;
Mycontrol1.DataBind();
DataSourceID is a string and refers to the ID of a bound data source component. Once a control is bound to a data source, any further interaction between the two (in both reading and writing) is handled out of your control and hidden from view. This is both good and bad news at the same time. It is good (rather, great) news because you can eliminate a large quantity of code. The ASP.NET framework guarantees that correct code executes and is written according to recognized best practices. You're more productive because you author pages faster with the inherent certainty of having no subtle bugs in the middle. If you don't like this situation—look, the same situation that many ASP.NET 1.x developers complained about—you can stick to the old-style programming that passes through the DataSource property and DataBind method. Also in this case, the base class saves you from common practices even though the saving on the code is less remarkable.
?
轉載于:https://www.cnblogs.com/huikof/archive/2008/06/25/1229758.html
總結
以上是生活随笔為你收集整理的.net软件工程师笔试题目的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 人生必学的一课:成功的人就是会“勉强”别
- 下一篇: 什么是迅驰技术