Pts which of the following statements is true

This preview shows page 2 - 4 out of 7 pages.

We have textbook solutions for you!
The document you are viewing contains questions related to this textbook.
Concepts of Database Management
The document you are viewing contains questions related to this textbook.
Chapter 3 / Exercise 2
Concepts of Database Management
Last/Pratt
Expert Verified
5. (3 pts) Which of the following statements is TRUE regarding Listing 1, checking if a string reads the same backwards as forwards? A. You could add this method to the String class by reopening String and defining palindrome? as a class method there. B. You could add this as a class method in the String class by putting it in a module, reopening String, and using include to "mix" that module into String. C. The method will work correctly when added to any class that provides a class method reverse D. The method will work correctly when mixed into any class whose instances respond to reverse by returning a reversed version of themselves. E. The method will work correctly if the class includes the <=> instance method. .
Listing 2. 1 class Professor 2 attr_accessor :agility 3 def initialize(tasks=0) 4 @tasks = tasks 5 end 6 def velocity=(points) 7 @velocity = points 8 end 9 end 10 patterson = Professor.new(3) 11 fox = Professor.new 6. (3 pts) Given the Ruby code in Listing 2, which of the following is FALSE? .
7. (3 pts) Still referring to Listing 2, which statement is FALSE about the @tasks attribute of fox ? . . .
We have textbook solutions for you!
The document you are viewing contains questions related to this textbook.
Concepts of Database Management
The document you are viewing contains questions related to this textbook.
Chapter 3 / Exercise 2
Concepts of Database Management
Last/Pratt
Expert Verified
Listing 3.
8. (3 pts) What is the value of result after executing line 7 of Listing 3? A. Hello World B. Hello Ruby C. Line 7 has a syntax error and won't run D. Can't tell since we don't know the value of y in this scope
9. (3 pts) Which one of the following scenarios should NOT be accessible via HTTP GET ?
10. (3 pts) Which step is OPTIONAL when adding the new action MoviesController#top_movies to RottenPotatoes? Assume no JavaScript on the browser.

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture