Object Oriented Programming (OOP) Overview CS61A Lecture 14
|
|
- Amberly Lucas
- 5 years ago
- Views:
Transcription
1 Objet Oriented Programming (OOP) Overview CS6A Leture Colleen Lewis Multiple independent intelligent agents Message passing, loal state, inheritane define-lass, instantiate, ask, method, instane-vars, lassvars, self, usual, parent???? & Sheme keywords Class like a blueprint of an objet define-lass a partiular objet something you an ask an instane of a lass to do. method ask s The doubler lass (define-lass (doubler) (se stuff stuff))) name body Class name argument variable Creating objets & alling methods STk> (define d (instantiate doubler)) d Call a method On this instane of a lass Call this method STk> (ask d 'say '(how are you?)) (how are you? how are you?) Class name Creates an instane of a lass With this argument
2 Modify the doubler lass (define-lass (doubler) (se stuff stuff))) STk> (ask d 'add 3) 0 STk> (ask d 'add ) 4 add is a: A) funtion B) method C) lass D)message instane variables instane-vars Instane variables variables loal to an instane of a lass instane-vars instane-vars Instane variable name (instane-vars (ount 0) ) Initial value Could add another Create these variable here. E.g. variables for eah (x 3) new instane (method (welome) Can be aessed (se 'my 'ount 'is ount))) When do you use quotes? (instane-vars (ount 0)) (method (welome) (se 'my 'ount 'is ount))) STk> (define (instantiate? ounter)) STk> (ask?'welome) (my ount is 0) Whih needs a quote? A) Class name B) method name C) both D) neither If you hange the lass, ALWAYS rereate your objets STk> (load "let4.sm") okay STk> (define (instantiate ounter)) STk> (ask 'welome) (my ount is 0)
3 Aessing instane variables (instane-vars (ount 0) (x 3)) (method (welome) (se 'my 'ount 'is ount))) set! STk> (define (instantiate ounter)) STk> (ask 'ount) 0 STk> (ask 'x) 3 s for instane variables are provided automatially Non-funtional programming (A way to hange instane variables) Changing instane variables STk> (define (instantiate ounter)) STk> (ask 'ount) 0 STk> (ask 'next) STk> (ask 'next) STk> (ask 'ount) Changing instane variables (instane-vars (ount 0)) Variable to (method (next) hange (set! ount (+ ount )) ount)) Non-funtional programming so you may do many things New value in one method. Sheme returns the last one Add a method addx (instane-vars (ount 0) (x 0)) (method (next) (set! ount (+ ount )) ount)) STk>(ask 'next) STk> (ask 'addx 0) STk> (ask 'x) 0 What was the argument name in your addx method? A) x B) argx C) y D) None used Conept: Loal State 3
4 STk> (define (instantiate ounter)) STk> (define (instantiate ounter)) STk> (ask 'ount) 0 STk> (ask 'next) STk> (ask 'ount) s ount wasn t hanged Class variables Uses the keyword lass-vars Instane variables variables loal to an instane of a lass instane-vars Class variables variables shared by all instanes of a lass lass-vars STk> (define (instantiate ounter)) STk> (define (instantiate ounter)) (ount: total: ) (ount: total: ) total is a lass variable shared by all instanes of the lass (ount: 3 total: 3) What will this print? STk> (ask 'next) A(ount: total: 4) B(ount: total: ) C(ount: 4 total: 4) D(ount: 4 total: ) Class variables in Sheme OOP (instane-vars (ount 0)) (lass-vars (total 0)) (method (next) (set! ount (+ ount )) (set! total (+ total )) (se 'ount: ount 'total: total))) Counter objets respond to the message 'total Instantiation Variables 4
5 Instane variables variables loal to an instane of a lass instane-vars a partiular objet Instantiation variables arguments provided when we reated the instane of the lass. (define-lass (beah-bum name) (instane-vars (surfs #t))) Instane variable STk> (define surfer (instantiate beah-bum 'bob)) surfer STk> (ask surfer 'name) bob STk> (ask surfer 'surfs) #t Instantiation variable Created differently but they work the same way Write the meet method STk> (load "let4.sm") okay STk> (define surfer (instantiate beah-bum 'bob)) surfer STk> (ask surfer 'meet 's6a-lass) (hi s6a-lass my name is bob dude) 's6a-lass is the value of an A) instane variable B) instantiation variable C) method argument The initialization keyword A way to initialize lass variables. surfer-names is. STk> (define s (instantiate beah-bum 'bob)) s STk> (ask s 'surfer-names) (bob) STk> (define s (instantiate beah-bum 'jim)) s STk> (ask s 'surfer-names) (jim bob) A) An instane variable B) An instantiation variable C) A lass variable D) Something else Class Instane variables Instantiation variables Class variables 5
6 Initializing lass-vars (define-lass (beah-bum name) (set! surfer-names (se name surfer-names))) (se stuff 'dude))) This is the FIRST initial value (lass-vars (surfer-names '())) If other instanes of We already knew the lass already how to make lass exist, do this variables (initialize SOLUTION Modify the doubler lass (define-lass (doubler) (se stuff stuff)) name arguments (method (add num num) (* (+ num num)))) body Solution addx (instane-vars (ount 0) (x 0)) (method (addx argx) (set! ount (+ ount argx)) (set! x argx) ount)) I don t want the argument to be named x b/ then I would need to write (set! x x) meet solution (define-lass (beah-bum name) (instane-vars (surfs #t)) (method (meet someone) (se 'hi someone 'my 'name 'is name 'dude))) Class like a blueprint of an objet define-lass a partiular objet something you an ask an instane of a lass to do. method ask Instane variables variables loal to an instane of a lass instane-vars a partiular objet Instantiation variables arguments provided when we reated the instane of the lass. Class variables variables shared by all instanes of a lass lass-vars 6
BAD BAD BAD! This doesn t work! REVIEW: define the animal class. CS61A Lecture 15. dogs inherit from animals (& can call parent methods) Inheritance
CS61A Lecture 15 2011-07-14 Colleen Lewis REVIEW: define the animal class STk> (define animal1 (instantiate animal 'fred)) animal1 STk> (ask animal1 'age) 0 STk> (ask animal1 'eat) yum STk> (ask animal1
More informationReview Analyzing Evaluator. CS61A Lecture 25. What gets returned by mc-eval? (not analyzing eval) REVIEW What is a procedure?
2 1 Review Analyzing Evaluator CS61A Lecture 2011-08-02 Colleen Lewis What s look like What the output of analyze was Fact: The body of a lambda gets analyzed! We can give names to analyzed lambdas What
More informationRun Time Environment. Implementing Object-Oriented Languages
Run Time Environment Implementing Objet-Oriented Languages Copright 2017, Pedro C. Diniz, all rights reserved. Students enrolled in the Compilers lass at the Universit of Southern California have epliit
More information(first (hello)) (hello) CS61A Lecture 2. Computer Science. Hierarchy of Abstraction. Functions. REVIEW: Two Types of( s so far
CS61A Lecture 2 Computer Science 2011-06-21 Colleen Lewis Not really about computers! Not really a science! Hierarchy of Abstraction Application Programs High-level language (Scheme) Low-level language
More informationHow many ways to make 50 cents? first-denomination Solution. CS61A Lecture 5. count-change. cc base cases. How many have you figured out?
6/6/ CS6A Lecture -6-7 Colleen Lewis How many ways to make cents? first-denomination Solution (define (first-denomination kinds-of-coins) ((= kinds-of-coins ) ) ((= kinds-of-coins ) ) ((= kinds-of-coins
More informationRuntime Support for OOLs Part II Comp 412
COMP 412 FALL 2017 Runtime Support for OOLs Part II Comp 412 soure IR Front End Optimizer Bak End IR target Copright 2017, Keith D. Cooper & Linda Torzon, all rights reserved. Students enrolled in Comp
More informationTotal 100
CS331 SOLUTION Problem # Points 1 10 2 15 3 25 4 20 5 15 6 15 Total 100 1. ssume you are dealing with a ompiler for a Java-like language. For eah of the following errors, irle whih phase would normally
More informationWORKSHOP 20 CREATING PCL FUNCTIONS
WORKSHOP 20 CREATING PCL FUNCTIONS WS20-1 WS20-2 Problem Desription This exerise involves reating two PCL funtions that an be used to easily hange the view of a model. The PCL funtions are reated by reording
More informationBerkeley Scheme s OOP
Page < 1 > Berkeley Scheme s OOP Introduction to Mutation If we want to directly change the value of a variable, we need a new special form, set! (pronounced set BANG! ). (set! )
More informationDesign Patterns. Patterns.mkr Page 223 Wednesday, August 25, :17 AM
Patterns.mkr Page 223 Wednesday, August 25, 1999 2:17 AM Design Patterns n the earlier hapters, we have seen that a entral goal of objet-oriented programming is the support of ode reuse. This hapter examines
More informationParsing Scheme (+ (* 2 3) 1) * 1
Parsing Scheme + (+ (* 2 3) 1) * 1 2 3 Compiling Scheme frame + frame halt * 1 3 2 3 2 refer 1 apply * refer apply + Compiling Scheme make-return START make-test make-close make-assign make- pair? yes
More information(scheme-1) has lambda but NOT define
CS61A Lecture 12 2011-0-11 Colleen Lewis (calc) review (scheme-1) has lambda but NOT define Remember calc-apply? STk> (calc-apply '+ '(1 2 )) 6 STk> (calc-apply '* '(2 4 )) 24 STk> (calc-apply '/ '(10
More informationRecursion examples: Problem 2. (More) Recursion and Lists. Tail recursion. Recursion examples: Problem 2. Recursion examples: Problem 3
Reursion eamples: Problem 2 (More) Reursion and s Reursive funtion to reverse a string publi String revstring(string str) { if(str.equals( )) return str; return revstring(str.substring(1, str.length()))
More informationEXODUS II: A Finite Element Data Model
SAND92-2137 Unlimited Release Printed November 1995 Distribution Category UC-705 EXODUS II: A Finite Element Data Model Larry A. Shoof, Vitor R. Yarberry Computational Mehanis and Visualization Department
More informationO(1) How long does a function take to run? CS61A Lecture 6
How long does a function take to run? It depends on what computer it is run on! CS6A Lecture 6 20-06-28 Colleen Lewis Assumptions We want something independent of the speed of the computer We typically
More informationThis fact makes it difficult to evaluate the cost function to be minimized
RSOURC LLOCTION N SSINMNT In the resoure alloation step the amount of resoures required to exeute the different types of proesses is determined. We will refer to the time interval during whih a proess
More informationObject-Oriented Programming Concepts
Object-Oriented Programming Concepts Real world objects include things like your car, TV etc. These objects share two characteristics: they all have state and they all have behavior. Software objects are
More informationHarton beer line counter BCM-6
Harton beer line ounter BCM-6 User s manual for 6 independant beer lines Pre-programmed for liter and deiliter ounting Use of any available flowmeter (12 V) Flowmeter inputs by opto-ouplers Calibration
More informationMultiple Assignments
Two Outputs Conneted Together Multiple Assignments Two Outputs Conneted Together if (En1) Q
More informationIntro. Scheme Basics. scm> 5 5. scm>
Intro Let s take some time to talk about LISP. It stands for LISt Processing a way of coding using only lists! It sounds pretty radical, and it is. There are lots of cool things to know about LISP; if
More informationRe-programming a many-to-many merge with Hash Objects
Re-programming a many-to-many merge with Hash Objets CS05 PhUSE 2012 Budapest D. J. Garbutt 17 Otober 2012 Why? 1 In this talk I will demonstrate how you an re-program a many-to-many merge using hash objets
More informationReview. Type equivalence. Java declarations. Type equivalence. Declared vs. implicit subtyping. CS 412 Introduction to Compilers
CS 412 Introdution to Comilers Andrew Mers Cornell Universit Leture 21: Subting 16 Marh 01 Review Multile imlementations suorted b subting Subting harateried b new judgement: S
More informationEffecting Parallel Graph Eigensolvers Through Library Composition
Effeting Parallel Graph Eigensolvers Through Library Composition Alex Breuer, Peter Gottshling, Douglas Gregor, Andrew Lumsdaine Open Systems Laboratory Indiana University Bloomington, IN 47405 {abreuer,pgottsh,dgregor,lums@osl.iu.edu
More informationSelf-Adaptive Parent to Mean-Centric Recombination for Real-Parameter Optimization
Self-Adaptive Parent to Mean-Centri Reombination for Real-Parameter Optimization Kalyanmoy Deb and Himanshu Jain Department of Mehanial Engineering Indian Institute of Tehnology Kanpur Kanpur, PIN 86 {deb,hjain}@iitk.a.in
More informationMachine Vision. Laboratory Exercise Name: Student ID: S
Mahine Vision 521466S Laoratory Eerise 2011 Name: Student D: General nformation To pass these laoratory works, you should answer all questions (Q.y) with an understandale handwriting either in English
More informationWhat follows is a description of a basic time sharing systems, as. seen by a knowledgeable user. There are three basic kinds of objects,
11/15/67 H. Sturgis 1.0 What follows is a desription of a basi time sharing systems, as seen by a knowledgeable user. There are three basi kinds of objets, and some ations that an be performed on them.
More informationSemi-Supervised Affinity Propagation with Instance-Level Constraints
Semi-Supervised Affinity Propagation with Instane-Level Constraints Inmar E. Givoni, Brendan J. Frey Probabilisti and Statistial Inferene Group University of Toronto 10 King s College Road, Toronto, Ontario,
More informationMore Perl. CS174 Chris Pollett Oct 25, 2006.
More Perl CS174 Chris Pollett Oct 25, 2006. Outline Loops Arrays Hashes Functions Selection Redux Last day we learned about how if-else works in Perl. Perl does not have a switch statement Like Javascript,
More informationAustralian Journal of Basic and Applied Sciences. A new Divide and Shuffle Based algorithm of Encryption for Text Message
ISSN:1991-8178 Australian Journal of Basi and Applied Sienes Journal home page: www.ajbasweb.om A new Divide and Shuffle Based algorithm of Enryption for Text Message Dr. S. Muthusundari R.M.D. Engineering
More informationSolutions to Tutorial 2 (Week 9)
The University of Syney Shool of Mathematis an Statistis Solutions to Tutorial (Week 9) MATH09/99: Disrete Mathematis an Graph Theory Semester, 0. Determine whether eah of the following sequenes is the
More informationSAND Unlimited Release Printed November 1995 Updated November 29, :26 PM EXODUS II: A Finite Element Data Model
SAND92-2137 Unlimited Release Printed November 1995 Updated November 29, 2006 12:26 PM EXODUS II: A Finite Element Data Model Gregory D. Sjaardema (updated version) Larry A. Shoof, Vitor R. Yarberry Computational
More informationOOPS Viva Questions. Object is termed as an instance of a class, and it has its own state, behavior and identity.
OOPS Viva Questions 1. What is OOPS? OOPS is abbreviated as Object Oriented Programming system in which programs are considered as a collection of objects. Each object is nothing but an instance of a class.
More informationCOMPUTER SCIENCE IN THE NEWS. CS61A Lecture 21 Scheme TODAY REVIEW: DISPATCH DICTIONARIES DISPATCH DICTIONARIES 7/27/2012
COMPUTER SCIENCE IN THE NEWS CS6A Lecture 2 Scheme Jom Magrotker UC Berkeley EECS July 24, 202 http://spectrum.ieee.org/tech talk/robotics/artificial intelligence/a texas hold em tournament for ais 2 TODAY
More informationReducing Runtime Complexity of Long-Running Application Services via Dynamic Profiling and Dynamic Bytecode Adaptation for Improved Quality of Service
Reduing Runtime Complexity of Long-Running Appliation Servies via Dynami Profiling and Dynami Byteode Adaptation for Improved Quality of Servie ABSTRACT John Bergin Performane Engineering Laboratory University
More informationPrograms as Models. Procedural Paradigm. Class Methods. CS256 Computer Science I Kevin Sahr, PhD. Lecture 11: Objects
CS256 Computer Science I Kevin Sahr, PhD Lecture 11: Objects 1 Programs as Models remember: we write programs to solve realworld problems programs act as models of the real-world problem to be solved one
More informationCS 3 Midterm 1 Review
CS 3 Midterm 1 Review 1. Quick Evaluations Indicate what each of the following would return if typed into STK. If you think it would error, then please write ERROR. If you think that it would loop forever,
More informationCleanUp: Improving Quadrilateral Finite Element Meshes
CleanUp: Improving Quadrilateral Finite Element Meshes Paul Kinney MD-10 ECC P.O. Box 203 Ford Motor Company Dearborn, MI. 8121 (313) 28-1228 pkinney@ford.om Abstrat: Unless an all quadrilateral (quad)
More informationWarm-up! CS 3 Final Review. Predict the output. Predict the Output. Predict the output. Predict the output. What is your favorite color?
Warm-up! What is your favorite color? CS 3 Final Review Gilbert Chou, Jenny Franco and Colleen Lewis December 14, 2008 1-4pm GPB Brown Orange Yellow Green ((repeated bf 3) '(cat dog hat bat)) Predict the
More informationRegister Allocation III. Interference Graph Allocators. Coalescing. Granularity of Allocation (Renumber step in Briggs) Chaitin
Register Alloation III Last time Register alloation aross funtion alls Toay Register alloation options Interferene Graph Alloators Chaitin Briggs CS553 Leture Register Alloation III 1 CS553 Leture Register
More informationCS61A Notes Week 1A: Basics, order of evaluation, special forms, recursion
CS61A Notes Week 1A: Basics, order of evaluation, special forms, recursion Assorted Scheme Basics 1. The ( is the most important character in Scheme. If you have coded in other languages such as C or Java,
More informationCS 251 Intermediate Programming Methods and Classes
CS 251 Intermediate Programming Methods and Classes Brooke Chenoweth University of New Mexico Fall 2018 Methods An operation that can be performed on an object Has return type and parameters Method with
More informationCS 251 Intermediate Programming Methods and More
CS 251 Intermediate Programming Methods and More Brooke Chenoweth University of New Mexico Spring 2018 Methods An operation that can be performed on an object Has return type and parameters Method with
More informationLearning Convention Propagation in BeerAdvocate Reviews from a etwork Perspective. Abstract
CS 9 Projet Final Report: Learning Convention Propagation in BeerAdvoate Reviews from a etwork Perspetive Abstrat We look at the way onventions propagate between reviews on the BeerAdvoate dataset, and
More informationOutline: Software Design
Outline: Software Design. Goals History of software design ideas Design priniples Design methods Life belt or leg iron? (Budgen) Copyright Nany Leveson, Sept. 1999 A Little History... At first, struggling
More informationCapturing Large Intra-class Variations of Biometric Data by Template Co-updating
Capturing Large Intra-lass Variations of Biometri Data by Template Co-updating Ajita Rattani University of Cagliari Piazza d'armi, Cagliari, Italy ajita.rattani@diee.unia.it Gian Lua Marialis University
More informationCS61A Lecture 20 Object Oriented Programming: Implementation. Jom Magrotker UC Berkeley EECS July 23, 2012
CS61A Lecture 20 Object Oriented Programming: Implementation Jom Magrotker UC Berkeley EECS July 23, 2012 COMPUTER SCIENCE IN THE NEWS http://www.theengineer.co.uk/sectors/electronics/news/researchers
More informationCS61A Notes Week 6: Scheme1, Data Directed Programming You Are Scheme and don t let anyone tell you otherwise
CS61A Notes Week 6: Scheme1, Data Directed Programming You Are Scheme and don t let anyone tell you otherwise If you re not already crazy about Scheme (and I m sure you are), then here s something to get
More informationReading and Writing Files. Keeping Data
Reading and Writing Files Keeping Data Why do we use files? For permanently storing data. For dealing with information too large to fit in memory. Sequential Access Files Think of files as being stored
More informationEnvironment Diagrams. Administrivia. Agenda Step by Step Environment Diagram Stuff. The Rules. Practice it s on! What are The Rules?
Administrivia Project 3 Part A due 3/29 (Monday after SB) Part B due 4/5 (a week after) Everyone with a partner that wants a partner? Extra Office Hours on Sunday 3/28 in C50 from 1pm Midterm 3 on 4/14
More informationIntroduction to Java. Handout-1d. cs402 - Spring
Introduction to Java Handout-1d cs402 - Spring 2003 1 Methods (i) Method is the OOP name for function Must be declared always within a class optaccessqualifier returntype methodname ( optargumentlist )
More information"Good" vs. "Bad" Expressions. ; interp-expr FAE... -> FAE-Value
"Good" vs. "Bad" Expressions ; interp-expr FAE... -> FAE-Value 1 "Good" vs. "Bad" Expressions ; interp-expr FAE... -> FAE-Value Does interp-expr produce a value for all expressions? 2 "Good" vs. "Bad"
More informationCA Single Sign-On 12.x Proven Implementation Professional Exam (CAT-140) Study Guide Version 1.5
Study Guide Version 1.5 PROPRIETARY AND CONFIDENTIAL INFORMATION 2018 CA. All rights reserved. CA onfidential & proprietary information. For CA, CA Partner and CA Customer use only. No unauthorized use,
More informationParametric Abstract Domains for Shape Analysis
Parametri Abstrat Domains for Shape Analysis Xavier RIVAL (INRIA & Éole Normale Supérieure) Joint work with Bor-Yuh Evan CHANG (University of Maryland U University of Colorado) and George NECULA (University
More informationLecture 10: for, do, and switch
Lecture 10: for, do, and switch Jiajia Liu Recall the while Loop The while loop has the general form while ( boolean condition ) { The while loop is like a repeated if statement. It will repeat the statements
More informationThe Interpreter + Calling Functions. Scheme was designed by people. The Interpreter + Calling Functions. Clickers. Parentheses Matter We asked scheme
The Interpreter + Calling Functions 3 3 Why not 3 + 4 (+ 3 4) 7 (+ 3 4 5 6) 8 Here we were calling the function + The Interpreter + Calling Functions 4 (+ 3 (sqrt 6)) 7 (+ 3 4 5 6) 8 (sqrt 6) Not all procedures
More informationQuiz. Question #1: What is the value of the following expression? {+ 1 2} Wrong answer: 0 Wrong answer: 42. Answer: 3 1-4
Quiz Question #1: What is the value of the following expression? Wrong answer: 0 Wrong answer: 42 Answer: 3 {+ 1 2} 1-4 Quiz Question #2: What is the value of the following expression? Wrong answer: error
More informationON NANO REGULAR GENERALIZED STAR b-closed SET IN NANO TOPOLOGICAL SPACES
An Open Aess, Online International Journal Available at http://www.ibteh.org/jpms.htm eview Artile ON NANO EGULA GENEALIZED STA b-closed SET IN NANO TOPOLOGICAL SPACES *Smitha M.G. and Indirani K. Department
More informationExploring the Commonality in Feature Modeling Notations
Exploring the Commonality in Feature Modeling Notations Miloslav ŠÍPKA Slovak University of Tehnology Faulty of Informatis and Information Tehnologies Ilkovičova 3, 842 16 Bratislava, Slovakia miloslav.sipka@gmail.om
More information1 Disjoint-set data structure.
CS 124 Setion #4 Union-Fin, Greey Algorithms 2/20/17 1 Disjoint-set ata struture. 1.1 Operations Disjoint-set ata struture enale us to effiiently perform operations suh as plaing elements into sets, querying
More informationWelcome to the Bash Workshop!
Welcome to the Bash Workshop! If you prefer to work on your own, already know programming or are confident in your abilities, please sit in the back. If you prefer guided exercises, are completely new
More informationCA Privileged Access Manager 3.x Proven Implementation Professional Exam (CAT-661) Study Guide Version 1.0
Exam (CAT-661) Study Guide Version 1.0 PROPRIETARY AND CONFIDENTIAL INFMATION 2018 CA. All rights reserved. CA onfidential & proprietary information. For CA, CA Partner and CA Customer use only. No unauthorized
More information9.4 Exponential Growth and Decay Functions
Setion 9. Eponential Growth and Dea Funtions 56 9. Eponential Growth and Dea Funtions S Model Eponential Growth. Model Eponential Dea. Now that we an graph eponential funtions, let s learn about eponential
More informationarxiv: v1 [cs.db] 13 Sep 2017
An effiient lustering algorithm from the measure of loal Gaussian distribution Yuan-Yen Tai (Dated: May 27, 2018) In this paper, I will introdue a fast and novel lustering algorithm based on Gaussian distribution
More informationCC PROCESAMIENTO MASIVO DE DATOS OTOÑO Lecture 7: Information Retrieval II. Aidan Hogan
CC5212-1 PROCESAMIENTO MASIVO DE DATOS OTOÑO 2017 Lecture 7: Information Retrieval II Aidan Hogan aidhog@gmail.com How does Google know about the Web? Inverted Index: Example 1 Fruitvale Station is a 2013
More informationp[4] p[3] p[2] p[1] p[0]
CMSC 425 : Sring 208 Dave Mount and Roger Eastman Homework Due: Wed, Marh 28, :00m. Submit through ELMS as a df file. It an either be distilled from a tyeset doument or handwritten, sanned, and enhaned
More informationAnnouncements for the Class
Lecture 2 Classes Announcements for the Class Readings Section 1.4, 1.5 in text Section 3.1 in text Optional: PLive CD that comes with text References in text Assignment Assignment 1 due next week Due
More informationContextualization as an Abstraction Mechanism for Conceptual Modeling
Contextualization as an Abstration Mehanism for Coneptual Modeling Manos Theodorakis 1 2, Anastasia Analyti 1, Panos Constantopoulos 1 2, and Niolas Spyratos 3 1 Institute of Computer Siene, FORTH, P.O.Box
More informationObjective-C: An Introduction (pt 1) Tennessee Valley Apple Developers Saturday CodeJam July 24, 2010 August 7, 2010
Objective-C: An Introduction (pt 1) Tennessee Valley Apple Developers Saturday CodeJam July 24, 2010 August 7, 2010 What is Objective-C? Objective-C is an object-oriented programming language that adds
More informationConcepts Review. 2. A program is the implementation of an algorithm in a particular computer language, like C and C++.
Concepts Review 1. An algorithm is a sequence of steps to solve a problem. 2. A program is the implementation of an algorithm in a particular computer language, like C and C++. 3. A flowchart is the graphical
More informationWhere The Objects Roam
CS61A, Spring 2006, Wei Tu (Based on Chung s Notes) 1 CS61A Week 8 Where The Objects Roam (v1.0) Paradigm Shift (or: The Rabbit Dug Another Hole) And here we are, already ready to jump into yet another
More informationIn this lab you will write a program that asks the user for the name of a file, and then prints a concordance for that file.
About Lab 7 In this lab you will write a program that asks the user for the name of a file, and then prints a concordance for that file. A concordance is a kind of index to a piece of text -- it lists
More informationQuiz 1: Functions and Procedures
Quiz 1: Functions and Procedures Outline Basics Control Flow While Loops Expressions and Statements Functions Primitive Data Types 3 simple data types: number, string, boolean Numbers store numerical data
More informationFunctions & First Class Function Values
Functions & First Class Function Values PLAI 1st ed Chapter 4, PLAI 2ed Chapter 5 The concept of a function is itself very close to substitution, and to our with form. Consider the following morph 1 {
More informationFunctions and Decomposition
Unit 4 Functions and Decomposition Learning Outcomes Design and implement functions to carry out a particular task. Begin to evaluate when it is necessary to split some work into functions. Locate the
More informationLecture 21: The Many Hats of Scala: OOP 10:00 AM, Mar 14, 2018
CS18 Integrated Introduction to Computer Science Fisler, Nelson Lecture 21: The Many Hats of Scala: OOP 10:00 AM, Mar 14, 2018 Contents 1 Mutation in the Doghouse 1 1.1 Aside: Access Modifiers..................................
More informationC++ Important Questions with Answers
1. Name the operators that cannot be overloaded. sizeof,.,.*,.->, ::,? 2. What is inheritance? Inheritance is property such that a parent (or super) class passes the characteristics of itself to children
More informationCreating Groups for Webmail
Creating Groups for Webmail Firstly, what is a group and why create one? Groups are a collection of email addresses and are generally used to send email to a particular set of people. In other words, a
More information- 1 - Handout #33 March 14, 2014 JAR Files. CS106A Winter
CS106A Winter 2013-2014 Handout #33 March 14, 2014 JAR Files Handout by Eric Roberts, Mehran Sahami, and Brandon Burr Now that you ve written all these wonderful programs, wouldn t it be great if you could
More informationwith respect to the normal in each medium, respectively. The question is: How are θ
Prof. Raghuveer Parthasarathy University of Oregon Physis 35 Winter 8 3 R EFRACTION When light travels from one medium to another, it may hange diretion. This phenomenon familiar whenever we see the bent
More informationSpace War Class Diagram. Elements of OOP. How to design interactions between objects. Space War Class Diagram with Inheritance
Elements of OOP Object Smart data structure Set of state variables Set of methods for manipulating state variables Class: Specifies the common behavior of entities Instance: A particular object or entity
More informationRegister Allocation III. Interference Graph Allocators. Computing the Interference Graph (in MiniJava compiler)
Register Alloation III Announements Reommen have interferene graph onstrution working by Monay Last leture Register alloation aross funtion alls Toay Register alloation options Interferene Graph Alloators
More informationCA Test Data Manager 4.x Implementation Proven Professional Exam (CAT-681) Study Guide Version 1.0
Implementation Proven Professional Study Guide Version 1.0 PROPRIETARY AND CONFIDENTIAL INFORMATION 2017 CA. All rights reserved. CA onfidential & proprietary information. For CA, CA Partner and CA Customer
More informationDepartment of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY Fall Test I Solutions
Department of Eletrial Engineering and Computer iene MAACHUETT INTITUTE OF TECHNOLOGY 6.035 Fall 2016 Test I olutions 1 I Regular Expressions and Finite-tate Automata For Questions 1, 2, and 3, let the
More informationA DYNAMIC ACCESS CONTROL WITH BINARY KEY-PAIR
Malaysian Journal of Computer Siene, Vol 10 No 1, June 1997, pp 36-41 A DYNAMIC ACCESS CONTROL WITH BINARY KEY-PAIR Md Rafiqul Islam, Harihodin Selamat and Mohd Noor Md Sap Faulty of Computer Siene and
More informationAllowing access to Outlook 2000 folders Version 1.00
Allowing access to Outlook 2000 folders Version 1.00 Need to Know TM To allow another network user access to some or all of your Outlook folders you need to complete two processes. One in your Outlook
More informationCS 33. Architecture and the OS. CS33 Intro to Computer Systems XIX 1 Copyright 2017 Thomas W. Doeppner. All rights reserved.
CS 33 Architecture and the OS CS33 Intro to Computer Systems XIX 1 Copyright 2017 Thomas W. Doeppner. All rights reserved. The Operating System My Program Mary s Program Bob s Program OS CS33 Intro to
More informationExtracting Partition Statistics from Semistructured Data
Extrating Partition Statistis from Semistrutured Data John N. Wilson Rihard Gourlay Robert Japp Mathias Neumüller Department of Computer and Information Sienes University of Strathlyde, Glasgow, UK {jnw,rsg,rpj,mathias}@is.strath.a.uk
More informationage = 23 age = age + 1 data types Integers Floating-point numbers Strings Booleans loosely typed age = In my 20s
Intro to Python Python Getting increasingly more common Designed to have intuitive and lightweight syntax In this class, we will be using Python 3.x Python 2.x is still very popular, and the differences
More informationDiscrete sequential models and CRFs. 1 Case Study: Supervised Part-of-Speech Tagging
0-708: Probabilisti Graphial Models 0-708, Spring 204 Disrete sequential models and CRFs Leturer: Eri P. Xing Sribes: Pankesh Bamotra, Xuanhong Li Case Study: Supervised Part-of-Speeh Tagging The supervised
More informationI put a shortcut onto your desktop, the screen that you look at after you log in.
In this lesson, you ll learn to create your first program. I put a shortcut onto your desktop, the screen that you look at after you log in. When you double-click on this shortcut, a folder will open.
More informationProgramming for Engineers in Python
Programming for Engineers in Python Lecture 5: Object Oriented Programming Autumn 2011-12 1 Lecture 4 Highlights Tuples, Dictionaries Sorting Lists Modular programming Data analysis: text categorization
More informationLAB 4: Operations on binary images Histograms and color tables
LAB 4: Operations on binary images Histograms an olor tables Computer Vision Laboratory Linköping University, Sween Preparations an start of the lab system You will fin a ouple of home exerises (marke
More informationUNIVERSITY of CALIFORNIA at Berkeley Department of Electrical Engineering and Computer Sciences Computer Sciences Division
UNIVERSITY of CALIFORNIA at Berkeley Department of Electrical Engineering and Computer Sciences Computer Sciences Division CS61A Kurt Meinz Structure and Interpretation of Computer Programs Summer 2002
More informationObject-Oriented Programming
Object-Oriented Programming In C++ classes provide the functionality necessary to use object-oriented programming OOP is a particular way of organizing computer programs It doesn t allow you to do anything
More informationAbstract. We describe a parametric hybrid Bezier patch that, in addition. schemes are local in that changes to part of the data only aect portions of
A Parametri Hyrid Triangular Bezier Path Stephen Mann and Matthew Davidhuk Astrat. We desrie a parametri hyrid Bezier path that, in addition to lending interior ontrol points, lends oundary ontrol points.
More informationA+ Computer Science -
An array is a group of items all of the same type which are accessed through a single identifier. int[] nums = new int[10]; 0 1 2 3 4 5 6 7 8 9 nums 0 0 0 0 0 0 0 0 0 0 int[] nums; nums null null nothing
More informationA function is a named piece of code that performs a specific task. Sometimes functions are called methods, procedures, or subroutines (like in LC-3).
CIT Intro to Computer Systems Lecture # (//) Functions As you probably know from your other programming courses, a key part of any modern programming language is the ability to create separate functions
More informationEXPRESSIONS, STATEMENTS, AND FUNCTIONS 1
EXPRESSIONS, STATEMENTS, AND FUNCTIONS 1 COMPUTER SCIENCE 61A June 24, 2014 0.1 Warmup What Would Python Do? >>> x = 6 >>> def square(x):... return x * x >>> square(x) >>> max(pow(2, 3), square(-5)) -
More informationBasic Principles of OO. Example: Ice/Water Dispenser. Systems Thinking. Interfaces: Describing Behavior. People's Roles wrt Systems
Basics of OO Programming with Java/C# Basic Principles of OO Abstraction Encapsulation Modularity Breaking up something into smaller, more manageable pieces Hierarchy Refining through levels of abstraction
More informationLesson 12: OOP #2, Accessor Methods (W03D4)
Lesson 12: OOP #2, Accessor Methods (W03D4) Balboa High School Michael Ferraro September 3, 2015 1 / 29 Do Now In your driver class from last class, create another new Person object with these characteristics:
More information