1、NIIT1终极资料1Which of the following is not an application(应用程序) software?_A) MS Visual Studio B) Linux C) PhotoShop D) MS Office2Which of the following is an input device(输入设备)? _A) Printer B) Microphone C) Speaker D) VDU(图像显示部件)3Which mouse is sensitive to pressure and motion?_A)Wireless B)Light Pen M
2、ouse C) Touch Pad Mouse D) Trackball Mouse4Which of the following Web Brower required very little hard disk space? A) Internet Explorer B) Netscape Navigator C) Opera D) Mozilla5Which is a difference between an algorithm(算法) and a flowchart(流程图)?_A)A flowchart is a part of an algorithm B) Both canno
3、t be comparedC) Algorithm is the graphical representation of a flowchartD) Flowchart is a graphical representation(图形化表示形式) of a program6Convert(转换) is a? A) Namespace B) Class C) Function(函数) D) Escape(逸出) sequence(数组) character7In the statement(语句), using System, System is a ? A) Namespace(命名空间) B
4、) Class C) Object D) Keyword8if an array is declared as, int arr=new int5,the total number of elements in the array is ? A) 5 B) 2 C) 1 D) 09which of the following is an example of function overloading? A) void fun() char fun()B) void fun() void fun1()C) void fun(int) void fun(char)D) void fun1(int,
5、int) void fun2(char,char)10which of the following is true about abstract (抽象)classes? A) An abstract class defines properties common to the classes derived from itB) An abstract class can be declared as finalC) Abstract classes cannot be extendedD) Classes declared using the abstract keyword can be
6、instantiated11Identify the SQL statement, which will retrieve (使恢复)a list of Employees fromthe table Employees with the column heading for emp_id as Employee Identity Number. A) SELECT DISTINCT emp_id (Employee Identity Number) from EmployeesB) SELECT emp_id LIKE Employee Identity Number from Employ
7、eesC) SELECT emp_id AS Employee Identity Number from EmployeesD) SELECT emp_id =Employee Identity Number from Employees12Which of the following properties does a transaction NOT posses? A) Atomicity B) Consistency C) Isolation D) Separation13Which database(数据库) object will you create to enforce(实施 )
8、business rule? A) Stored Procedures(存储程序) B) Views(视图)C) Triggers D) Indexes(索引)14Which date function would you use to extract (引出)a specified(指定的) part, such as day, month, or year from the specified date? A) DATEPART B) DATEADDC) DATEDIFF D) DATENAME15In which situation you must create a clustered
9、 index? A) Database uses decision support systemB) Column stores sequential dataC) Query covers all the columns in a tableD) Query contains a WHERE clause16Which of the following is not a DBMS? _ A) Oracle B) Linux C) Microsoft SQL Server D) Sybase17”Column Price should be greater than $1000 and low
10、er than $2000”. This kind of constraint belongs to _ function of DBMS.A) restore B) synchronous C) security D) integrity constraint18What is the right result after execution of SQL statements “ Select dateadd(dd, 12, 2010-12-10) ” ?_A) 2010-12-22 B) 2011-12-10 C) 2022-12-12 D) 2011-6-1019Which of th
11、e following SQL statements can be used to create new database objects?_A) DDL B) DML C) DCL D) DQL20Which of the following operators is used to display a set of records (记录)that contain values within a range in a column(列)?_A) OR B) = C) BETWEEN.AND D) %21Which of the following wildcard(字符) represen
12、ts a single character?_A) % B) _ C) D) 22Which of the following is not a valid type of trigger?_A) Insert Trigger B) Update Trigger C) Delete Trigger D) Before Trigger23. The ? complier is used for C#A) cc B) csc C) c+ D) csn24. int Number1=0; int Number2=0; int Array1=new int 2,3,4,5,6,7,8,9,10,11;
13、 foreach(int Ctr in Array1) if(Ctr%2=1)Number1+;elseNumber2+; Console.Write(Ctr);What is the output of the code? A) 357911 B) 246810 C) Ctr D) 23456789101125. Which of the following locks enable others to view the data being modified (修改的)by the current transaction? A) shared lock B) exclusive lock
14、C) update lock D) intent lock26. Which of the following components of SQL Server 2005 is used to copy and distribute(区分) data and database objects from one database server to another? A) Replication B) Service brokerC) Full-text search D) Notification services二、 阅读程序写结果(每小题5分,共10分)1. using System;us
15、ing System.Collections.Generic;using System.Text;namespace MultiArray class MultiArryExample static void Main(string args) int n=0; int sum = 0; int rowsum; int, mArray = new int2, 4 1, 2, 3, 4 , 5, 6, 7, 8 ; for(int row=0;row2;row+) rowsum = 0; for (int col = 0; col 0) n+; Console.Write(0t, mArrayr
16、ow, col); rowsum = rowsum + mArrayrow, col; sum = sum + rowsum; Console.Write(=0,rowsum); Console.WriteLine(); Console.WriteLine(n=0, n); Console.WriteLine(sum=0,sum); Console.ReadLine(); 2.using System;public class A public virtual void Fun1(int i) Console.WriteLine(i); public void Fun2(A a) a.Fun1
17、(1); Fun1(5); public class B : A public override void Fun1(int i) base.Fun1(i + 1); public static void Main() B b = new B(); A a = new A(); a.Fun2(b); b.Fun2(a); Console.ReadLine(); /b.Fun1(1); 2/Fun1(5); 5/a.Fun1(1) 1/Fun1(5) -base.Fun1(5+1) 6 三、 程序填空(每空2分,共10分)/*The function of following program i
18、s that Calculate the factorial of the number entered by a user.(The limit of users input should be 1-20)*/using System; class Factorial static long Fac1; public static bool Fac(long n, out long answer) long k; bool ok = true; if ( )/user input should be 1-20 ok = false; else ; for (k = 2; k = n; +k)
19、 ; ; return ok; class Factorial1 static void Main(string args) long Fac1; bool ok; long Number; Console.WriteLine(Enter the Number for calculating factorial(1-20):); Number=long.Parse(Console.ReadLine(); ok = ; /function call if (ok) Console.WriteLine(Factorial( + Number + )= + Fac1); else Console.W
20、riteLine(Incorrect value); Console.ReadLine(); 2./*The function of following program is that check a palindrome(回文) character array*/using System;namespace ManipulateArray class palindrome static void Main(string args) char str=new char10; Console.WriteLine(“Enter a Palindrome string(Max 10 char):”)
21、; ; /Calling the CheckPalidrome method Console.WriteLine(CheckPalindrome(str); Console.ReadLine();private static bool CheckPalindrome(char myString) int startChar; int lastChar; ; ;while(startCharlastChar) if(myStringstartChar=myStringlastChar) ; ;else return false;return true;四、 画流程图(6分)Draw a flow
22、chart to accept three numbers and display the largest number.Draw a flowchart to display the average of first ten odd numbers.五、编程题(14分) Please develop a program using the abstract classes, You has to Create a Draw() function in the program, to display the following statements. Its a Point. Its a Li
23、ne. Its a Circle.using System;namespace DrawShapes public abstract class DrawingObject public abstract void Draw(); public class Line : DrawingObject public override void Draw() Console.WriteLine(Its a Line.); public class Circle : DrawingObject public override void Draw() Console.WriteLine(Its a Ci
24、rcle.); public class Square : DrawingObject public override void Draw() Console.WriteLine(Its a Square.); public class DrawDemo public static int Main(string args) DrawingObject dObj = new DrawingObject3; dObj0 = new Line(); dObj1 = new Circle(); dObj2 = new Square(); foreach (DrawingObject drawObj
25、in dObj) drawObj.Draw(); Console.ReadLine(); return 0; 2.Philip Anderson is a software developer who works for Mega Technologies. He is currently under the project of geometric calculations. Philip has to develop a program, which performs the following tasks:1.Calculate the area of circle.2.Calculat
26、e the volume of the cubeHe has to develop the code using an interface.using System;namespace CalculateArea interface Area void calcArea(double Radius); interface volume void calc1(int Side); public class CircleCube:Area public void calcArea(double Radius) double Pie = 3.14; double Result; Result = P
27、ie*Radius*Radius; Console.WriteLine(The Area of a circle is: 0,Result); public void calcVolume(int Side) int Result; Result = Side*Side*Side; Console.WriteLine(The Volume of a cube is: 0,Result); class class1 public static void Main(string args) CircleCube obj = new CircleCube(); double Radius; int
28、Side; Console.WriteLine(Enter the radius of the circle); Radius = Convert.ToDouble(Console.ReadLine(); obj.calcArea(Radius); Console.WriteLine(Enter the side of the cube); Side = Convert.ToInt32(Console.ReadLine(); obj.calcVolume(Side); Console.ReadLine(); 六、E/R图绘制及与关系模式的转换(10分)A company has a numbe
29、r of employees. The attributes of Employee include employeeID, name, address, and birthdate. The company also has several projects. Attributes of Project include projectName and startDate. Each employee may be assigned to one or more projects, or may not be assigned to a project. A project may have any number of employees assigned. An employees billing rate may vary by project, and the company wishes to record the applicable billing rate (Billing_Rate) for each employee wh
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1