• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 20 pages
Exam (elaborations)

CMSC 330 Final(100% Correct answers)

Document preview thumbnail
Preview 3 out of 20 pages

Turing Complete correct answers • A language is Turing complete if it can compute any function computable by a Turing Machine Syntax correct answers • What a program looks like Semantics correct answers • What a program means Attributes of a Good Language correct answers • Naturalness • Security & safety • Cost of Use • Portability Ruby Intro correct answers • Ruby is an object-oriented, imperative scripting language Explicit vs Implicit Declarations correct answers • Java and C/C++ use explicit variable declarations - Variables are named and typed before they are used • In Ruby, variables are implicitly declared - First use of a variable declares it and determines type Method Return Values correct answers • Value of the return is the value of the last executed statement in the method Style correct answers • Names of methods that return a boolean should end in ? • Names of methods that modify an object's state should end in ! • All Ruby conditional statements must be terminated with the end keyword What is True? correct answers • The true branch is taken if the guard evaluates to anything except: false, nil • Warning to C programmers: 0 is not false! Classes and Objects correct answers • Class names begin with an uppercase letter The new method creates an object • s = S creates a new String and makes s refer to it • Every class inherits from Object Everything is an Object correct answers • Everything is an object in Ruby Standard Library Arrays correct answers Arrays of objects are instances of class Array • Arrays may be heterogeneous a = [1, "foo", 2.14] • C-like syntax for accessing elements, indexed from 0 x = a[0]; a[1] = 37 Standard Library Hash correct answers • A hash acts like an associative array italy["population"] =


Document information

Uploaded on
May 28, 2024
Number of pages
20
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers
$15.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Sold
23
Followers
6
Items
4026
Last sold
2 months ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions

Whoops! We can’t load your doc right now. Try again or contact support.