Koofers

Past Exam for CMSC 330 - ORGNZTN PROGM LANG at Maryland (UMD)

Exam Information

Material Type:Exam 1
Professor:Staff
Class:CMSC 330 - ORGNZTN PROGM LANG
Subject:Computer Science
University:University of Maryland
Term:Spring 2008
Keywords:
  • Ruby Program
  • Ruby Regular Expression
  • Implicit Variable Declarations
  • Binary Numbers
  • Different Models
  • Transitions
  • Perspective
  • Organization
  • Sorted Order
  • Formal Language
Login / Sign Up to View Document
Preview Page 1Preview Page 2Preview Page 3

Sample Document Text

CMSC 330, Spring 2008, Midterm 1 Practice Problems 1. Programming languages a. Explain how goals for programming languages have changed since the 1960's. b. List 2 desirable attributes for a programming language where Ruby is better than C. Explain why. c. List 2 methods for executing a program. Which method is used by Ruby? d. Explain why Ruby fits the definition of a scripting language. 2. Ruby basics a. Write a Ruby method foo that takes an integer as a parameter. Call foo with 2 as its argument. Circle & label the formal and actual parameters in your code. b. Using different Ruby control statements, write 4 code fragments that iterate from i=1 to i=10. c. Explain the difference between explicit and implicit variable declarations. d. List two advantages of static types. e. Using Ruby, write a class Teacher that contains an integer field students and an integer field totalStudents that is shared across all objects of class Teacher. f. Give an example of reference co...

Related Documents

Ruby Program Exam
Ruby Program Exam
Text Processing Exam
Text Processing Exam
Text Processing Exam
Ruby Regular Expression Exam
Binary Numbers Exam
Implicit Variable Declarations Exam
Implicit Variable Declarations Exam
Implicit Variable Declarations Exam
Ruby Regular Expression Exam
Ruby Regular Expression Exam
Ruby Regular Expression Exam
Ruby Regular Expression Exam
Cmsc 330 Exam Exam
Ruby Standard Library Exam
155, "/var/app/current/tmp/"