.net软件工程师笔试题目
1.??? 請為ASP.Net下一個(gè)定義。
2.??? 請解釋B/S,并比較C/S,給出B/S的優(yōu)點(diǎn)。
3.??? 請說明人們提出“面向?qū)ο缶幊獭备拍畹挠靡馐鞘裁?#xff1f;
4.??? 閱讀以下C++代碼,并回答問題。
??? CPerson *aPerson = new CChinese();
??? aPerson->Say();
??? aPerson = new CAmerican();
??? aPerson->Say();
??? return 0;
(1)?????? 上述代碼的范型是“結(jié)構(gòu)化編程”、“面向?qū)ο缶幊獭?、“泛型編程”中的哪一種,為什么?
(2)?????? 為上述代碼構(gòu)造一個(gè)函數(shù)簽名。
(3)?????? 說出上述代碼存在的問題。
(4)?????? 請說出“CPerson”、“CChinese”、“CAmerican”三者之間的關(guān)系。
(5)?????? 請說明第二個(gè)“aPerson->Say( )”代碼調(diào)用的是“CChinese”還是“CAmerican”的“Say”函數(shù)?這體現(xiàn)了什么特征?
5.??? 請說出三種程序的基本結(jié)構(gòu)。
6.??? 請說明什么是“客戶程序”。
7.??? 請指出以下哪幾個(gè)變量名取得比較好?
(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.??? 請說明“關(guān)系表達(dá)式和邏輯表達(dá)式”與“命題邏輯和謂詞邏輯”之間的關(guān)系。
9.??? 請說出C++中獨(dú)立函數(shù)的構(gòu)成元素。
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”技術(shù)還是“Override”技術(shù)?
(2)?????? 在C++中可以采用什么技術(shù)簡化上述代碼,請實(shí)現(xiàn)之。
(3)?????? 說出上述代碼存在的問題。
12.????????????? 請說出C++中“成員變量的私有”、“定義類的成員”、“某個(gè)類是另外一個(gè)類的子類”、“Override和virtual成員函數(shù)”四種代碼表現(xiàn)分別體現(xiàn)了面向?qū)ο蟮乃拇蠡咎卣鞯哪囊粋€(gè)?
13.????????????? 請說出C++中“類的組合”、“成員函數(shù)的參數(shù)為某個(gè)類的對象”、“某個(gè)類是另外一個(gè)類的子類”、“純虛成員函數(shù)”四種代碼表現(xiàn)分別體現(xiàn)了面向?qū)ο蟮乃姆N基本關(guān)系的哪一種?
14.????????????? 請說出為什么在C++中析構(gòu)函數(shù)最好定義為虛函數(shù)?
15.????????????? 請說明C++中,怎樣讓一個(gè)客戶程序無法實(shí)例化某個(gè)類的對象。
16.????????????? 請說明C++中,怎樣讓整個(gè)程序只能實(shí)例化一次某個(gè)類的對象。
17.????????????? 請看以下的UML圖,編寫“CAnimal”、“CDog”、“CEye”三個(gè)類的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)????? 請說明該類有幾個(gè)構(gòu)造函數(shù)?
(2)????? “const char* C_Str()”為什么要加上const關(guān)鍵字?
(3)????? 如果“CString s = otherString;”會(huì)不會(huì)調(diào)用構(gòu)造函數(shù),如果調(diào)用將會(huì)調(diào)用哪個(gè)構(gòu)造函數(shù)?
(4)????? 請實(shí)現(xiàn)“GetLength”成員函數(shù)。
(5)????? 請實(shí)現(xiàn)“CString(char c, unsigned int n = 1);”構(gòu)造函數(shù)。
(6)????? 請實(shí)現(xiàn)“Compare(const char*s);”成員函數(shù)。
(7)????? 請實(shí)現(xiàn)“Clear();”成員函數(shù)。
(8)????? 如果增加“InputString”成員函數(shù)用于從鍵盤輸入字符串,請問是否合適,為什么?
(9)????? 請問代碼“Compare(CString& s){ return Compare(s.C_Str());}”是否可行,如果可行,有什么好處?
19.????????????? 請說明數(shù)據(jù)庫中View是“外模式”、“模式”還是“內(nèi)模式”?
20.????????????? 請看下屬公式說明的是什么連接運(yùn)算?
?
?
?
21.????????????? 閱讀以下數(shù)據(jù)庫模式,并回答問題。
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,求每門課程的修讀人數(shù)(結(jié)果中包含課程名稱)。
(2)????? 寫SQL,求修讀人數(shù)大于30人的課程(結(jié)果中包含課程名稱)。
(3)????? 寫SQL,求修讀課程數(shù)多于1門的學(xué)生(結(jié)果中包含學(xué)生姓名)。
(4)????? 寫SQL,求“信管04-1班”每位同學(xué)選修的學(xué)分總數(shù)(結(jié)果中包含學(xué)生姓名)。
(5)????? 寫SQL,求每個(gè)學(xué)院(部門)的學(xué)生人數(shù) 。
(6)????? 請說出上述數(shù)據(jù)庫模式是否符合第四范式?如果不符合,請將其進(jìn)行規(guī)范化處理。
(7)????? 請說出為什么需要規(guī)范化處理?
(8)????? 請為上述規(guī)范化到第四范式的數(shù)據(jù)庫繪制出概念模型(ER圖)。
22.????????????? 請完成下表的填寫。
| 隔離級別 | 臟讀 | 不可重復(fù)讀取 | 幻像 |
| READ UNCOMMITTED | ? | ? | ? |
| READ COMMITTED(默認(rèn)) | 否 | ? | ? |
| REPEATABLE READ | ? | ? | 是 |
| SERIALIZABLE | ? | 否 | ? |
注意:“是”表示某隔離級別會(huì)出現(xiàn)某種錯(cuò)誤的情況,“否”則反之。
23.????????????? 請按照下圖解釋“三層系統(tǒng)架構(gòu)”。
| ? |
| ? |
| ? |
| Presentation |
| Business |
| Data |
| DB |
| 網(wǎng)頁 |
?
24.????????????? 請完成以下翻譯(可以精簡成內(nèi)容提要)。
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.
?
轉(zhuǎn)載于:https://www.cnblogs.com/huikof/archive/2008/06/25/1229758.html
總結(jié)
以上是生活随笔為你收集整理的.net软件工程师笔试题目的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 人生必学的一课:成功的人就是会“勉强”别
- 下一篇: 什么是迅驰技术