7 Pages

18ho-2x3

Course: COMP 213, Fall 2009
School: East Los Angeles College
Rating:
 
 
 
 
 

Word Count: 1753

Document Preview

213 Exceptions Advanced COMP Object-oriented Programming Weve seen that exceptions generally arise from input/resource failures. Lecture 18 Exceptions Semantic coding errors (bugs) can go unnoticed until some input is of the wrong form (ArithmeticException), or until some resource isnt available (NullPointerException, ArrayIndexOutOfBoundsException). When this happens, a RuntimeException is thrown. These are...

Register Now

Unformatted Document Excerpt

Coursehero >> California >> East Los Angeles College >> COMP 213

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.

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.
213 Exceptions Advanced COMP Object-oriented Programming Weve seen that exceptions generally arise from input/resource failures. Lecture 18 Exceptions Semantic coding errors (bugs) can go unnoticed until some input is of the wrong form (ArithmeticException), or until some resource isnt available (NullPointerException, ArrayIndexOutOfBoundsException). When this happens, a RuntimeException is thrown. These are generally unforeseeable (because they arise from bugs). (Dubuffet ) Runtime Exceptions The best way of recovering from these is to put a try-catch block at the top level (e.g., in the main() method) with a general error message: public static void main(String[] args) { try { // all the code } catch (RuntimeException re) { // report the error // exit gracefully } } Other Exceptions There are other subclasses of Exception (but not of RuntimeException) that are useful for other specic kinds of input/resource failure. For example, the IOException class signals that an I/O exception of some sort has occurred. This class has even more specic subclasses that include: FileNotFoundException MalformedURLException RemoteException Checked Exceptions These exceptions are not expected in the normal running of the Java interpreter. They signal resource errors (e.g., disk errors, unexpected user-input) that the programmer cannot ignore. They are treated very differently from the unchecked exceptions: whenever it is possible that a method might throw one of these exceptions, the programmer must either catch them (in a try-catch block), or advertise the fact that the method might throw one of these exceptions. These are called checked exceptions . . . and the compiler will check that programmers either catch or advertise. Checked vs Unchecked NB: unchecked = sublass of RuntimeException checked = not a subclass of RuntimeException Advertising Exceptions Unchecked exceptions must either be caught (handled) or advertised. For example, the class java.io.BufferedInputStream has the following method: public int read() throws IOException { ... } (which reads Input values (from keyboard, lestore, network connection, etc.) Any method that calls this method must either catch any IOExceptions, or advertise that it may throw such exceptions (in the same way that read() itself advertises this). } For Example: Catching Heres a method that calls read() and catches any IOException that might be thrown. public int readInt(BufferedInputStream b) { try { return b.read(); } catch (IOException ioe) { return -1; } (For example, the program that uses this method might take a value of -1 as an indication of an error.) For Example: Passing the Buck Heres a method that doesnt catch IOExceptions, but passes them on. public int readInt(BufferedInputStream b) throws IOException { return b.read(); } Now any method that calls this method will either have to catch any IOExceptions, or advertise that they may throw IOExceptions. Decisions, Decisions, . . . Choosing which of these options (catching or advertising) to follow is a design decision. One should try to identify the most appropriate place to handle exceptions. There should be enough information to: formulate a meaningful error-message for the user; and make a reasonable decision as to whether, and how, to carry on. Decisions, Decisions, . . . The Parser As a rule of thumb: If an exception is to be caught, it should be caught as deep down in the method-call stack as possible (i.e., as close to the top-level, or main() method as possible). Well look at an example from the Parser.java le from the practical. Parser.java contains one class, Parser, which contains just one public method: in class Parser public Prop parse(String s) { ... } This method reads through the given string and, if the string is a well-formed term of propositional logic, constructs an instance of Prop that represents that term. But what if the string is not well-formed? Decisions, Decisions, . . . Option 1 Returning special values (such as null or -1) for special cases is a standard practice: If the string that is passed to the parse() method is not well-formed, there are two fairly general options: 1 2 nd index of elt in array vals public int find(int elt, int[] vals) { for (int i=0; i < vals.length; i++) { return null throw an exception } if (vals[i] == elt) return i; // if were here, elt not found return -1; } -1 cant be an index of an array Option 1 Option 2 This method searches an array for a given element; if the element is found in the array, it returns the index at which the element was found; otherwise, it returns -1. Thus, a result of -1 indicates that the element doesnt occur in the array. The danger here is that this is an implicit convention, one that any user of the find() method should be aware of (so it should be clearly documented). For this option (the one we shall follow), we need to decide: what kind of exception to throw; where to throw such an exception; where (if at all) to catch such exceptions As to what kind, well create our own kind. . . . Class ParseException public class ParseException extends Exception { public ParseException(String s) { super(s); } public String getMessage() { return "Parse error: " + super.getMessage(); } } Inheriting Exception functionality Overriding the method in class Exception This is a way of calling the method being overridden Notes The superclass, Exception, provides most of what we need (the functionality of throwing, catching, etc.) We simply override the Exception.getMessage() method by adding Parse error: to the start of the error message. (the getMessage() method returns the string that is given as a parameter to the constructor) Because this class is subclass a of Exception, we effectively inherit all the Java interpreters mechanisms for throwing this kind of exception. Where to Throw ParseExceptions? Reading Operator Names if (s.equals("and")) { return Operators.AND; } if (s.equals("or")) { return Operators.OR; } if (s.equals("implies")) { return Operators.IMPLIES; } // else throw new ParseException( "Expected one of and, or, or implies"); If the input is not what is expected, a ParseException is thrown. Parser has only one public method, and 14 private methods that perform tasks such as reading variable names reading operator names reading white space, etc. Most of these functions could (and do) throw an exception if the input is not of the expected form. For example the following is from a method to read an operator name: Where to Catch ParseExceptions? The only public method in Parser is parse(); all of the private methods that throw exceptions must, ultimately have been called by this method. The user of this method might be entering terms to be parsed from the command line, or from a GUI. We dont know where to print out the error message, so it doesnt make sense to catch exceptions here. Instead, we pass the buck: public Prop parse(String s) throws ParseException { ... } Catching at the Top Level Now ParseExceptions can be caught at (or closer to) the top level of whatever application uses the parser. For example, in a main method, having set up a BufferedReader br: in a main method Parser p = new Parser(); System.out.println( "Enter a term, q to quit"); String str = ""; while (! str.equals("q")) { str = br.readLine(); try { System.out.println(p.parse(str).toString()); } catch (ParseException pe) { System.out.println(pe.getMessage()); } } Encapsulating Propositions? The main problem with our implementation of propositions is that we can construct instances of Prop that do not correspond to any well-formed term (see Lecture 17). This problem concerns the adequacy of the representation. Adequacy of Representation Any implementation of an abstract data type represents the data elements in some way. For example, stacks may be represented by arrays and pointers; Boolean terms by tree structures. In Java, a data element will be represented by an instance of a class (e.g., Stack, Prop). The representation is said to be adequate if: every data element can be represented by some instance every instance represents a data element. An Inadequate Constructor The constructor for the class Prop is: Prop constructor public Prop(Operator o, Prop[] ps) { op = o; operands = ps; } This is clearly too generous: it allows the creation of instances that do not correspond to well-formed terms. We could test that the given array of Props contains the correct number of operands for the given operator (we omit the details. . . ) Modied Prop Constructor BadTermException public Prop(Operator o, Prop[] ps) throws BadTermException { if (ps is the right size for o) { op = o; operands = ps; } else { throw new BadTermException(); } } public class BadTermException extends Exception { public String getMessage() { return "incorrect number of arguments"; } } If we run the following program: public static void main(String[] args) throws BadTermException { Prop a, t; a = new Prop(Operators.makeVar("a"), new Prop[0]); t = new Prop(Operators.AND OP, new Prop[1...

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:

East Los Angeles College - COMP - 213
COMP 213Advanced Object-oriented ProgrammingLecture 30Class Invariants: AVL trees(Picasso -)Deep in the woods, yeah! The Birthday PartyPreviously on COMP213. . .Linear search - in an array Binary search - in an array (halve the array) B
East Los Angeles College - COMP - 213
COMP 213Advanced Object-oriented ProgrammingClass Invariants and CorrectnessA good program is a correct program. Recall from Lecture 7 how a class invariant expressed (a part of) the correctness of our implementation of a queue (using two point
East Los Angeles College - COMP - 213
COMP 213: Advanced Object-Oriented ProgrammingCOMP 213Advanced Object-Oriented ProgrammingLecture 19: Input/OutputDepartment of Computer Science, University of LiverpoolCOMP 213: Advanced Object-Oriented ProgrammingInput and OutputA progr
Wilfrid Laurier - CPSC - 335
CPSC 335CompressionandHuffmanCodingDr. Marina GavrilovaComputer ScienceUnive rs ity o fC a lg a ry C a na d aLecture Overview Huffman Coding Non-determinism of the algorithm Implementations: Singly-linkedList Doubly-linked list Recurs
East Los Angeles College - COMP - 213
COMP 213Advanced Object-oriented ProgrammingLecture 33Generic Methods(Scharf -)Generic MethodsType parameters can also be used locally for generic methods. class GenericMethodTest { static &lt;A&gt; Pair&lt;A,A&gt; duplicate(A a) { return new Pair&lt;A,A
East Los Angeles College - COMP - 213
COMP 213Advanced Object-oriented ProgrammingGeneric MethodsType parameters can also be used locally for generic methods. class GenericMethodTest { Lecture 33Generic Methodsstatic &lt;A&gt; Pair&lt;A,A&gt; duplicate(A a) { return new Pair&lt;A,A&gt;(a,a); } Th
East Los Angeles College - COMP - 213
Java ImplementationCOMP 213Advanced Object-oriented Programmingpublic class Prop { public Prop and(Prop p1, Prop p2) { . } Lecture 14Implementing Prop/ similarly for `or', etc. public String printAllBrackets() { .} public String toString() { .
Wilfrid Laurier - CPSC - 585
Hulk Core Game Design ExcerptsHulk Core Game Design Excerpts.sxw - Page 1 of 24Copyright 2002, 2003, 2004 Radical Entertainment21/01/041 DETAILED GAME-PLAY1.1 FightingWhen Bruce Banner transforms into Hulk, the game-play becomes one of fig
East Los Angeles College - COMP - 213
COMP 213Start and End of ListsAdvanced Object-oriented ProgrammingWe saw that adding to the start of a linked list is straightforward, but that adding to the end of a list required a loop to traverse the list to nd the end. We could improve on t
East Los Angeles College - COMP - 213
COMP 213Client-Server ApplicationsFrom the previous lecture, we know how to open a `client connection' to a remote host, using the java.net.Socket class. (and got some idea of the different levels of protocols involved in sending data from one com
Allan Hancock College - PILACCAR - 200382003
PRIMARY INDUSTRIES LEVIES AND CHARGES COLLECTION AMENDMENT REGULATIONS 2003 (NO. 8) 2003 NO. 222 PRIMARY INDUSTRIES LEVIES AND CHARGES COLLECTION AMENDMENT REGULATIONS 2003 (NO. 8) 2003 NO. 222 - TABLE OF PROVISIONS1. Name of Regulations 2.
Wilfrid Laurier - CPSC - 585
Jackie Chan: Dragon Force[A game proposal]Game Concept . 3 Game Structure.. 3 Gameplay . 4 Jackie Chans Personality: Understanding the Chan Brand.. 5 Jackie Personality The Chan Brand . 6 License, target audience &amp; demographics .. 7 Target Audien
Wilfrid Laurier - CPSC - 585
Technical DesignDocument Number: Date Issued: Filing Path: Document Title: Author: Keywords: Revision HistoryIssue 0.1 Date Nov 26, 2001 Person Lorraine Cobb Reason Initial draft for internal review. 000xx October 29, 2001Document Issue: Document
Rose-Hulman - ECE - 320
ECE-320: Linear Control Systems Homework 2 Due: Tuesday September 13 at 1 PM 1) For systems with the following transfer functions: 1 s+2 s+6 H b (s) = ( s + 2)( s + 3) a) Determine the unit step and unit ramp response for each system using Laplace tr
Wilfrid Laurier - CPSC - 585
Content PipelinesDocument Issue: Date Issued: Document Title: Authors: Keywords: Revision HistoryIssue 0.1 0.2 0.3 Date July 12, 2001 July 20, 2001 July 23, 2001 Person Adam King, Bert Sandie Adam King Adam King Reason - include problem #, ECN #, e
Wilfrid Laurier - CPSC - 585
Technical DesignDate Issued: Document Title: Author: Keywords: Revision HistoryIssue 0.1 0.2 0.3 1.0 Date April 5, 2001 May 5, 2001 June 5, 2001 June 27, 2001 Person Nigel Brooke Nigel Brooke Nigel Brooke Nigel Brooke Reason - include problem #, EC
Wilfrid Laurier - CPSC - 585
A Game Concept By Radical EntertainmentTable of Contents1Game Analysis. 3 1.1Game Concept.. 3 1.2Game Goals.. 3 1.3Game Information. 3 1.4Brand Analysis.. 4 1.5Competitors Analysis.. 4 1.6Story Concept.5 2Game Design.. 7 2.1Expanded Game Concept..
Wilfrid Laurier - CPSC - 585
Pure3D Viewer Quick Reference Camera Controls: Left Mouse Button = Rotate Left + Middle Mouse Buttons = Zoom Middle Mouse Buttons = PanObject Controls: 1-4 = View Objects/Textures/Material/Fonts Right/Left = Prev/Next Object Up/Down =
Allan Hancock College - FCSAIALADA - 2007912
2004-2005-2006-2007The Parliament of theCommonwealth of AustraliaHOUSE OF REPRESENTATIVESPresented and read a first timeFamilies, Community Services andIndigenous Affairs LegislationAmendment (Child Disability Assistance)Bill 2007No
East Los Angeles College - COMP - 523
Lecture 25 Distributed algorithms: Byzantine AgreementCOMP 523: Advanced Algorithmic Techniques Lecturer: Dariusz KowalskiOverviewPrevious lectures: Distributed message-passing model Consensus in synchronized setting Broadcast in asynchronous
East Los Angeles College - COMP - 109
Foundations of Computer Science (COMP109) Exercise 10 1. Explain intuitively the definition of sentences: A formula is a sentence if every occurence of a variable is the scope of either or . Therefore, the truth of a sentence in a model (D, a) does
East Los Angeles College - COMP - 108
COMP108 Algorithmic Foundations Examination 2006-07Suggested solutions Question 1 Solution1A. I. O(n2 ) II. O( n5 ) or O(n5/2 ) III. O( n) IV. O(3n ) 1B. A possible MST: 1 e 2 a 3 b 6 c 7 d5 8 h f g The corresponding order of the edges selected
East Los Angeles College - COMP - 108
COMP108DEPARTMENT : Computer Science Tel. No. 794-3694MAY 2006 EXAMINATIONSBachelor of Arts : Year 1 Bachelor of Science : Year 1 No qualication aimed for: Year 1ALGORITHMIC FOUNDATIONSTIME ALLOWED : TWO hoursINSTRUCTIONS TO CANDIDATESAns
Hudson VCC - BR - 1390
AppendixSoil Testing Lab MethodsSoil samples that come to the lab are assigned a lab number and a subsample is dried overnight at 130 degrees F in a large oven. The soil is then put through a 2 mm sieve to remove coarse fragments. All of the availa
East Los Angeles College - COMP - 108
COMP108DEPARTMENT : Computer Science Tel. No. 794-3694MAY 2005 EXAMINATIONSBachelor of Arts : Year 1 Bachelor of Science : Year 1 Master of Mathematics : Year 2 No qualication aimed for: Year 1ALGORITHMIC FOUNDATIONSTIME ALLOWED : TWO hours
East Los Angeles College - COMP - 108
COMP108 Algorithmic Foundations Examination 2004-05Suggested solutionsQuestion 1 Solution1A. The trace table for m = 5 and n = 3. Before while loop 1st iteration 2nd iteration 3rd iteration i x s 0 1 0 1 5 5 2 25 30 3 125 155The output of the a
East Los Angeles College - COMP - 108
COMP108DEPARTMENT : Computer Science Tel. No. 795-4257MAY 2007 EXAMINATIONSBachelor of Arts : Year 1 Bachelor of Science : Year 1 Bachelor of Science : Year 2 Master of Engineering : Year 1 No qualication aimed for: Year 1ALGORITHMIC FOUNDATI
East Los Angeles College - COMP - 108
COMP108 Algorithmic Foundations Tutorial 3 (Suggested Solution)8 February 20081. (a) Base case: When n = 0, L.H.S = x0 = 1, R.H.S = (x1 1)/(x 1) = 1 = L.H.S Therefore, statement is true for n = 0 Induction hypothesis: Assume the statement is true
East Los Angeles College - COMP - 108
COMP108 Algorithmic Foundations Class Test 2 (Friday 18 April 2008)Name: ID:Answer ALL questions. Use the space provided and the back page if necessary. 1. Consider the following graph G. The label of an edge is the cost (weight) of the edge. b c
Sveriges lantbruksuniversitet - BISC - 309
Background knowledge expected Population growth models/equations exponential and geometric logistic Refer to 204 or 304 notes Molles Ecology Chs 10 and 11 Krebs Ecology Ch 11 Gotelli - Primer of Ecology (on reserve)The ecology of small populations
East Los Angeles College - COMP - 108
COMP108 Algorithmic Foundations Assessment 1Suggested solutions1. Target: to prove that 2n3 + n3 log n + 3n2 log n + n2 + 3n + 2 log n + 5 is O(n3 log n). 2n3 n3 log n for all n 4, 3n2 log n n3 log n for all n 3, n2 n3 log n for all n 2,
East Los Angeles College - COMP - 108
COMP108 Continuous AssessmentClass Test 1 (avg 62%) 12 Assessment 1 (avg 64%) Test 2 (avg 57%) Assessment 2 (avg 78%)10861148 7 6 5 5 3 0E or below D5 3 15 3 2 3 2 3 35 5 55 4 3 35 4 220CBAA+A+
Sveriges lantbruksuniversitet - BISC - 404
Reproductive and life history strategies Pollination syndromes Breeding systems Plant Gender and Mating systems Timing/frequency of reproduction Seed dispersal and dormancyParts of a FlowerPollination syndromesPollination syndromes Statis
East Los Angeles College - COMP - 108
Algorithmic Foundations COMP108COMP108 Algorithmic FoundationsDivide and ConquerPrudence Wonghttp:/www.csc.liv.ac.uk/~pwong/teaching/comp108Algorithmic Foundations COMP108Divide and Conquer Algorithmic FoundationsLearning outcomesCOMP
East Los Angeles College - COMP - 108
Algorithmic Foundations COMP108Algorithmic Foundations COMP108Learning outcomes COMP108 Algorithmic FoundationsGraph TheoryAble to tell what is an undirected graph and what is a directed graphKnow how to represent a graph using matrix and lis
McGill - MUMT - 611
Daniel McEnnisMasters Student in Music Technology at McGill UniveristyHomeFeature Extraction SystemA Java Based ApproachPreliminary design documents for version 0.1Class Diagram Use Case Diagram ProjectProposalPast ProjectsMAT proof command
East Los Angeles College - COMP - 108
Algorithmic Foundations COMP108COMP108 Algorithmic FoundationsGraph TheoryPrudence Wonghttp:/www.csc.liv.ac.uk/~pwong/teaching/comp108Algorithmic Foundations COMP108Learning outcomesAble to tell what is an undirected graph and what is a di
East Los Angeles College - COMP - 108
COMP108 Algorithmic Foundations Tutorial 8 (Suggested Solution)14 March 20081. Refer to the program GraphSol.java from the tutorial page. 2. Select a fruit F from the box Orange &amp; Apple. If the fruit F is an apple, then the box should be labelled
Allan Hancock College - PILACCAR - 20064
[pic] Primary Industries Levies and Charges Collection Amendment Regulations 2006 (No. 4)1 Select Legislative Instrument 2006 No. 193 I, PHILIP MICHAEL JEFFERY, Governor-General of the Commonwealth of Australia, acting with t
East Los Angeles College - COMP - 108
Algorithmic Foundations COMP108COMP108 Algorithmic FoundationsGreedy methods Prudence Wonghttp:/www.csc.liv.ac.uk/~pwong/teaching/comp108Algorithmic Foundations COMP108Greedy methods .Algorithmic Foundations COMP108Learning outcomesUnder
East Los Angeles College - COMP - 108
COMP108 Algorithmic Foundations Tutorial 4 (Suggested Solution)15 February 20081. Refer to the program SearchSol.java from the tutorial page. 2. Refer to the program MatchSol.java from the tutorial page. 3. Divide the eggs into four groups. Weigh
East Los Angeles College - COMP - 108
COMP108 Algorithmic Foundations Tutorial 1018 April 2008Note: If youve spent 10 minutes on a question without any clue of how to proceed, talk to the demonstrator. 1. Suppose there are two assembly lines each with 4 stations, Si,j . The assembly t
Sveriges lantbruksuniversitet - IR - 3461
1ENDLEGISLATED POVERTYN E W S L E T T E RJanuary, 1992IIWe won!Single parents on welfare don't have to look for work or training. The new welfare rule goes into effect immediately. End Legislated Poverty worked for three years to get this
Sveriges lantbruksuniversitet - LIB - 3461
1ENDLEGISLATED POVERTYN E W S L E T T E RJanuary, 1992IIWe won!Single parents on welfare don't have to look for work or training. The new welfare rule goes into effect immediately. End Legislated Poverty worked for three years to get this
East Los Angeles College - COMP - 108
Algorithmic Foundations COMP108COMP108 Algorithmic FoundationsAlgorithm efficiency + Searching/SortingPrudence Wonghttp:/www.csc.liv.ac.uk/~pwong/teaching/comp108Algorithmic Foundations COMP108Learning outcomesAble to carry out simple asym
Sveriges lantbruksuniversitet - IR - 3471
(TND LEGISLATED#53The B. C. government has changed the welfare law about how much money you can have and still apply for welfare. The new law means that you don't have to use up nearly all your savings before you can apply for welfare. If you are a
East Los Angeles College - COMP - 108
COMP108 Algorithmic Foundations Tutorial 7 (Suggested Solution)7 March 20081. Iterative method: T (n) = = = = = = = = = = = = 3 T (n 1) + 1 3 (3 T (n 2) + 1) + 1 32 T (n 2) + 3 + 1 32 (3 T (n 3) + 1) + 32 + 3 + 1 33 T (n 3) + 32 + 3 + 1 33 (3,
Sveriges lantbruksuniversitet - IR - 2605
Evidence Based Library and Information Practice 2006, 1:2 Evidence Based Library and Information Practice Commentary Evidence Based Librarianship and Open Access Heather Morrison Project Coordinator, British Columbia Electronic Libr
Sveriges lantbruksuniversitet - LIB - 2605
Evidence Based Library and Information Practice 2006, 1:2 Evidence Based Library and Information Practice Commentary Evidence Based Librarianship and Open Access Heather Morrison Project Coordinator, British Columbia Electronic Libr
East Los Angeles College - COMP - 108
COMP108 Algorithmic Foundations Tutorial 77 March 2008Note: If you've spent 10 minutes on a question without any clue of how to proceed, talk to the demonstrator. 1. Solve the following recurrence by the iterative method. T (n) = 1 3 T (n - 1) + 1
Sveriges lantbruksuniversitet - IR - 2059
EVIDENCE ON THE BANK LENDING CHANNEL IN UKRAINEInna Golodniuk University Degree in Physics, Chernivtsi National University, 1997 MA in Economics, University of Kyiv-Mohyla Academy, 1999PROJECT SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS
Sveriges lantbruksuniversitet - LIB - 2059
EVIDENCE ON THE BANK LENDING CHANNEL IN UKRAINEInna Golodniuk University Degree in Physics, Chernivtsi National University, 1997 MA in Economics, University of Kyiv-Mohyla Academy, 1999PROJECT SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS
East Los Angeles College - COMP - 108
COMP108 Algorithmic Foundations Tutorial 629 February 20081. Merge sort is a sorting algorithm that divides n numbers into two halves, recursively sorts each of them, and then merge the two resulting sorted lists into a final sorted list. Apply mer
East Los Angeles College - COMP - 108
COMP108 Algorithmic Foundations Assessment 1Deadline: Friday, 7 March 2008 (4pm)(Submit to Student One-Stop-Shop) 1. Prove that the function 2n3 +n3 log n+3n2 log n+n2 +3n+2 log n+5 is O(n3 log n). Remember to explain for each term why it is no mor
East Los Angeles College - COMP - 108
Algorithmic Foundations COMP108COMP108 Algorithmic FoundationsIntroduction + Mathematical InductionPrudence Wonghttp:/www.csc.liv.ac.uk/~pwong/teaching/comp108/200708Algorithmic Foundations COMP108Module information Algorithmic Foundation
East Los Angeles College - COMP - 108
COMP108 Algorithmic Foundations Tutorial 125 January 20081. Simplify the following mathematical expressions (a) (x - 2)(x + 1) + x + 2 (b) x2 + 2x + 1 (d) 2 + log2 (x/4) 2. Give the trace table and the output of the following algorithm for m = 16.
Sveriges lantbruksuniversitet - IR - 1590
Playful Play with Games: Linking Level Editing to Learning in Art and DesignMaia EngeliPlanetary Collegium University of Plymouth UK maia@enge.li ABSTRACT The title Playful Play with Games refers to the possibility of creative involvement with game
East Los Angeles College - COMP - 108
AlgorithmicFoundations COMP108COMP108 AlgorithmicFoundationsDivideandConquerPrude Wong ncehttp:/www.csc.liv.ac.uk/~pwong/te aching/com p108AlgorithmicFoundations COMP108DivideandConquerAlgorithmicFoundationsLearningoutcomesCOMP108 U
East Los Angeles College - COMP - 108
Algorithmic Foundations COMP108COMP108 Algorithmic FoundationsAlgorithm efficiency + Searching/SortingPrudence Wonghttp:/www.csc.liv.ac.uk/~pwong/teaching/comp108Learning outcomes Ableto carry outAlgorithmic Foundations COMP108sim asympt
East Los Angeles College - COMP - 108
Algorithmic Foundations COMP108COMP108 Algorithmic FoundationsIntroduction + Mathematical InductionPrudence Wonghttp:/www.csc.liv.ac.uk/~pwong/teaching/comp108/200708Algorithmic Foundations COMP108Module information .Teaching TeamDr Prud
East Los Angeles College - COMP - 108
AlgorithmicFoundations COMP108COMP108 AlgorithmicFoundationsGraphTheoryPrude Wong ncehttp:/www.csc.liv.ac.uk/~pwong/te aching/com p108Learningoutcomes Ableto te llAlgorithmicFoundations COMP108what is an undire d graph and what is a cte