Sie sind auf Seite 1von 3

Test: Quiz: Good Programming Practices 1. Which of the following makes PL/SQL code easier to read and maintain?

Mark for Review (1) Points Place multiple statements on the same line. Type everything in lowercase. Use suitable comments in the code. (*)

Correct 2. Which of the following are examples of good programming practice? (Choo se three.) Mark for Review (1) Points (Choose all correct answers) Document code with comments. (*) Use implicit data type conversions. Develop naming conventions for identifiers and other objects. (*) Indent code so that it can be read more easily. (*) Use table column names as the names of variables.

Incorrect. Refer to Section 2 Lesson 7. 3. Which of the following are examples of good programming practice? (Choo se two.) Mark for Review (1) Points (Choose all correct answers) Use the %TYPE attribute to declare a variable according to another previ ously declared variable or database column. (*) Declare one or more identifiers per line for improved performance. For clarity, use column names as identifiers.

Use meaningful names for identifiers. (*)

Incorrect. Refer to Section 2 Lesson 7. 4. Examine the following code: DECLARE v_first_name varchar2 (30); v_salary number (10); BEGIN SELECT first_name, salary INTO v_first_name, v_salary FROM employees WHERE last_name = 'King'; END; Which programming guideline would improve this code? Mark for Review (1) Points Use a suitable naming convention for variables. Indent the code to make it more readable. (*) Use upper and lower case consistently.

Incorrect. Refer to Section 2 Lesson 7. 5. What symbol is used to comment a series of lines? (1) Points / / before and after the comment /* */ before and after the comment (*) * * before and after the comment Mark for Review

Correct 6. Comments change how a PL/SQL program executes, so an unsuitable comment can cause the program to fail. True or False? Mark for Review (1) Points True

False (*)

Correct

Das könnte Ihnen auch gefallen