Guide to filenames. FilenameTopic RubyBasicsExpressions, strings, etc.

Slides:



Advertisements
Similar presentations
John Pinney Ruby in 20 minutes John Pinney
Advertisements

Types in Ruby and other languages….  Classes and objects (vs prototypes)  Instance variables/encapsulation  Object creation  Object equality/comparison.
Notes for CS3310 Artificial Intelligence Part 5: Prolog arithmetic and lists Prof. Neil C. Rowe Naval Postgraduate School Version of July 2009.
Local Variables and Scope Benjamin Fein. Variable Scope A variable’s scope consists of all code blocks in which it is visible. A variable is considered.
Module 8 “Polymorphism and Inheritance”. Outline Understanding Inheritance Inheritance Diagrams Constructors in Derived Classes Type Compatibility Polymorphism.
Class Hierarchy (Inheritance)
Section with Kiyoshi (Slides adapted from Harrison Ting’s) Ruby!
CS102--Object Oriented Programming Review 1: Chapter 1 – Chapter 7 Copyright © 2008 Xiaoyan Li.
Chapter 12: Advanced Topics: Exception Handling Visual Basic.NET Programming: From Problem Analysis to Program Design.
Inheritance Review/Recap. ClassA extends ClassB ClassA now inherits (can access and use) all public and protected elements of ClassB We can expect the.
VB Classes ISYS 512. Adding a Class to a Project Project/Add Class –*** MyClass is a VB keyword. Steps: –Adding properties Declare Public variables in.
Time (hr.) LearnZillion Notes:
Programming Concepts MIT - AITI. Variables l A variable is a name associated with a piece of data l Variables allow you to store and manipulate data in.
Like our natural language. Designed to facilitate the expression and communication ideas between people and computer Like our natural language. Designed.
CMSC 330: Organization of Programming Languages Ruby Hash Tables (and other topics)
1 Inheritance and Polymorphism Chapter 9. 2 Polymorphism, Dynamic Binding and Generic Programming public class Test { public static void main(String[]
Martin Kruliš This is an Object Oriented system. If we change something, the users object by Martin Kruliš (v1.0)1.
Java Tutorial. Object-Oriented Programming Concepts Object –a representation of some item state  fields/members and should be encapsulated behavior 
Programming Pillars Introduction to Object- Oriented Programming.
Also “open class” and other languages….  A module is a named group of methods, constants, and class variables  All classes are modules  Modules are.
JAVA Classes Review. Definitions Class – a description of the attributes and behavior of a set of computational objects Constructor – a method that is.
+ Ruby and other programming Languages Ronald L. Ramos.
JavaScript, Fourth Edition
1 Introduction to Computer Science for Majors II CPSC 233, Winter 2013 CPSC 233, winter 2013 Tutorial 14, Mar 27/28, 2013.
COP3502 Programming Fundamentals for CIS Majors 1 Instructor: Parisa Rashidi.
Introduction to Python Dr. José M. Reyes Álamo. 2 Three Rules of Programming Rule 1: Think before you program Rule 2: A program is a human-readable set.
Exponent Quiz Review. Evaluate the expression 4 2  Answer: 16.
Prime Numbers and Factoring. Which expression is equal to 4x6? (a) 2 × 2 x 2 (b) 2 × 3 × 4 (c) 4 × 5 × 3 (d) 6 × 6.
CPRG 215 Introduction to Object-Oriented Programming with Java Module 3- Introduction to Object Oriented Programming concepts Topic 3.4 Constructors, Overloading,
Rich Internet Applications 2. Core JavaScript. The importance of JavaScript Many choices open to the developer for server-side Can choose server technology.
A High Flying Overview CS139 – Fall 2006 How far we have come.
PHP Reusing Code and Writing Functions 1. Function = a self-contained module of code that: Declares a calling interface – prototype! Performs some task.
Introduction to information systems RUBY dr inż. Tomasz Pieciukiewicz.
Ruby Duck Typing, Classes & Inheritance CSE 413 Autumn 2008.
PROGRAMMING USING PYTHON LANGUAGE ASSIGNMENT 1. INSTALLATION OF RASPBERRY NOOB First prepare the SD card provided in the kit by loading an Operating System.
Ruby Tien Ho and Brandon Hostetter. Overview ▸ Object-oriented, functional, imperative, and reflective ▸ Interpreted language ▸ Influenced by Perl, Smalltalk,
Is the answer to 3 x (-2) positive or negative? How do you know?
Also “open class” and other languages…
6 - Ruby in the Rough 7 - Ruby on Rails 03/03/2006 Taylan Yemliha
OOP: Encapsulation &Abstraction
types in Ruby and other languages…
Variables All variables hold object references
Intro To Classes Review
Ruby Demo Code Guide to filenames.
Classes, Objects, And Variables
Make Your Own Quiz.
Using local variable without initialization is an error.
CS 302 Week 11 Jim Williams, PhD.
Hash table another data structure for implementing a map or a set
Can perform actions and provide communication
.NET and .NET Core 9. Towards Higher Order Pan Wuming 2017.
March 29th Odds & Ends CS 239.
Philip Ira Alan Maynard
Algorithms Take a look at the worksheet. What do we already know, and what will we have to learn in this term?
JavaScript What is JavaScript? What can JavaScript do?
Can perform actions and provide communication
Java Programming Course
Ruby Classes.
JavaScript What is JavaScript? What can JavaScript do?
Chapter 10: Method Overriding and method Overloading
Notes from Week 5 CSE 115 Spring 2006 February 13, 15 & 17, 2006.
Relational Operators.
Method Overriding and method Overloading
Cat.
Review for Midterm 3.
Corresponds with Chapter 5
2 Making Blocks.
Challenge Guide Grade Code Type Slides
Chapter 4 Test Review First day
Presentation transcript:

Guide to filenames

FilenameTopic RubyBasicsExpressions, strings, etc.

FilenameTopic RubyClasses-1Simple Cat class RubyClasses-2Bottle with overloaded operators RubyClasses-3Duck typing RubyClasses-4Object equality RubyClasses-5Type-safe methods RubyClasses-6Overloading [] and each, review yield RubyClasses-7Object comparisons, hash code RubyClasses-8Class methods and variables *filename extension is.rb

FilenameTopic RubyInheritance-1Simple Person/Student inheritance RubyInheritance-1aShow instance vars NOT inherited RubyInheritance-2Override inherited methods RubyInheritance-2aMethod visibility RubyInheritance-3Abstract classes RubyInheritance-4Chaining methods (super) RubyInheritance-5Class variables

FilenameTopic RubyModulesSimple module to encode/decode RubyModules-2Shows mixin (flying creature) RubyOpenClasses-1Simple Cat class RubyOpenClasses-2Add a method to the Cat class RubySingletonPerson singleton method RubyLSPLSP example (mathn)

FilenameTopic RubyRegexRegular expressions

FilenameTopic RubyReflection-1Show methods/vars of Cat RubyReflection-2Message framework

FilenameTopic RubyMetaprogrammingHow to write attr accessors RubyMetaprogramming-2 questions.qmData for quiz program questionsv1.rbJust load data, getting started quiz.rbStores questions and answers Question (in quiz.rb)Contains one question (w answers) Answer (in quiz.rb)Contains one answer (right/wrong) questions_test.rbUnit test to ensure questions load OK

FilenameTopic RubyMethodArgsShows 3 ways to pass arguments RubyYieldFibonacci using yield RubyProc-1Generate # sequences using blocks, procs RubyProc-2Uses eval, instance_eval RubyProc-3Call an instance method