Object Semantics Lecture 2


 Justin McKenzie
 4 years ago
 Views:
Transcription
1 Object Semntics Lecture 2 The objectives of this lecture re to: to help you become fmilir with the bsic runtime mechnism common to ll objectoriented lnguges (but with prticulr focus on Jv): vribles, object references, ssignments, mutbility, nd so on; to introduce digrmmtic nottion, object digrms for describing snpshots (tht is, prticulr configurtions of objects in the hep); 1 to mke you wre, in pssing, of some tricky issues tht we ll return to lter in more detil, nd which turn out to be of fundmentl importnce: equlity, rep invrints nd exposure. When you ve completed this mteril, you should hve solid grsp of wht hppens when Jv code executes, so tht you cn predict wht some code will do without running it. 1 Vribles, References nd Objects Some types of objects cn be creted with literls. Wht hppens when you run this? 1. String = "zeeb"; 2. String b =.touppercse (); 3. System.out.println (b); It prints ZEEB. Sttement 2 is cll to the method touppercse. The method hs receiver. The cll results in the cretion of fresh string tht is then bound to the vrible b. We cn drw the result of the first two sttements s n object digrm, showing tht is reference to n object of type String (nd not the string itself, or slot tht holds it); similrly for b. b "zeeb" "ZEEB" 1 Wht does this do? 1. String = "zeeb"; 2..toUpperCse (); 3. System.out.println (); Lter, we will introduce object models tht re fr more useful nd which describe sets of snpshots. 1
2 It prints zeeb. Sttement 2 cretes fresh string tht gets thrown wy since it is bound to no vrible. The string object referenced by is not chnged: strings re immutble. Wht bout this? String = "zeeb"; =.touppercse (); System.out.println (); Agin, no object chnges. But is mde to refer to the new object by the ssignment in Sttement 2, so the result is ZEEB. "zeeb" "ZEEB" 2 Alising, Mutbility nd Reference Equlity Jv provides vriety of collections s prt of its stndrd librry. A vector is like n rry, but it cn grow nd shrink dynmiclly. An exmple of using vector: 1. Vector v = new Vector (); 2. Vector k = v; 3. String = "zeeb"; 4. v.dd (); 5. k.dd (.touppercse()); 6. System.out.println (v.lstelement ()); The method lstelement is like the string method touppercse: it hs no effect on the receiver nd returns reference to n object (in this cse, the lst element of the vector v). The method dd, on the other hnd, tkes n rgument the string. Unlike touppercse, the method dd does not return n object, but chnges or muttes its receiver object. Vectors, unlike strings, cn chnge, nd re thus sid to be mutble. The code bove prints ZEEB, since fter Sttement 2 the two vribles k nd v re nmes for the sme vector object: they re sid to be lises. The clls to dd mutte the one vector object, first dding the object for the lower cse string, then the upper cse string. The chnges re visible through both nmes, so in Sttements 4 to 6 we could ctully permute the nmes k nd v without ny chnge in behvior. Here is the object digrm: v k (Vector) elts[0] "zeeb" "ZEEB" elts[1] 2
3 Alising is pervsive in lnguges like Jv, nd very useful. But it dds lot of complexity. For one thing, it breks the rule tht sttement ffects only the vribles it mentions. Just becuse v isn t mentioned in Sttement 5 doesn t men tht it won t ffect the result of sttement 6 which mentions only v nd not k. How cn we observe the lising more directly? By testing equlity: Vector v = new Vector (); Vector k = v; if (v == k) System.out.println ("sme"); System.out.println ("different"); which results in sme being printed. The builtin == test tells you whether two references re for the sme object, so it s often clled test of reference equlity. Wht does this do? Vector v = new Vector (); Vector k = new Vector (); if (v == k) System.out.println ("sme"); System.out.println ("different"); It prints different, becuse v nd k re distinct objects. It s fundmentl property of constructors tht the objects they return relly re fresh. In fct, the grbge collector cn recycle n object, but only if there is no reference to it still round. This ensures tht even if objects re recycled, we cn never tell. A puzzle: wht does this do? String = "zeeb"; String b = "zeeb"; if ( == b) System.out.println ("sme"); System.out.println ("different"); Strngely, this prints sme, becuse the Jv virtul mchine utomticlly interns string literls: if it cn tell tht two string literls hve the sme sequence of chrcters, it only lloctes one object. You d be right to think this is bit confusing; it s performnce optimiztion. In fct, it s very bd form to test reference equlity of immutble objects, unless you re doing something subtle with memory mngement. Argubly it s design defect of Jv tht you cn even observe whether two immutble objects re the sme or not. So how should you compre two immutble objects? With n equls method. The String clss provides method equls tht tells you whether two strings contin the sme sequence of chrcters or not. This code String = "zeeb"; String b =.touppercse (); 3
4 if (b.equls ("ZEEB")) System.out.println ("sme chrcters"); System.out.println ("different chrcters"); prints sme chrcters. When we study inheritnce, you ll lern tht every clss utomticlly inherits n equls method, so you might think you don t need to write one. But it s lmost never wht you wnt, so whenever you design clss, one of the first things you ll need to figure out is when two objects of the clss should be considered equl to one nother. Here re some questions: Would you expect tht generlly x == y implies x.equls (y)? Yes, it should. Becuse the equls method cn be userdefined, just like ny other method, you could mke it behve in ny wy you wnted. On mutble type, it might even mutte the object! But tht would be disstrous: there s generic contrct tht clients expect equls to obey. More on this lter. Why would lnguge hve immutble types? Becuse lising is complicted, nd when you use immutble types, the issue doesn t rise. Also, code built with immutble types cn sometimes be more efficient. So if immutble types re so much simpler, why hve mutble types? Becuse muttion gives very useful form of modulrity: it llows you to mke locl chnges to structure. And muttion is often nturl wy to model entities in the rel world: trnsction on bnk ccount chnges it; it doesn t produce new bnk ccount. 3 Null References Wht does this do? String = null; System.out.println (); It prints null. The keyword null denotes vlue tht cn be tken on by n object reference. It mens tht the reference does not in fct refer to ny object. There is no null object! But note tht this code 1. String = null; 2. String b =.touppercse (); 3. System.out.println (b); behves quite differently. It throws NullPointerException on Sttement 2. We ll lern bout exceptions lter, but for now, ll you need to understnd is tht Sttement 2 filed, when the expression.touppercse() ws evluted. Wht s the difference? The receiver to method cll cn never be null, becuse it identifies the object tht receives the cll nd tht hs to be some object. So.toUpperCse() fils when is null. But in the previous exmple, System.out.println() is OK when is null, since reference is n rgument, nd this is specil kind of method (relly just plin old procedure) tht doesn t hve receiver. 4
5 You cn write method tht tests whether n rgument is null nd does something pproprite. Dereferencing null is common progrmming mistke in Jv. To void it, you cn check whether reference is null before you ttempt to cll method. In generl, rther thn ctching nulls nd treting them specilly, it s better to void creting null references in the first plce. You ll lern bout tht when we discuss representtion invrints. Sometimes you cn t void it, nd then it s importnt to document where the null references my occur. Tht s one reson specifictions re importnt: they cn spre you runtime errors nd unnecessry checks. Here re some questions: In generl, would you expect.equls (b) to be substitutble for b.equls ()? No, becuse when is null nd b is not, the first will throw n exception, nd the second will (usully) return flse. OK, smrty pnts, leve nulls lone. Would you then expect.equls (b) nd b.equls () to hve the sme effect? Yes, you would. In fct, this property of the equls method clled symmetry is demnded by Jv s object contrct. We ll see lter when we study equlity in depth wht other properties re required, nd how esy it is to mess up nd write n equls method tht does not hve these properties. 4 Userdefined Clsses nd Fields Let s mke some objects of our own: clss Trns { int mount; Dte dte; } This code declres clss, kind of templte for mking objects. These objects re going to represent trnsctions in bnking system. Ech object hs n integer mount (which my be negtive for withdrwl), nd dte/time stmp to mrk the moment t which the trnsction occurred. The clss declres two fields or instnce vribles, mount nd dte. Ech object of the clss will contin two references, one to n integer nd one to dte. The type Dte is clss from the Jv librry; it s predefined like String (but not prt of the lnguge definition the wy String is). The type int is rther strnge best. It s not clss t ll, but primitive type. Vribles or fields of type int don t hold references to integer objects; they hold the integers themselves. You my think it bit jrring tht n objectoriented lnguge hs this rther unobjectoriented notion in it (nd mny people shre your opinion). Sometimes we ll ctully need n integer tht s n object, nd in tht cse we cn use the clss Integer from the Jv librry. How do you get from n int to n Integer nd bck? To crete n Integer, you use constructor: int_i = 5; Integer obj_i = new Integer (i); nd to extrct the primitive integer from n integer object, you cll method: 5
6 int i = obj_i.intvlue(); A little cumbersome, so tht s one reson people don t like this design. If we run this code: 1. Trns t = new Trns (); 2. t.mount = 20; 3. t.dte = new Dte (); fresh object gets creted, nd its fields re set, resulting in this configurtion: t dte (Dte) (Trns) mount The expression on the righthnd side of Sttement 1 is cll to constructor: it mkes new object with defult vlues for the fields. In this cse, it cretes Trns object with zero for the mount nd null for dte. The Sttement 2 is clled setter: it sets the vlue of the field mount of the object referred to by t. Sttement 3 hs nother constructor cll on the right; creting new Dte, which by defult cretes Dte object representing the moment t which the object is itself creted. But it s lso setter: it sets the dte field of t to point to this new dte Userdefined Constructors So we ve succeeded in mking Trns object representing deposit of twenty dollrs t this moment in time. The wy we did it creting n uninitilized object nd then setting its fields is not good one, however. We ll wnt our trnsctions to be wellformed; for exmple we won t wnt to hve trnsctions tht don t hve dtes. And perhps we ll wnt every trnsction to hve nonzero mount. Lter, we ll study these kinds of invrints in much more depth. For now, just observe tht immeditely fter Sttement 1 we hve trnsction object tht is not well formed. When n object is creted, its fields re initilized to defult vlues: null for object references, nd zero for integers. So t.mount will be zero, nd t.dte will be null. These defult vlues re rrely wht you wnt; fter ll, which vlues mke sense will depend on the problem we re trying to solve. In this cse, you d hve to know something bout bnking to know tht trnsction of zero dollrs is illformed. Is it big del tht there s bogus trnsction object hnging round between Sttements 1 nd 2? Yes, it is, nd here s why. We d like the responsibility for ensuring tht objects of the clss Trns re well formed to be hndled entirely within the Trns clss. In our progrm, you need to check not only the code of the clss, but lso the code tht uses the clss. At this scle, it s not disster. But in much lrger progrm, you need s much modulrity s you cn get, confining tricky spects of the progrm s much s possible to smll res of the code. To solve this problem, we declre our own constructor: clss Trns { int mount; 6
7 } Dte dte; Trns (int, Dte d) {mount = ; dte = d;} This constructor tkes n mount nd dte s rguments, nd cretes trnsction object with tht mount nd dte. If I d wnted to ensure tht the mount of trnsction is nonzero, I could hve dded check tht threw n exception if the mount ws zero; we ll see how to do tht lter. A peculir, but useful, property of constructors is tht hving defined our own constructor, the defult constructor the one tht just initilizes ech field to defult vlues becomes no longer vilble. So Sttement 1 will no longer compile. Insted, we cn write Trns t = new Trns (20, new Dte ()); nd tht one line of code will hve the effect tht Sttements 1 to 3 hd previously. (We hven t fully solved the problem of modulrizing the invrint of Trns, by the wy. You cn still mess up Trns object by setting its dte field to null from outside, for exmple. The first step to prevent this is to mke use of Jv s ccessibility mechnisms: we cn mke the fields privte so they cn t be red or written from outside the clss. In fct, this turns out not to be enough, s we ll lern when we study dt bstrction.) 6 Conclusion Now we ve seen ll the key notions for how objects re mnipulted in n objectoriented lnguge. We ve seen how they re creted; how references re bound to objects; nd how their fields re set. We ve mentioned the two fundmentl kinds of equlity reference equlity (tested with ==) nd object equlity (tested with n equls method bout which we ll hve much more to sy lter. These mechnisms comprise one importnt prt of wht it mens to be object oriented. 7
PROF. BOYAN KOSTADINOV NEW YORK CITY COLLEGE OF TECHNOLOGY, CUNY
MAT 0630 INTERNET RESOURCES, REVIEW OF CONCEPTS AND COMMON MISTAKES PROF. BOYAN KOSTADINOV NEW YORK CITY COLLEGE OF TECHNOLOGY, CUNY Contents 1. ACT Compss Prctice Tests 1 2. Common Mistkes 2 3. Distributive
More informationPolynomial Functions. Polynomial functions in one variable can be written in expanded form as ( )
Polynomil Functions Polynomil functions in one vrible cn be written in expnded form s n n 1 n 2 2 f x = x + x + x + + x + x+ n n 1 n 2 2 1 0 Exmples of polynomils in expnded form re nd 3 8 7 4 = 5 4 +
More informationUse Geometry Expressions to create a more complex locus of points. Find evidence for equivalence using Geometry Expressions.
Lerning Objectives Loci nd Conics Lesson 3: The Ellipse Level: Preclculus Time required: 120 minutes In this lesson, students will generlize their knowledge of the circle to the ellipse. The prmetric nd
More informationAlgebra Review. How well do you remember your algebra?
Algebr Review How well do you remember your lgebr? 1 The Order of Opertions Wht do we men when we write + 4? If we multiply we get 6 nd dding 4 gives 10. But, if we dd + 4 = 7 first, then multiply by then
More informationMath 135 Circles and Completing the Square Examples
Mth 135 Circles nd Completing the Squre Exmples A perfect squre is number such tht = b 2 for some rel number b. Some exmples of perfect squres re 4 = 2 2, 16 = 4 2, 169 = 13 2. We wish to hve method for
More informationExample 27.1 Draw a Venn diagram to show the relationship between counting numbers, whole numbers, integers, and rational numbers.
2 Rtionl Numbers Integers such s 5 were importnt when solving the eqution x+5 = 0. In similr wy, frctions re importnt for solving equtions like 2x = 1. Wht bout equtions like 2x + 1 = 0? Equtions of this
More informationProtocol Analysis. 17654/17764 Analysis of Software Artifacts Kevin Bierhoff
Protocol Anlysis 17654/17764 Anlysis of Softwre Artifcts Kevin Bierhoff TkeAwys Protocols define temporl ordering of events Cn often be cptured with stte mchines Protocol nlysis needs to py ttention
More informationLINEAR TRANSFORMATIONS AND THEIR REPRESENTING MATRICES
LINEAR TRANSFORMATIONS AND THEIR REPRESENTING MATRICES DAVID WEBB CONTENTS Liner trnsformtions 2 The representing mtrix of liner trnsformtion 3 3 An ppliction: reflections in the plne 6 4 The lgebr of
More informationOperations with Polynomials
38 Chpter P Prerequisites P.4 Opertions with Polynomils Wht you should lern: Write polynomils in stndrd form nd identify the leding coefficients nd degrees of polynomils Add nd subtrct polynomils Multiply
More informationHomework 3 Solutions
CS 341: Foundtions of Computer Science II Prof. Mrvin Nkym Homework 3 Solutions 1. Give NFAs with the specified numer of sttes recognizing ech of the following lnguges. In ll cses, the lphet is Σ = {,1}.
More informationFactoring Polynomials
Fctoring Polynomils Some definitions (not necessrily ll for secondry school mthemtics): A polynomil is the sum of one or more terms, in which ech term consists of product of constnt nd one or more vribles
More information1.00/1.001 Introduction to Computers and Engineering Problem Solving Fall 2011  Final Exam
1./1.1 Introduction to Computers nd Engineering Problem Solving Fll 211  Finl Exm Nme: MIT Emil: TA: Section: You hve 3 hours to complete this exm. In ll questions, you should ssume tht ll necessry pckges
More informationRegular Sets and Expressions
Regulr Sets nd Expressions Finite utomt re importnt in science, mthemtics, nd engineering. Engineers like them ecuse they re super models for circuits (And, since the dvent of VLSI systems sometimes finite
More informationIntegration by Substitution
Integrtion by Substitution Dr. Philippe B. Lvl Kennesw Stte University August, 8 Abstrct This hndout contins mteril on very importnt integrtion method clled integrtion by substitution. Substitution is
More information4.11 Inner Product Spaces
314 CHAPTER 4 Vector Spces 9. A mtrix of the form 0 0 b c 0 d 0 0 e 0 f g 0 h 0 cnnot be invertible. 10. A mtrix of the form bc d e f ghi such tht e bd = 0 cnnot be invertible. 4.11 Inner Product Spces
More informationBinary Representation of Numbers Autar Kaw
Binry Representtion of Numbers Autr Kw After reding this chpter, you should be ble to: 1. convert bse rel number to its binry representtion,. convert binry number to n equivlent bse number. In everydy
More informationExperiment 6: Friction
Experiment 6: Friction In previous lbs we studied Newton s lws in n idel setting, tht is, one where friction nd ir resistnce were ignored. However, from our everydy experience with motion, we know tht
More informationGraphs on Logarithmic and Semilogarithmic Paper
0CH_PHClter_TMSETE_ 3//00 :3 PM Pge Grphs on Logrithmic nd Semilogrithmic Pper OBJECTIVES When ou hve completed this chpter, ou should be ble to: Mke grphs on logrithmic nd semilogrithmic pper. Grph empiricl
More information9 CONTINUOUS DISTRIBUTIONS
9 CONTINUOUS DISTIBUTIONS A rndom vrible whose vlue my fll nywhere in rnge of vlues is continuous rndom vrible nd will be ssocited with some continuous distribution. Continuous distributions re to discrete
More information6.2 Volumes of Revolution: The Disk Method
mth ppliction: volumes of revolution, prt ii Volumes of Revolution: The Disk Method One of the simplest pplictions of integrtion (Theorem ) nd the ccumultion process is to determine soclled volumes of
More informationTreatment Spring Late Summer Fall 0.10 5.56 3.85 0.61 6.97 3.01 1.91 3.01 2.13 2.99 5.33 2.50 1.06 3.53 6.10 Mean = 1.33 Mean = 4.88 Mean = 3.
The nlysis of vrince (ANOVA) Although the ttest is one of the most commonly used sttisticl hypothesis tests, it hs limittions. The mjor limittion is tht the ttest cn be used to compre the mens of only
More informationMathematics. Vectors. hsn.uk.net. Higher. Contents. Vectors 128 HSN23100
hsn.uk.net Higher Mthemtics UNIT 3 OUTCOME 1 Vectors Contents Vectors 18 1 Vectors nd Sclrs 18 Components 18 3 Mgnitude 130 4 Equl Vectors 131 5 Addition nd Subtrction of Vectors 13 6 Multipliction by
More informationVectors 2. 1. Recap of vectors
Vectors 2. Recp of vectors Vectors re directed line segments  they cn be represented in component form or by direction nd mgnitude. We cn use trigonometry nd Pythgors theorem to switch between the forms
More informationSPECIAL PRODUCTS AND FACTORIZATION
MODULE  Specil Products nd Fctoriztion 4 SPECIAL PRODUCTS AND FACTORIZATION In n erlier lesson you hve lernt multipliction of lgebric epressions, prticulrly polynomils. In the study of lgebr, we come
More informationExample A rectangular box without lid is to be made from a square cardboard of sides 18 cm by cutting equal squares from each corner and then folding
1 Exmple A rectngulr box without lid is to be mde from squre crdbord of sides 18 cm by cutting equl squres from ech corner nd then folding up the sides. 1 Exmple A rectngulr box without lid is to be mde
More informationPhysics 43 Homework Set 9 Chapter 40 Key
Physics 43 Homework Set 9 Chpter 4 Key. The wve function for n electron tht is confined to x nm is. Find the normliztion constnt. b. Wht is the probbility of finding the electron in. nmwide region t x
More information9.3. The Scalar Product. Introduction. Prerequisites. Learning Outcomes
The Sclr Product 9.3 Introduction There re two kinds of multipliction involving vectors. The first is known s the sclr product or dot product. This is soclled becuse when the sclr product of two vectors
More information5.2. LINE INTEGRALS 265. Let us quickly review the kind of integrals we have studied so far before we introduce a new one.
5.2. LINE INTEGRALS 265 5.2 Line Integrls 5.2.1 Introduction Let us quickly review the kind of integrls we hve studied so fr before we introduce new one. 1. Definite integrl. Given continuous relvlued
More informationSmall Business Networking
Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd processes. Introducing technology
More informationReasoning to Solve Equations and Inequalities
Lesson4 Resoning to Solve Equtions nd Inequlities In erlier work in this unit, you modeled situtions with severl vriles nd equtions. For exmple, suppose you were given usiness plns for concert showing
More informationWords Symbols Diagram. abcde. a + b + c + d + e
Logi Gtes nd Properties We will e using logil opertions to uild mhines tht n do rithmeti lultions. It s useful to think of these opertions s si omponents tht n e hooked together into omplex networks. To
More informationSmall Business Networking
Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd business. Introducing technology
More informationIntegration. 148 Chapter 7 Integration
48 Chpter 7 Integrtion 7 Integrtion t ech, by supposing tht during ech tenth of second the object is going t constnt speed Since the object initilly hs speed, we gin suppose it mintins this speed, but
More informationand thus, they are similar. If k = 3 then the Jordan form of both matrices is
Homework ssignment 11 Section 7. pp. 24925 Exercise 1. Let N 1 nd N 2 be nilpotent mtrices over the field F. Prove tht N 1 nd N 2 re similr if nd only if they hve the sme miniml polynomil. Solution: If
More informationSmall Business Networking
Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd business. Introducing technology
More informationAntiSpyware Enterprise Module 8.5
AntiSpywre Enterprise Module 8.5 Product Guide Aout the AntiSpywre Enterprise Module The McAfee AntiSpywre Enterprise Module 8.5 is n ddon to the VirusScn Enterprise 8.5i product tht extends its ility
More informationBasic Analysis of Autarky and Free Trade Models
Bsic Anlysis of Autrky nd Free Trde Models AUTARKY Autrky condition in prticulr commodity mrket refers to sitution in which country does not engge in ny trde in tht commodity with other countries. Consequently
More informationMATH 150 HOMEWORK 4 SOLUTIONS
MATH 150 HOMEWORK 4 SOLUTIONS Section 1.8 Show tht the product of two of the numbers 65 1000 8 2001 + 3 177, 79 1212 9 2399 + 2 2001, nd 24 4493 5 8192 + 7 1777 is nonnegtive. Is your proof constructive
More informationLecture 3 Gaussian Probability Distribution
Lecture 3 Gussin Probbility Distribution Introduction l Gussin probbility distribution is perhps the most used distribution in ll of science. u lso clled bell shped curve or norml distribution l Unlike
More informationHow To Network A Smll Business
Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd processes. Introducing technology
More informationSmall Business Networking
Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd processes. Introducing technology
More informationHelicopter Theme and Variations
Helicopter Theme nd Vritions Or, Some Experimentl Designs Employing Pper Helicopters Some possible explntory vribles re: Who drops the helicopter The length of the rotor bldes The height from which the
More informationData replication in mobile computing
Technicl Report, My 2010 Dt repliction in mobile computing Bchelor s Thesis in Electricl Engineering Rodrigo Christovm Pmplon HALMSTAD UNIVERSITY, IDE SCHOOL OF INFORMATION SCIENCE, COMPUTER AND ELECTRICAL
More informationEQUATIONS OF LINES AND PLANES
EQUATIONS OF LINES AND PLANES MATH 195, SECTION 59 (VIPUL NAIK) Corresponding mteril in the ook: Section 12.5. Wht students should definitely get: Prmetric eqution of line given in pointdirection nd twopoint
More informationSolving BAMO Problems
Solving BAMO Problems Tom Dvis tomrdvis@erthlink.net http://www.geometer.org/mthcircles Februry 20, 2000 Abstrct Strtegies for solving problems in the BAMO contest (the By Are Mthemticl Olympid). Only
More informationbaby on the way, quit today
for mumstobe bby on the wy, quit tody WHAT YOU NEED TO KNOW bout smoking nd pregnncy uitting smoking is the best thing you cn do for your bby We know tht it cn be difficult to quit smoking. But we lso
More informationLecture 5. Inner Product
Lecture 5 Inner Product Let us strt with the following problem. Given point P R nd line L R, how cn we find the point on the line closest to P? Answer: Drw line segment from P meeting the line in right
More informationVirtual Machine. Part II: Program Control. Building a Modern Computer From First Principles. www.nand2tetris.org
Virtul Mchine Prt II: Progrm Control Building Modern Computer From First Principles www.nnd2tetris.org Elements of Computing Systems, Nisn & Schocken, MIT Press, www.nnd2tetris.org, Chpter 8: Virtul Mchine,
More informationModule Summary Sheets. C3, Methods for Advanced Mathematics (Version B reference to new book) Topic 2: Natural Logarithms and Exponentials
MEI Mthemtics in Ection nd Instry Topic : Proof MEI Structured Mthemtics Mole Summry Sheets C, Methods for Anced Mthemtics (Version B reference to new book) Topic : Nturl Logrithms nd Eponentils Topic
More informationA.7.1 Trigonometric interpretation of dot product... 324. A.7.2 Geometric interpretation of dot product... 324
A P P E N D I X A Vectors CONTENTS A.1 Scling vector................................................ 321 A.2 Unit or Direction vectors...................................... 321 A.3 Vector ddition.................................................
More informationLectures 8 and 9 1 Rectangular waveguides
1 Lectures 8 nd 9 1 Rectngulr wveguides y b x z Consider rectngulr wveguide with 0 < x b. There re two types of wves in hollow wveguide with only one conductor; Trnsverse electric wves
More informationTechniques for Requirements Gathering and Definition. Kristian Persson Principal Product Specialist
Techniques for Requirements Gthering nd Definition Kristin Persson Principl Product Specilist Requirements Lifecycle Mngement Elicit nd define business/user requirements Vlidte requirements Anlyze requirements
More informationBayesian Updating with Continuous Priors Class 13, 18.05, Spring 2014 Jeremy Orloff and Jonathan Bloom
Byesin Updting with Continuous Priors Clss 3, 8.05, Spring 04 Jeremy Orloff nd Jonthn Bloom Lerning Gols. Understnd prmeterized fmily of distriutions s representing continuous rnge of hypotheses for the
More informationDlNBVRGH + Sickness Absence Monitoring Report. Executive of the Council. Purpose of report
DlNBVRGH + + THE CITY OF EDINBURGH COUNCIL Sickness Absence Monitoring Report Executive of the Council 8fh My 4 I.I...3 Purpose of report This report quntifies the mount of working time lost s result of
More informationApplication Bundles & Data Plans
Appliction Appliction Bundles & Dt Plns We ve got plns for you. Trnsporttion compnies tody ren t onesizefitsll. Your fleet s budget, size nd opertions re unique. To meet the needs of your fleet nd help
More informationRotating DC Motors Part II
Rotting Motors rt II II.1 Motor Equivlent Circuit The next step in our consiertion of motors is to evelop n equivlent circuit which cn be use to better unerstn motor opertion. The rmtures in rel motors
More informationP.3 Polynomials and Factoring. P.3 an 1. Polynomial STUDY TIP. Example 1 Writing Polynomials in Standard Form. What you should learn
33337_0P03.qp 2/27/06 24 9:3 AM Chpter P Pge 24 Prerequisites P.3 Polynomils nd Fctoring Wht you should lern Polynomils An lgeric epression is collection of vriles nd rel numers. The most common type of
More informationHillsborough Township Public Schools Mathematics Department Computer Programming 1
Essentil Unit 1 Introduction to Progrmming Pcing: 15 dys Common Unit Test Wht re the ethicl implictions for ming in tody s world? There re ethicl responsibilities to consider when writing computer s. Citizenship,
More informationSection 74 Translation of Axes
62 7 ADDITIONAL TOPICS IN ANALYTIC GEOMETRY Section 74 Trnsltion of Aes Trnsltion of Aes Stndrd Equtions of Trnslted Conics Grphing Equtions of the Form A 2 C 2 D E F 0 Finding Equtions of Conics In the
More informationEcon 4721 Money and Banking Problem Set 2 Answer Key
Econ 472 Money nd Bnking Problem Set 2 Answer Key Problem (35 points) Consider n overlpping genertions model in which consumers live for two periods. The number of people born in ech genertion grows in
More information2. Transaction Cost Economics
3 2. Trnsction Cost Economics Trnsctions Trnsctions Cn Cn Be Be Internl Internl or or Externl Externl n n Orgniztion Orgniztion Trnsctions Trnsctions occur occur whenever whenever good good or or service
More information2 DIODE CLIPPING and CLAMPING CIRCUITS
2 DIODE CLIPPING nd CLAMPING CIRCUITS 2.1 Ojectives Understnding the operting principle of diode clipping circuit Understnding the operting principle of clmping circuit Understnding the wveform chnge of
More informationSection 54 Trigonometric Functions
5 Trigonometric Functions Section 5 Trigonometric Functions Definition of the Trigonometric Functions Clcultor Evlution of Trigonometric Functions Definition of the Trigonometric Functions Alternte Form
More informationLECTURE #05. Learning Objective. To describe the geometry in and around a unit cell in terms of directions and planes.
LECTURE #05 Chpter 3: Lttice Positions, Directions nd Plnes Lerning Objective To describe the geometr in nd round unit cell in terms of directions nd plnes. 1 Relevnt Reding for this Lecture... Pges 6483.
More informationWarmup for Differential Calculus
Summer Assignment Wrmup for Differentil Clculus Who should complete this pcket? Students who hve completed Functions or Honors Functions nd will be tking Differentil Clculus in the fll of 015. Due Dte:
More informationJava CUP. Java CUP Specifications. User Code Additions You may define Java code to be included within the generated parser:
Jv CUP Jv CUP is prsergenertion tool, similr to Ycc. CUP uilds Jv prser for LALR(1) grmmrs from production rules nd ssocited Jv code frgments. When prticulr production is recognized, its ssocited code
More informationCOMPONENTS: COMBINED LOADING
LECTURE COMPONENTS: COMBINED LOADING Third Edition A. J. Clrk School of Engineering Deprtment of Civil nd Environmentl Engineering 24 Chpter 8.4 by Dr. Ibrhim A. Asskkf SPRING 2003 ENES 220 Mechnics of
More informationAppendix D: Completing the Square and the Quadratic Formula. In Appendix A, two special cases of expanding brackets were considered:
Appendi D: Completing the Squre nd the Qudrtic Formul Fctoring qudrtic epressions such s: + 6 + 8 ws one of the topics introduced in Appendi C. Fctoring qudrtic epressions is useful skill tht cn help you
More informationHow To Set Up A Network For Your Business
Why Network is n Essentil Productivity Tool for Any Smll Business TechAdvisory.org SME Reports sponsored by Effective technology is essentil for smll businesses looking to increse their productivity. Computer
More informationAccording to Webster s, the
dt modeling Universl Dt Models nd P tterns By Len Silversn According Webster s, term universl cn be defined s generlly pplicble s well s pplying whole. There re some very common ptterns tht cn be generlly
More information10.6 Applications of Quadratic Equations
10.6 Applictions of Qudrtic Equtions In this section we wnt to look t the pplictions tht qudrtic equtions nd functions hve in the rel world. There re severl stndrd types: problems where the formul is given,
More information0.1 Basic Set Theory and Interval Notation
0.1 Bsic Set Theory nd Intervl Nottion 3 0.1 Bsic Set Theory nd Intervl Nottion 0.1.1 Some Bsic Set Theory Notions Like ll good Mth ooks, we egin with definition. Definition 0.1. A set is welldefined
More informationNetwork Configuration Independence Mechanism
3GPP TSG SA WG3 Security S3#19 S3010323 36 July, 2001 Newbury, UK Source: Title: Document for: AT&T Wireless Network Configurtion Independence Mechnism Approvl 1 Introduction During the lst S3 meeting
More informationOr more simply put, when adding or subtracting quantities, their uncertainties add.
Propgtion of Uncertint through Mthemticl Opertions Since the untit of interest in n eperiment is rrel otined mesuring tht untit directl, we must understnd how error propgtes when mthemticl opertions re
More informationPhysics 6010, Fall 2010 Symmetries and Conservation Laws: Energy, Momentum and Angular Momentum Relevant Sections in Text: 2.6, 2.
Physics 6010, Fll 2010 Symmetries nd Conservtion Lws: Energy, Momentum nd Angulr Momentum Relevnt Sections in Text: 2.6, 2.7 Symmetries nd Conservtion Lws By conservtion lw we men quntity constructed from
More informationEnterprise Risk Management Software Buyer s Guide
Enterprise Risk Mngement Softwre Buyer s Guide 1. Wht is Enterprise Risk Mngement? 2. Gols of n ERM Progrm 3. Why Implement ERM 4. Steps to Implementing Successful ERM Progrm 5. Key Performnce Indictors
More informationMODULE 3. 0, y = 0 for all y
Topics: Inner products MOULE 3 The inner product of two vectors: The inner product of two vectors x, y V, denoted by x, y is (in generl) complex vlued function which hs the following four properties: i)
More informationBabylonian Method of Computing the Square Root: Justifications Based on Fuzzy Techniques and on Computational Complexity
Bbylonin Method of Computing the Squre Root: Justifictions Bsed on Fuzzy Techniques nd on Computtionl Complexity Olg Koshelev Deprtment of Mthemtics Eduction University of Texs t El Pso 500 W. University
More information3 The Utility Maximization Problem
3 The Utility Mxiiztion Proble We hve now discussed how to describe preferences in ters of utility functions nd how to forulte siple budget sets. The rtionl choice ssuption, tht consuers pick the best
More information19. The FermatEuler Prime Number Theorem
19. The FermtEuler Prime Number Theorem Every prime number of the form 4n 1 cn be written s sum of two squres in only one wy (side from the order of the summnds). This fmous theorem ws discovered bout
More informationCHAPTER 11 Numerical Differentiation and Integration
CHAPTER 11 Numericl Differentition nd Integrtion Differentition nd integrtion re bsic mthemticl opertions with wide rnge of pplictions in mny res of science. It is therefore importnt to hve good methods
More informationSmall Business Cloud Services
Smll Business Cloud Services Summry. We re thick in the midst of historic sechnge in computing. Like the emergence of personl computers, grphicl user interfces, nd mobile devices, the cloud is lredy profoundly
More informationReview guide for the final exam in Math 233
Review guide for the finl exm in Mth 33 1 Bsic mteril. This review includes the reminder of the mteril for mth 33. The finl exm will be cumultive exm with mny of the problems coming from the mteril covered
More informationExponential and Logarithmic Functions
Nme Chpter Eponentil nd Logrithmic Functions Section. Eponentil Functions nd Their Grphs Objective: In this lesson ou lerned how to recognize, evlute, nd grph eponentil functions. Importnt Vocbulr Define
More informationHow To Study The Effects Of Music Composition On Children
Ccrcs Cognitive  Counselling Reserch & Conference Services (eissn: 23012358) Volume I Effects of Music Composition Intervention on Elementry School Children b M. Hogenes, B. Vn Oers, R. F. W. Diekstr,
More information15.6. The mean value and the rootmeansquare value of a function. Introduction. Prerequisites. Learning Outcomes. Learning Style
The men vlue nd the rootmensqure vlue of function 5.6 Introduction Currents nd voltges often vry with time nd engineers my wish to know the verge vlue of such current or voltge over some prticulr time
More informationChapter. Contents: A Constructing decimal numbers
Chpter 9 Deimls Contents: A Construting deiml numers B Representing deiml numers C Deiml urreny D Using numer line E Ordering deimls F Rounding deiml numers G Converting deimls to frtions H Converting
More informationSmall Businesses Decisions to Offer Health Insurance to Employees
Smll Businesses Decisions to Offer Helth Insurnce to Employees Ctherine McLughlin nd Adm Swinurn, June 2014 Employersponsored helth insurnce (ESI) is the dominnt source of coverge for nonelderly dults
More informationHow fast can we sort? Sorting. Decisiontree model. Decisiontree for insertion sort Sort a 1, a 2, a 3. CS 3343  Spring 2009
CS 4  Spring 2009 Sorting Crol Wenk Slides courtesy of Chrles Leiserson with smll chnges by Crol Wenk CS 4 Anlysis of Algorithms 1 How fst cn we sort? All the sorting lgorithms we hve seen so fr re comprison
More informationNQF Level: 2 US No: 7480
NQF Level: 2 US No: 7480 Assessment Guide Primry Agriculture Rtionl nd irrtionl numers nd numer systems Assessor:.......................................... Workplce / Compny:.................................
More informationOne Minute To Learn Programming: Finite Automata
Gret Theoreticl Ides In Computer Science Steven Rudich CS 15251 Spring 2005 Lecture 9 Fe 8 2005 Crnegie Mellon University One Minute To Lern Progrmming: Finite Automt Let me tech you progrmming lnguge
More informationQuick Reference Guide: Onetime Account Update
Quick Reference Guide: Onetime Account Updte How to complete The Quick Reference Guide shows wht existing SingPss users need to do when logging in to the enhnced SingPss service for the first time. 1)
More informationFUNCTIONS AND EQUATIONS. xεs. The simplest way to represent a set is by listing its members. We use the notation
FUNCTIONS AND EQUATIONS. SETS AND SUBSETS.. Definition of set. A set is ny collection of objects which re clled its elements. If x is n element of the set S, we sy tht x belongs to S nd write If y does
More informationRedistributing the Gains from Trade through Nonlinear. Lumpsum Transfers
Redistributing the Gins from Trde through Nonliner Lumpsum Trnsfers Ysukzu Ichino Fculty of Economics, Konn University April 21, 214 Abstrct I exmine lumpsum trnsfer rules to redistribute the gins from
More informationPHY 222 Lab 8 MOTION OF ELECTRONS IN ELECTRIC AND MAGNETIC FIELDS
PHY 222 Lb 8 MOTION OF ELECTRONS IN ELECTRIC AND MAGNETIC FIELDS Nme: Prtners: INTRODUCTION Before coming to lb, plese red this pcket nd do the prelb on pge 13 of this hndout. From previous experiments,
More informationClearPeaks Customer Care Guide. Business as Usual (BaU) Services Peace of mind for your BI Investment
ClerPeks Customer Cre Guide Business s Usul (BU) Services Pece of mind for your BI Investment ClerPeks Customer Cre Business s Usul Services Tble of Contents 1. Overview...3 Benefits of Choosing ClerPeks
More informationThe Definite Integral
Chpter 4 The Definite Integrl 4. Determining distnce trveled from velocity Motivting Questions In this section, we strive to understnd the ides generted by the following importnt questions: If we know
More informationaaaaaaa aaaaaaa aaaaaaa a Welcome To The ADP TotalPay Visa Card Program!
Welcome To The ADP TotlPy Vis Crd Progrm! The TotlPy Vis Crd Account Experience the ese & relibility of direct deposit through n ADP TotlPy VISA crd ccount ADP TotlPy VISA crd ccounts llow crdholders to
More information2001 Attachment Sequence No. 118
Form Deprtment of the Tresury Internl Revenue Service Importnt: Return of U.S. Persons With Respect to Certin Foreign Prtnerships Attch to your tx return. See seprte instructions. Informtion furnished
More information