Ruby Demo Code Guide to filenames.

Slides:



Advertisements
Similar presentations
PHP functions What are Functions? A function structure:
Advertisements

John Pinney Ruby in 20 minutes John Pinney
Types in Ruby and other languages….  Classes and objects (vs prototypes)  Instance variables/encapsulation  Object creation  Object equality/comparison.
Module 8 “Polymorphism and Inheritance”. Outline Understanding Inheritance Inheritance Diagrams Constructors in Derived Classes Type Compatibility Polymorphism.
Java Inheritance. What is inherited A subclass inherits variables and methods from its superclass and all of its ancestors. The subclass can use these.
CS102--Object Oriented Programming Review 1: Chapter 1 – Chapter 7 Copyright © 2008 Xiaoyan Li.
Java Tutorial. Object-Oriented Programming Concepts Object –a representation of some item state  fields/members and should be encapsulated behavior 
Ruby and the tools 740Tools05ClassesObjectsVars Topics Ruby Classes Objects Variables Containers Blocks Iterators Spring 2014 CSCE 740 Software Engineering.
Programming Pillars Introduction to Object- Oriented Programming.
Topic 1Topic 2Topic 3Topic 4Topic
A Little Language for Surveys: Constructing an Internal DSL in Ruby H. Conrad Cunningham Computer and Information Science University of Mississippi.
Also “open class” and other languages….  A module is a named group of methods, constants, and class variables  All classes are modules  Modules are.
OOP: Encapsulation,Abstraction & Polymorphism. What is Encapsulation Described as a protective barrier that prevents the code and data being randomly.
Objects & Dynamic Dispatch CSE 413 Autumn Plan We’ve learned a great deal about functional and object-oriented programming Now,  Look at semantics.
COP3502 Programming Fundamentals for CIS Majors 1 Instructor: Parisa Rashidi.
Guide to filenames. FilenameTopic RubyBasicsExpressions, strings, etc.
Rich Internet Applications 2. Core JavaScript. The importance of JavaScript Many choices open to the developer for server-side Can choose server technology.
Ruby Duck Typing, Classes & Inheritance CSE 413 Autumn 2008.
Ruby Tien Ho and Brandon Hostetter. Overview ▸ Object-oriented, functional, imperative, and reflective ▸ Interpreted language ▸ Influenced by Perl, Smalltalk,
Java Programming: Guided Learning with Early Objects Chapter 9 Inheritance and Polymorphism.
Also “open class” and other languages…
Ruby Inheritance and other languages….
Linear Containers Some containers are called linear because their content (items) are stored in a single row (line). Which of the following are linear?
6 - Ruby in the Rough 7 - Ruby on Rails 03/03/2006 Taylan Yemliha
Ruby Reflection and other languages….
Principles of programming languages 10: Object oriented languages
Ruby Metaprogramming and other languages….
OOP: Encapsulation &Abstraction
Objects as a programming concept
Programming Languages Dan Grossman 2013
types in Ruby and other languages…
Introduction to PL/SQL Programing
Variables All variables hold object references
CSE 341 Section 9 Nick Mooney Spring 2017
Object-Orientated Programming
Classes, Objects, And Variables
Functional Programming with Java
Object Oriented Programming
CS 302 Week 11 Jim Williams, PhD.
Hash table another data structure for implementing a map or a set
CS139 – Fall 2010 How far we have come
Chapter 9 Inheritance and Polymorphism
.NET and .NET Core 9. Towards Higher Order Pan Wuming 2017.
Exception Handling Chapter 9.
What to do today: Brief history of Ruby General qualities/info
Teaching Primary Computing Diving Deep into Programming
Topic 10: Dataflow Analysis
Philip Ira Alan Maynard
CSE341: Programming Languages Ruby: Blocks & Procs; Inheritance & Overriding Alan Borning Spring 2018.
Inheritance, Polymorphism, and Interfaces. Oh My
CSE 341 Section 9 Winter 2018 Adapted from slides by Eric Mullen, Nick Mooney, Nicholas Shahan, Cody Schroeder, and Dan Grossman.
Fall 2018 CISC124 12/3/2018 CISC124 or talk to your grader with questions about assignment grading. Fall 2018 CISC124 - Prof. McLeod Prof. Alan McLeod.
JavaScript What is JavaScript? What can JavaScript do?
Teaching Primary Computing Diving Deep into Programming
Java Programming Course
Ruby and the tools 740Tools05ClassesObjectsVars
Lecture 9_1 George Koutsogiannakis
Fall 2018 CISC124 2/24/2019 CISC124 Quiz 1 marking is complete. Quiz average was about 40/60 or 67%. TAs are still grading assn 1. Assn 2 due this Friday,
Ruby Classes.
JavaScript What is JavaScript? What can JavaScript do?
Nicholas Shahan Spring 2016
For this assignment, copy and past the XHTML to a notepad file with the .html extension. Then add the code I ask for to complete the problems.
CMPE212 – Reminders Assignment 3 due next Friday.
CIS 199 Final Review.
CSE 341 Section 9 Fall 2017 Adapted from slides by Nick Mooney, Nicholas Shahan, Cody Schroeder, and Dan Grossman.
The Selection Structure
CMPE212 – Reminders Assignment 2 due next Friday.
Jim Fawcett CSE687 – Object Oriented Design Spring 2014
CS 240 – Advanced Programming Concepts
Chapter 4 Test Review First day
Presentation transcript:

Ruby Demo Code Guide to filenames

Ruby Basics Filename Topic RubyBasics Expressions, strings, etc.

Ruby Day 2 Filename Topic RubyDataTypes Arrays, Hashes etc. RubyExpressions Methods, Assignment, Splat, etc. RubyUnitTest Unit Test framework RubyControlFlow Standard control flow, yield *filename extension is .rb

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

Ruby Inheritance Filename Topic RubyInheritance-1 Simple Person/Student inheritance RubyInheritance-1a Show instance vars NOT inherited RubyInheritance-2 Override inherited methods RubyInheritance-2a Method visibility RubyInheritance-3 Abstract classes RubyInheritance-4 Chaining methods (super) RubyInheritance-5 Class variables

Ruby Modules and Open Class Filename Topic RubyModules Simple module to encode/decode RubyModules-2 Shows mixin (flying creature) RubyOpenClasses-1 Simple Cat class RubyOpenClasses-2 Add a method to the Cat class RubySingleton Person singleton method RubyLSP LSP example (mathn)

Ruby Regular Expressions Filename Topic RubyRegex Regular expressions

Ruby Reflection Filename Topic RubyReflection-1 Show methods/vars of Cat RubyReflection-2 Message framework

Ruby Megaprogramming Filename Topic RubyMetaprogramming How to write attr accessors RubyMetaprogramming-2 questions.qm Data for quiz program questionsv1.rb Just load data, getting started quiz.rb Stores questions and answers Question (in quiz.rb) Contains one question (w answers) Answer (in quiz.rb) Contains one answer (right/wrong) questions_test.rb Unit test to ensure questions load OK

Ruby Methods/Procs Filename Topic RubyMethodArgs Shows 3 ways to pass arguments RubyYield Fibonacci using yield RubyProc-1 Generate # sequences using blocks, procs RubyProc-2 Uses eval, instance_eval RubyProc-3 Call an instance method