Programming Questions-Ashworth College.

Question 1 (2.5 points) When prompted by the IDE for an encountered exception, you can click the __________ button to pause the program at the line where the exception occurred. Question 1 options: Break Continue Pause Run Question 2 (2.5 points) Which of the following statements about try blocks is TRUE? Question 2 options: The try block must be followed by at least one catch block. The try block must be followed by a finally block. The try block should contain statements that may process an exception. The try block should contain statements that may throw an exception. Question 3 (2.5 points) Which of the following statements about try blocks is TRUE? Question 3 options: The try block must be followed by at least one catch block. The try block must be followed by a finally block. The try block should contain statements that may process an exception. The try block should contain statements that may throw an exception. Question 4 (2.5 points) Which of the following statements is FALSE? Question 4 options: A finally block, if there is one, is placed after the last catch block. A finally block should release all resources acquired in the corresponding try block. The finally block and try block can appear in any order. A finally block is optional. Question 5 (2.5 points) If an exception is thrown in a catch handler, any code in the handler that follows the thrown exception will: Question 5 options: generate a syntax error. generate a logic error. never be executed. run after the finally block is done. Question 6 (2.5 points) In your applications, you can choose to __________ an error, which will provide an exception to the compiler to indicate that a problem occurred. Question 6 options: triage log break throw Question 7 (2.5 points) What’s the difference between a try block and a try statement? Question 7 options: There is no difference; the terms can be used interchangeably. A try statement refers to the block of code following the keyword try, while the try block refers to the try keyword and the block of code following this keyword. The try block refers to the keyword try followed by a block of code. The try block and its corresponding catch and/or finally clauses together form a try statement. The try statement refers to the keyword try followed by a block of code. The try statement and its corresponding catch and/or finally clauses together form a try block. Question 8 (2.5 points) In C#, after an exception is handled, control resumes __________. This is known as the __________ model of exception handling. Question 8 options: after the last catch block; termination after the last catch block; resumption just after the throw point; termination just after the throw point; resumption Question 9 (2.5 points) An exception object has several properties, including the __________ property, which specifies the method where the exception originated. Question 9 options: HelpLink InnerException Source TargetSite Question 10 (2.5 points) According to the flow of control for exceptions, if the following try block throws an error by attempting to divide by zero, which of the following values will be written to the console? try { \\ some algorithm here Console.WriteLine (“A”); } catch (FormatException formatException) { Console.WriteLine (“B”); } catch (DivideByZeroException divByZeroExc) { Console.WriteLine (“C”); } catch (Exception e) { Console.WriteLine (“D”); } Question 10 options: “A” “B” “C” “D” Question 11 (2.5 points) When an exception occurs, several details are made available in the exception object generated, including the exception’s class name, the path of execution, and an error message. This information is collectively known as a(n): Question 11 options: object. stack trace. exception. stack overflow. Question 12 (2.5 points) A try/catch statement can have several catch blocks. You can choose to not specify a specific type of exception in a catch, which is known as a(n) __________ catch clause. Question 12 options: general exception try finally Question 13 (2.5 points) According to the flow of control for exceptions, if the following try block throws an error by attempting to divide by zero, which of the following values will be written to the console? try { Console.WriteLine (“A”); } catch (Exception e) { Console.WriteLine (“B”); } catch (DivideByZeroException divByZeroExc) { Console.WriteLine (“C”); } catch (FormatException formatException) { Console.WriteLine (“D”); } Question 13 options: “A” “B” “C” “D” Question 14 (2.5 points) Which of the following statements is TRUE? Question 14 options: The throw statement is used to throw an exception. The throw statement is used to specify that a method will throw an exception. The throw statement is used to access an exception parameter. All of the above Question 15 (2.5 points) All exception types in the .NET Framework are derived from the __________ class. Question 15 options: Exception System DivideByZero SystemException Question 16 (2.5 points) In order to tell the user what happened in an exception you MUST: Question 16 options: pop the exception. toss the exception. access Exception properties. throw the exception. Question 17 (2.5 points) User-defined exceptions should be derived from the __________ class. Question 17 options: ApplicationException ConsoleException Exception SystemException Question 18 (2.5 points) Writing code to handle an exception, should it occur, is the process of __________ an exception. Question 18 options: blocking logging catching breaking Question 19 (2.5 points) The process called exception __________ enables you to create applications that can handle exceptions. Question 19 options: throwing handling catching typing Question 20 (2.5 points) An exception object has several properties, including the __________ property, which provides the name of the application or object that caused the exception. Question 20 options: HelpLink InnerException Source TargetSite Question 21 (2.5 points) DBExtensions method Load loads: Question 21 options: an entire database’s data into a DbContext. the specified data—typically a specific table or the result of a LINQ to Entities query. other records of the same relational database table, making it easier to manipulate. classes to represent each table in the database and classes to represent the rows of each table in the database. Question 22 (2.5 points) A primary key must be unique for each __________ in the relational database table. Question 22 options: field data set record structure Question 23 (2.5 points) What does the “L” stand for in SQL? Question 23 options: Large Language Linguistic LINQ Question 24 (2.5 points) An ADO.NET Entity Data Model contains: Question 24 options: classes to represent each table in the database. classes to represent the rows of each table in the database. only classes that represent the database’s tables. Both a and b Question 25 (2.5 points) Certain visual tools establish database connections and create objects to view and manipulate data via a GUI. This technique is known as: Question 25 options: DBMS binding. entity joining. data binding. SQL binding. Question 26 (2.5 points) An object of a subclass of __________ is used to manage the data flow between your program and the database. Question 26 options: DataFlow DatabaseContext DbContext EntityDataModel Question 27 (2.5 points) There is a __________ relationship between a primary key and its corresponding foreign key. Question 27 options: one-to-one foreign one-to-many structural Question 28 (2.5 points) You can call a BindingSource’s __________ method to move to the first row of the result. Question 28 options: First MoveFirst FirstRow None of the above Question 29 (2.5 points) Database tables organize data in rows and columns. Rows are also referred to as: Question 29 options: entities. fields. records. data. Question 30 (2.5 points) Every row in a database table must be unique in some way. A __________ key is the combination of two or more columns that define what is unique in that row. Question 30 options: primary foreign DbContext composite Question 31 (2.5 points) The BindingNavigator allows the user to
: Question 31 options: control which row of the table is currently in view. add new and delete new rows. save changes to the data in view. All of the above Question 32 (2.5 points) The ADO.NET __________ allows applications to work directly with data in various forms, including relational databases. Question 32 options: DBMS Entity Framework LINQ SQL Question 33 (2.5 points) What does the “S” stand for in SQL? Question 33 options: Syntax Structured Solitary Selected Question 34 (2.5 points) In a database table, a column can be defined as an __________ column, which can be a numeric value that autoincrements for each record in the table. Question 34 options: identity autoincremental integer entity Question 35 (2.5 points) A database’s table, table fields, and the relationships among all the tables are collectively known as the database: Question 35 options: entity. DBMS. schema. SQL. Question 36 (2.5 points) A(n) __________ provides mechanisms for storing, organizing, retrieving, and modifying data. Question 36 options: DBMS entity data binder SQL object Question 37 (2.5 points) A __________ app typically allows the user to select an entry to see (and potentially manipulate) the details associated with that entry. Question 37 options: composite master/detail view entity-driven model-driven Question 38 (2.5 points) With the Entity Framework, you interact with a database via classes generated by the IDE. This is all done by generating an Entity Data: Question 38 options: Framework. Relational Database. Context. Model. Question 39 (2.5 points) Every row in a database table must be unique in some way. A __________ key is a single column that defines what is unique in that row. Question 39 options: primary foreign DbContext composite Question 40 (2.5 points) Combining several tables by related data is known as __________ the tables, so you can select data from a combination of those tables in a query. Question 40 options: joining combining selecting framing Question 1 (2.5 points) When prompted by the IDE for an encountered exception, you can click the __________ button to pause the program at the line where the exception occurred. Question 1 options: Break Continue Pause Run Question 6 (2.5 points) In your applications, you can choose to __________ an error, which will provide an exception to the compiler to indicate that a problem occurred. Question 6 options: triage log break throw Question 10 (2.5 points) According to the flow of control for exceptions, if the following try block throws an error by attempting to divide by zero, which of the following values will be written to the console? try { \\ some algorithm here Console.WriteLine (“A”); } catch (FormatException formatException) { Console.WriteLine (“B”); } catch (DivideByZeroException divByZeroExc) { Console.WriteLine (“C”); } catch (Exception e) { Console.WriteLine (“D”); } Question 10 options: “A” “B” “C” “D” Question 11 (2.5 points) When an exception occurs, several details are made available in the exception object generated, including the exception’s class name, the path of execution, and an error message. This information is collectively known as a(n): Question 11 options: object. stack trace. exception. stack overflow. Question 12 (2.5 points) A try/catch statement can have several catch blocks. You can choose to not specify a specific type of exception in a catch, which is known as a(n) __________ catch clause. Question 12 options: general exception try finally Question 13 (2.5 points) According to the flow of control for exceptions, if the following try block throws an error by attempting to divide by zero, which of the following values will be written to the console? try { Console.WriteLine (“A”); } catch (Exception e) { Console.WriteLine (“B”); } catch (DivideByZeroException divByZeroExc) { Console.WriteLine (“C”); } catch (FormatException formatException) { Console.WriteLine (“D”); } Question 13 options: “A” “B” “C” “D” Question 18 (2.5 points) Writing code to handle an exception, should it occur, is the process of __________ an exception. Question 18 options: blocking logging catching breaking Question 20 (2.5 points) An exception object has several properties, including the __________ property, which provides the name of the application or object that caused the exception. Question 20 options: HelpLink InnerException Source TargetSite Question 21 (2.5 points) DBExtensions method Load loads: Question 21 options: an entire database’s data into a DbContext. the specified data—typically a specific table or the result of a LINQ to Entities query. other records of the same relational database table, making it easier to manipulate. classes to represent each table in the database and classes to represent the rows of each table in the database. Question 24 (2.5 points) An ADO.NET Entity Data Model contains: Question 24 options: classes to represent each table in the database. classes to represent the rows of each table in the database. only classes that represent the database’s tables. Both a and b Question 25 (2.5 points) Certain visual tools establish database connections and create objects to view and manipulate data via a GUI. This technique is known as: Question 25 options: DBMS binding. entity joining. data binding. SQL binding. Question 29 (2.5 points) Database tables organize data in rows and columns. Rows are also referred to as: Question 29 options: entities. fields. records. data. Question 32 (2.5 points) The ADO.NET __________ allows applications to work directly with data in various forms, including relational databases. Question 32 options: DBMS Entity Framework LINQ SQL Question 34 (2.5 points) In a database table, a column can be defined as an __________ column, which can be a numeric value that autoincrements for each record in the table. Question 34 options: identity autoincremental integer entity A(n) __________ provides mechanisms for storing, organizing, retrieving, and modifying data. Question 36 options: DBMS entity data binder SQL object Question 38 (2.5 points) With the Entity Framework, you interact with a database via classes generated by the IDE. This is all done by generating an Entity Data: Question 38 options: Framework. Relational Database. Context. Model. Question 40 (2.5 points) Combining several tables by related data is known as __________ the tables, so you can select data from a combination of those tables in a query. Question 40 options: joining combining selecting framing