Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more.
Course Hero has millions of course specific materials providing students with the best way to expand
their education.
Below is a small sample set of documents:
Northeastern University - CSU - 370
Object-Oriented Design CSU 370 Fall 2007 (Pucella)Lecture 15 Tuesday, Nov 6, 2007On Enforcing Static PropertiesLast time, we saw the main property that the Java type system enforces, namely if a program type checks, then at no point during the executio
Northeastern University - CSU - 370
Object-Oriented Design CSU 370 Fall 2007 (Pucella)Lecture 16 Friday, Nov 9, 2007A Model of Mutation in JavaWe have been avoiding mutations until now; but there are there, in the Java system, for better or for worse, especially in the libraries. So let'
Northeastern University - CSU - 370
Object-Oriented Design CSU 370 Fall 2007 (Pucella)Lecture 14 Friday, Nov 2, 2007(These notes are very rough, and differ somewhat from what I presented in class; I am posting them here to supplemental your own notes.)1Type Checking JavaBefore the midt
Northeastern University - CSU - 370
- baby Java- ADT specification (signature, algebraic specification)- algebraic reasoning- implementation in Java- static vars / methods- interface & substitutability- black box testing- type system / subclassing- canonical methods- implicit spec
Northeastern University - CSU - 370
Object-Oriented Design CSU 370 Fall 2007 (Pucella)Lecture 13 Tuesday, Oct 23, 2007Generics in GeneralLast class, we introduced generic interfaces, that is, interfaces that are parameterized by a type. Today, let's try to generalize this to parametrizin
Northeastern University - CSU - 370
Object-Oriented Design CSU 370 Fall 2007 (Pucella)Lecture 12 Friday, Oct 19, 2007Functional Iterators, ContinuedLast time, we started looking at functional iterators. I nished with a couple of questions. Lets answer them. First, lets see how to use suc
Northeastern University - CSU - 370
Object-Oriented Design CSU 370 Fall 2007 (Pucella)Lecture 11 Tuesday, Oct 16, 2007The Comparable InterfaceThere are two main ways, in practice, in which interfaces are used in Java programming: (1) To capture functionality orthogonal to the natural cla
Northeastern University - CSU - 370
Object-Oriented Design CSU 370 Fall 2007 (Pucella)Lecture 9 Friday, Oct 5, 2007Inheritance SubtletiesLast time, we saw inheritance as a way to re-use code in a subclass. Ther are some general rules for what is accessible from an inheriting subclass, an
Northeastern University - CSU - 370
Object-Oriented Design CSU 370 Fall 2007 (Pucella)Lecture 10 Friday, Oct 12, 2007Nested ClassesLast time, we saw a recipe for deriving an implementation from an ADT specication. There are two problems with that approach, however, one minor, one major:
Northeastern University - CSU - 370
Object-Oriented Design CSU 370 Fall 2007 (Pucella)Lecture 8 Tuesday, Oct 2, 2007Subclassing and InheritanceA Detour: Mutability versus ImmutabilityBefore starting this lecture, let me say something about an important point in class design. All of the
Northeastern University - CSU - 370
Object-Oriented Design CSU 370 Fall 2007 (Pucella)Lecture 6 Tuesday, Sep 25, 2007Static and Dynamic ErrorsConsider the kind of errors that can occur in programs. Let me abstract from Java for the moment, and speak in general. There are various errors p
Northeastern University - CSU - 370
Object-Oriented Design CSU 370 Fall 2007 (Pucella)Lecture 5 Friday, Sep 21, 2007The Java Type System (continued)The Object Class All classes subclass the Object class. (By default, this is the superclass used when you do not specify an extends class in
Northeastern University - CSU - 370
Object-Oriented Design CSU 370 Fall 2007 (Pucella)Lecture 4 Tuesday, Sep 18, 2007The Java Type SystemBy now, you have seen a fair amount of Java. Time to study in more depth the foundations of the language, because this will become important as we stud
SUNY Oswego - CSC - 344
cfw_- file: nim.hs game of nim-module Main whereimport Data.Char (chr, ord)import System.Environment (getArgs)import System.IOtakeaway(a,b) = if a < b then 0 else a - b;string_to_int: String -> Intstring_to_int s = let do_string_to_int n []
SUNY Oswego - CSC - 344
Script started on XXX > diff Rat2.hs Rat3.hs2c2< module Rat2 where-> module Rat3 where14c14< let g = Rat2.gcd(a, b)-> let g = Rat3.gcd(a, b)19a20> deriving (Read)24a26,28> (+) : Ratio -> Ratio -> Ratio> (+) x y = addrat(x,y)> 32c36< Ratio
SUNY Oswego - CSC - 344
module Rat1 wheregcd(a, b) = let do_gcd(x, y) = if y = 0 then x else do_gcd(y, x `mod` y) in if a >= b then do_gcd(a, b) else do_gcd(b, a) reduce(n, d) = let a = abs(n) b = abs(d) in let g = Rat1.gcd(a, b) in ( (if (n < 0) = (d < 0) then a
SUNY Oswego - CSC - 344
/ file: Laughin2.javapublic class Laughin2cfw_ static Cerberus cerberus = new Cerberus(); static Thread straight; static Thread gag; static class Cerberus cfw_ synchronized void straightline() cfw_ while (turn != 0 & !done) cfw_ try cfw_ wait(1
SUNY Oswego - CSC - 344
/ file: Laughin1.javapublic class Laughin1cfw_ static Cerberus cerberus = new Cerberus(); static class Cerberus cfw_ synchronized void straightline() cfw_ while (turn != 0) cfw_ try cfw_ wait(1000); catch (InterruptedException ie) cfw_ which
SUNY Oswego - CSC - 344
class Semaphorecfw_ public Semaphore() cfw_ this(1); public Semaphore(int i) cfw_ value = i; public synchronized void P() cfw_ while (value <= 0) cfw_ try cfw_ wait(); catch (InterruptedException e) cfw_ value-; public synchronized void V
SUNY Oswego - CSC - 344
class Semaphorecfw_ public Semaphore() cfw_ this(1); public Semaphore(int i) cfw_ value = i; public synchronized void P() cfw_ while (value <= 0) cfw_ try cfw_ wait(); catch (InterruptedException e) cfw_ value-; public synchronized void V
SUNY Oswego - CSC - 344
enum Phase cfw_ODD, EVENpublic class Taska implements Runnablecfw_ Phase phase; int count; public Taska(Phase phase, int count) cfw_ this.phase = phase; this.count = count; public void run() cfw_ switch (phase) cfw_ case ODD: for (int i =
Washington University in St. Louis - CSE - 577
CS 577 Design and Analysis of Switching SystemsExam 2 SolutionsJonathan Turner 11/23/041. (10 points) Consider a switching system which uses a crossbar with virtual output queues and a LOOFA scheduler. Suppose that this system implements multicast by h
North-West Uni. - REB - 991
To appear in Language and Speech. Please do not quote or cite without permission from the authors.Variability in Word Duration as a Function of Probability, Speech Style, and Prosody Rachel E. Baker Northwestern University Evanston, IL Ann R. Bradlow Nor
North-West Uni. - REB - 991
Is Articulation Level Controlled by Prosodic Prominence?Rachel Baker and Ann BradlowNorthwestern University r-baker2@northwestern.edu MCWOP PresentationArticulation LevelHypo-articulationshorter durations smaller vowel spaceHyper-articulationlonger
North-West Uni. - CEN - 342
Caroline EngstlerDepartment of Linguistics, Northwestern University 2016 Sheridan Road Evanston, IL 60208-4090 c-engstler@northwestern.eduEducation 2005-present Ph.D. program, Department of Linguistics, Northwestern University, Evanston, Illinois Specia
North-West Uni. - REB - 991
Addressing Challenges Posed by Speech Corpora Including Non-Native SpeakersRachel E. Baker, Chun-Liang Chan, Kristin Van Engen and Ann R. BradlowDepartment of Linguistics, Northwestern University1. IntroductionCorpora of recorded speech are vital reso
North-West Uni. - CEN - 342
Lexical properties modulate phonological attrition: Evidence from GermanCaroline Engstler & Matt Goldrick Department of Linguistics Northwestern UniversityMCWOP 20071Talk outlineIs cross-language transfer lexically conditioned? - Cross-language trans
North-West Uni. - REB - 991
Reactive Redundancy and Listener Comprehension in Direction-GivingRachel E. BakerDepartment of Linguistics Northwestern University Evanston, IL 60208 r-baker2@northwestern.eduAlastair J. Gill, Justine CassellCenter for Technology and Social Behavior N
SUNY Oswego - CSC - 344
- Exceptions -E.g., - 4 div 3;val it = 1 : int - 4 div 0;uncaught exception Div - 4 div 0 handle Div => 0;val it = 0 : intReturning to tree operations:Using the tree operations (putting a dictionary intoa binary search tree):use "tree.m";use
North-West Uni. - MAW - 962
NOT FOR SALEThe Meaning of Names in HadramautMary Ann Walter Massachusetts Institute of TechnologyPersonal names in Wadi Hadramaut1 differ in several interesting ways from names used elsewhere in the Arab world. For obvious sociohistorical reasons, mos
North-West Uni. - MAW - 962
Consonant Confusability: An MEG StudyVALENTINE HACQUARD & MARY ANN WALTER Massachusetts Institute of Technology0. Introduction Numerous behavioral experiments have investigated consonant confusability by evaluating error rates in identification of phone
SHSU - MATH - 143
Math 143 Spring, 2003 Exam 1 Chapters 4, 5, and 6 Part I - Denitions and Examples 1. (5 points) State the denition of an integrable function. Solution: A function f (x) is integrable on [a, b] if a f (x)dx exists, i.e. for any partition p of [a, b] let th
University of Rochester - PHYS - 107
Lecture 1 February 12, 2002Today: Thursday: Lab: 1 The Nature ofSound 1st 1 The Nature of Sound 2nd Lab 1: Problem Solving & Oscilloscope HW1: 0Materials Pasco Function Generator Oscilloscope Pasco oscillator Speaker Base guitar string & masses & board
SUNY Oswego - CSC - 344
#include <iostream>#include <string>using namespace std;#include "heap.h"struct Datum cfw_ friend ostream& operator<(ostream& os, Datum d) cfw_ return cout < d.val; int val; Datum(void) : val(0) cfw_ Datum(int v) : val(v) cfw_ Datum(const Datum
Alaska Anch - CS - 351
Sample Midterm Exam CS351 100 Points TotalName: _Please write neatly and show your work. The exam is open book, open notes, and you may use any computing devices. You have one hour and 15 minutes. Good luck! 1. Short Answer (12 pts). Provide brief 1-3 s
Seton Hall - CSAS - 3211
CSAS 3211 Practice1. What do the following terms mean: a. IP number: A unique identifier for computer on the internet. Consists of 4 numbers, each between 0 and 255 b. DHCP: An "IP number" server that assigns dynamically IP numbers to hosts on a LAN c. D
Duke - CPS - 100
Test 2 Practice: CPS 100Owen Astrachan November 5, 2004Name: Login: Honor code acknowledgment (signature)Problem 1 Problem 2 Problem 3 Problem 4 TOTAL:value 20 pts. 30 pts. 20 pts. 20 pts. 90 pts.gradeThis test has 14 pages, be sure your test has th
Duke - CPS - 006
What does this position entail?Do you want to build quantitative models millions of people will use, based on data from the world's largest online laboratory? Are you passionate about formulating relevant questions and producing solutions to initially il
Duke - CPS - 006
Recursion and Recursive StructuresDefinition in the dictionary: in mathematics an expression in which a value is calculated by using preceding terms of the expression Pretty worthless, doesnt convey details or power Consider folders and files in a comput
Duke - CPS - 006
What is an IStrand?Why are IStrand objects used instead of Strings? Strings don't have names Strings restrict us to specific methods, or we have to write methods and pass strings to them IStrand objects allow the methods to be in the class, this is part
Duke - CPS - 006
Genome Revolution: COMPSCI 006G14.1From practice to theory and back againIn theory there is no difference between theory and practice, but not in practice How do we search an array or an ArrayList for a value? I'm thinking of a number from 1 to 100 Wh
Duke - CPS - 006
What is Information? http:/dictionary.com1. 2. 3. 4.5. 6. 7.Knowledge derived from study, experience, or instruction. Knowledge of specific events or situations that has been gathered or received by communication; intelligence or news. A collection of
Duke - CPS - 006
Interfaces: improving ShotgunWe don't want to use a String to represent a DNA strand/sequence Probably not efficient for merging two strands Strands can't have annotations: names, features,. Doesn't mirror what's done in BioJava library We want to use a
Duke - CPS - 006
From Interfaces to IteratorsWe want to look at all the elements in an ArrayList We want to look at all the genomic sequences in a FASTA file We want to read all the words in a file We want to read all the lines in a file We want to iterate over a collect
Duke - CPS - 006
What is the Object Concept?Ask not what you can do to an object, ask what an object can do to itself Object has internal state, data Operations on the object affect the internal state Can expose state to client programs Can change state in some waysAn
Duke - CPS - 006
Refactoring, what, when,how?Programs are hard to get right the first time Similar to an essay paper? Rewrite? Code isn't fast enough, but it works Code isn't general enough, but it solves the problem Code passes initial tests, then becomes problematic R
Duke - CPS - 006
FOCUS COMPSCI 006G Genome RevolutionOwen Astrachan http:/www.cs.duke.edu/courses/cps006g/fall04 http:/www.cs.duke.edu/~olaGenome Revolution: COMPSCI 006G1.1Where are we going?What is computer science? What is biology? What is computational biology? W
Duke - CPS - 006
How to design/write programsStart with a small, working program Don't write 10's, 100's, 1000's of lines before compiling Compile, test, implement, repeat Add features to an already working program A program designed to do nothing is a known entity No re
Duke - CPS - 130
Meeting 26December 1, 2004Approximation Algorithms(read Section 35 on Approximation Algorithms in C ORMEN , L EISERSON , R IVEST, S TEIN)98 UQT q8eddD( q 55 63 4(1 Vertex Cover. The rst problem we consider is nding the minimum set of vertices in
Duke - CPS - 130
%!PS-Adobe-2.0 %Creator: dvips(k) 5.92b Copyright 2002 Radical Eye Software %Title: Book.dvi %Pages: 3 %PageOrder: Ascend %BoundingBox: 0 0 612 792 %DocumentFonts: Times-Roman Helvetica Times-Bold Times-Italic Courier %EndComments %DVIPSWebPage: (www.radi
Duke - CPS - 130
Meeting 25November 29, 2004NP-Complete Problems(read Section 34 on NP-Completeness in C ORMEN , L EISERSON , R IVEST, S TEIN)Step 2. Convert each clause into disjunctive normal form. The most mechanical way uses the truth table for each clause, as ill
Duke - CPS - 130
%!PS-Adobe-2.0 %Creator: dvips(k) 5.92b Copyright 2002 Radical Eye Software %Title: Book.dvi %Pages: 3 %PageOrder: Ascend %BoundingBox: 0 0 612 792 %DocumentFonts: Times-Roman Helvetica Times-Bold Times-Italic Courier %EndComments %DVIPSWebPage: (www.radi
Duke - CPS - 130
%!PS-Adobe-2.0 %Creator: dvips(k) 5.92b Copyright 2002 Radical Eye Software %Title: Book.dvi %Pages: 3 %PageOrder: Ascend %BoundingBox: 0 0 612 792 %DocumentFonts: Times-Roman Helvetica Times-Bold Times-Italic %EndComments %DVIPSWebPage: (www.radicaleye.c
Duke - CPS - 130
Meeting 24November 22, 2004Easy and Hard Problems(read Section 34 on NP-Completeness in C ORMEN , L EISERSON , R IVEST, S TEIN)P92 B5 1 i`@47dX h$#8g7 X `V7A2X 7 B5 1 B 5 1 8 fe@47dX cb7 #Ua`YX B5 1 W2VA7 7 R $#UTSQAs an example consider the shorte
Duke - CPS - 130
Meeting 23November 17, 2004Pattern MatchingThis material is not covered in our textbook but you can read about pattern matching in Chapter I.3 of Algorithms on Strings, Trees, and Sequences by G USFIELD.the sequence starts with a non-empty sequence of
Duke - CPS - 130
%!PS-Adobe-2.0 %Creator: dvips(k) 5.92b Copyright 2002 Radical Eye Software %Title: Book.dvi %Pages: 3 %PageOrder: Ascend %BoundingBox: 0 0 612 792 %DocumentFonts: Times-Roman Times-Bold Courier Times-Italic %EndComments %DVIPSWebPage: (www.radicaleye.com
Duke - CPS - 130
Meeting 23November 15, 2004Searching with StringsThis material is not covered in our textbook but you can read about keyword trees and sufx trees in Chapters I and II of Algorithms on Strings, Trees, and Sequences by G USFIELD.o1p1t a2 3 1 1 2t
Duke - CPS - 130
%!PS-Adobe-2.0 %Creator: dvips(k) 5.92b Copyright 2002 Radical Eye Software %Title: Book.dvi %Pages: 3 %PageOrder: Ascend %BoundingBox: 0 0 612 792 %DocumentFonts: Times-Roman Times-Bold Courier Times-Italic %EndComments %DVIPSWebPage: (www.radicaleye.com
Duke - CPS - 130
Meeting 21November 10, 2004String Matching(read Section 32 on String Matching in C ORMEN , L EISERSON , R IVEST, S TEIN)HOCUSPOCUSABRA BRACADABRA. ABRA ABR AB A CADABRA ACADABRA RACADABRA BRACADABRAThe straightforward approach to solving this problem
Duke - CPS - 130
Meeting 20November 8, 2004Union-Find(read Section 21 on Data Structures for Disjoint Sets in C ORMEN , L EISERSON , R IVEST, S TEIN)This section presents two data structures for the disjoint set system problem we encountered in the implementation of K
Duke - CPS - 130
%!PS-Adobe-2.0 %Creator: dvips(k) 5.92b Copyright 2002 Radical Eye Software %Title: Book.dvi %Pages: 3 %PageOrder: Ascend %BoundingBox: 0 0 612 792 %DocumentFonts: Times-Roman Times-Italic Times-Bold Courier %EndComments %DVIPSWebPage: (www.radicaleye.com