80 Pages

ICOM4015-lec08-f08

Course: ICOM 4015, Fall 2009
School: UPR Mayagüez
Rating:
 
 
 
 
 

Word Count: 4017

Document Preview

4015: ICOM Advanced Programming Lecture 8 Chapter Eight: Designing Classes ICOM 4015 Fall 2008 Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Chapter Eight: Designing Classes Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Chapter Goals To learn how to choose appropriate classes to implement To understand the concepts...

Register Now

Unformatted Document Excerpt

Coursehero >> United States >> UPR Mayagüez >> ICOM 4015

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.
4015: ICOM Advanced Programming Lecture 8 Chapter Eight: Designing Classes ICOM 4015 Fall 2008 Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Chapter Eight: Designing Classes Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Chapter Goals To learn how to choose appropriate classes to implement To understand the concepts of cohesion and coupling To minimize the use of side effects To document the responsibilities of methods and their callers with preconditions and postconditions To understand the difference between instance methods and static methods To introduce the concept of static fields Contined Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Chapter Goals (cont.) To understand the scope rules for local variables and instance fields To learn about packages To learn about unit testing frameworks Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Choosing Classes A class represents a single concept from the problem domain Name for a class should be a noun that describes concept Concepts from mathematics: Point Rectangle Ellipse Concepts from real life: BankAccount CashRegister Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Choosing Classes Actors (end in -er, -or) objects do some kinds of work for you Scanner Random // better name: RandomNumberGenerator Utility classes no objects, only static methods and constants Math Program starters: only have a main method Don't turn actions into classes: Paycheck is a better name than ComputePaycheck Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Self Check 8.1 What is the rule of thumb for finding classes? Answer: Look for nouns in the problem description. Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Self Check 8.2 Your job is to write a program that plays chess. Might ChessBoard be an appropriate class? How about MovePiece? Answer: Yes (ChessBoard) and no (MovePiece). Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Cohesion A class should represent a single concept The public interface of a class is cohesive if all of its features are related to the concept that the class represents This class lacks cohesion: public class CashRegister { public void enterPayment(int dollars, int quarters, int dimes, int nickels, int pennies) . . . public static final double NICKEL_VALUE = 0.05; public static final double DIME_VALUE = 0.1; public static final double QUARTER_VALUE = 0.25; . . . } Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Cohesion CashRegister, as described above, involves two concepts: cash register and coin Solution: Make two classes: public class Coin { public Coin(double aValue, String aName) { . . . } public double getValue() { . . . } . . . } public class CashRegister { public void enterPayment(int coinCount, Coin coinType) { . . . } . . . } Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Coupling A class depends on another if it uses objects of that class CashRegister depends on Coin to determine the value of the payment Coin does not depend on CashRegister High Coupling = many class dependencies Minimize coupling to minimize the impact of interface changes To visualize relationships draw class diagrams UML: Unified Modeling Language. Notation for object-oriented analysis and design Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Coupling Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. High and Low Coupling Between Classes Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Self Check 8.3 Why is the CashRegister class from Chapter 4 not cohesive? Answer: Some of its features deal with payments, others with coin values. Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Self Check 8.4 Why does the Coin class not depend on the CashRegister class? Answer: None of the coin operations require the CashRegister class. Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Self Check 8.5 Why should coupling be minimized between classes? Answer: If a class doesn't depend on another, it is not affected by interface changes in the other class. Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Accessors, Mutators and Immutable Classes Accessor: does not change the state of the implicit parameter double balance = account.getBalance(); Mutator: modifies the object on which it is invoked account.deposit(1000); Immutable class: has no mutator methods (e.g., String) String name = "John Q. Public"; String uppercased = name.toUpperCase(); // name is not changed It is safe to give out references to objects of immutable classes; no code can modify the object at an unexpected time Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Self Check 8.6 Is the substring method of the String class an accessor or a mutator? Answer: It is an accessor calling substring doesn't modify the string on which the method is invoked. In fact, all methods of the String class are accessors. Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Self Check 8.7 Is the Rectangle class immutable? Answer: No translate is a mutator. Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Side Effects Side effect of a method: any externally observable data modification public void transfer(double amount, BankAccount other) { balance = balance - amount; other.balance = other.balance + amount; // Modifies explicit parameter } Updating explicit parameter can be surprising to programmers; it is best to avoid it if possible Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Side Effects Another example of a side effect is output public void printBalance() // Not recommended { System.out.println("The balance is now $" + balance); } Bad idea: message is in English, and relies on System.out It is best to decouple input/output from the actual work of your classes You should minimize side effects that go beyond modification of the implicit parameter Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Self Check 8.8 If a refers to a bank account, then the call a.deposit(100) modifies the bank account object. Is that a side effect? Answer: No a side effect of a method is any change outside the implicit parameter. Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Self Check 8.9 Consider the DataSet class of Chapter 6. Suppose we add a method void read(Scanner in) { while (in.hasNextDouble()) add(in.nextDouble()); } Does this method have a side effect? Answer: Yes the method affects the state of the Scanner parameter. Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Common Error: Trying to Modify Primitive Type Parameters void transfer(double amount, double otherBalance) { balance = balance - amount; otherBalance = otherBalance + amount; } Won't work Scenario: double savingsBalance = 1000; harrysChecking.transfer(500, savingsBalance); System.out.println(savingsBalance); In Java, a method can never change parameters of primitive type Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Common Error: Trying to Modify Primitive Type Parameters double savingsBalance = 1000; harrysChecking.transfer(500, savingsBalance); System.out.println(savingsBalance); ... void transfer(double amount, double otherBalance) { balance = balance - amount; otherBalance = otherBalance + amount; } Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Common Error: Trying to Modify Primitive Type Parameters double savingsBalance = 1000; harrysChecking.transfer(500, savingsBalance); System.out.println(savingsBalance); ... void transfer(double amount, double otherBalance) { balance = balance - amount; otherBalance = otherBalance + amount; } Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Common Error: Trying to Modify Primitive Type Parameters double savingsBalance = 1000; harrysChecking.transfer(500, savingsBalance); System.out.println(savingsBalance); ... void transfer(double amount, double otherBalance) { balance = balance - amount; otherBalance = otherBalance + amount; } Continued Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Common Error: Trying to Modify Primitive Type Parameters (cont.) Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Common Error: Trying to Modify Primitive Type Parameters double savingsBalance = 1000; harrysChecking.transfer(500, savingsBalance); System.out.println(savingsBalance); ... void transfer(double amount, double otherBalance) { balance = balance - amount; otherBalance = otherBalance + amount; } Continued Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Common Error: Trying to Modify Primitive Type Parameters (cont.) Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Animation 8.1 Trying to Modify Primitive Type Parameters Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Call by Value and Call by Reference Call by value: Method parameters are copied into the parameter variables when a method starts Call by reference: Methods can modify parameters Java has call by value A method can change state of object reference parameters, but cannot replace an object reference with another Continued Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Call by Value and Call by Reference (cont.) public class BankAccount { public void transfer(double amount, BankAccount otherAccount) { balance = balance - amount; double newBalance = otherAccount.balance + amount; otherAccount = new BankAccount(newBalance); // Won't work } } Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Call by Value Example harrysChecking.transfer(500, savingsAccount); Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Preconditions Precondition: Requirement that the caller of a method must meet Publish preconditions so the caller won't call methods with bad parameters /** Deposits money into this account. @param amount the amount of money to deposit (Precondition: amount >= 0) */ Typical use: To restrict the parameters of a method To require that a method is only called when the object is in an appropriate state Continued Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Preconditions (cont.) If precondition is violated, method is not responsible for computing the correct result. It is free to do anything Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Preconditions Method may throw exception if precondition violated more in Chapter 11 if (amount < 0) throw new IllegalArgumentException(); balance = balance + amount; Method doesn't have to test for precondition. (Test may be costly) // if this makes the balance negative, it's the caller's fault balance = balance + amount; Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Preconditions Method can do an assertion check assert amount >= 0; balance = balance + amount; To enable assertion checking: java -enableassertions MyProg You can turn assertions off after you have tested your program, so that it runs at maximum speed Many beginning programmers silently return to the caller if (amount < 0) return; // Not recommended; hard to debug balance = balance + amount; Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Syntax 8.1 Assertion assert condition; Example: assert amount >= 0; Purpose: To assert that a condition is fulfilled. If assertion checking is enabled and the condition is false, an assertion error is thrown. Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Postconditions Condition that is true after a method has completed If method call is in accordance with preconditions, it must ensure that postconditions are valid There are two kinds of postconditions: The return value is computed correctly The object is in a certain state after the method call is completed /** Deposits money into this account. (Postcondition: getBalance() >= 0) @param amount the amount of money to deposit (Precondition: amount >= 0) */ Don't document trivial postconditions that repeat the @return clause Continued Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Postconditions (cont.) amount <= getBalance() // this is the way to state a postcondition amount <= balance // wrong postcondition formulation Contract: If caller fulfills precondition, method must fulfill postcondition Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Self Check 8.10 Why might you want to add a precondition a to method that you provide for other programmers? Answer: Then you don't have to worry about checking for invalid values it becomes the caller's responsibility. Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Self Check 8.11 When you implement a method with a precondition and you notice that the caller did not fulfill the precondition, do you have to notify the caller? Answer: No you can take any action that is convenient for you. Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Static Methods Every method must be in a class A static method is not invoked on an object Why write a method that does not operate on an object? Common reason: encapsulate some computation that involves only numbers. Numbers aren't objects, you can't invoke methods on them. E.g., x.sqrt() can never be legal in Java public class Financial { public static double percentOf(double p, double a) { return (p / 100) * a; } // More financial methods can be added here. } Continued Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Static Methods (cont.) Call with class name instead of object: double tax = Financial.percentOf(taxRate, total); main is static there aren't any objects yet Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Self Check 8.12 Suppose Java had no static methods. Then all methods of the Math class would be instance methods. How would you compute the square root of x? Answer: Math m = new Math(); y = m.sqrt(x); Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Self Check 8.13 Harry turns in his homework assignment, a program that plays tictac-toe. His solution consists of a single class with many static methods. Why is this not an object-oriented solution? Answer: In an object-oriented solution, the main method would construct objects of classes Game, Player, and the like. Most methods would be instance methods that depend on the state of these objects. Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Static Fields A static field belongs to the class, not to any object of the class. Also called class field public class BankAccount { . . . private double balance; private int accountNumber; private static int lastAssignedNumber = 1000; } If lastAssignedNumber was not static, each instance of BankAccount would have its own value of lastAssignedNumber Continued Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Static Fields (cont.) public BankAccount() { // Generates next account number to be assigned lastAssignedNumber++; // Updates the static field // Assigns field to account number of this bank account accountNumber = lastAssignedNumber; // Sets the instance field } Minimize the use of static fields (static final fields are ok) Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Static Fields Three ways to initialize: 1. Do nothing. Field is initialized with 0 (for numbers), false (for boolean values), or null (for objects) 2. Use an explicit initializer, such as public class BankAccount { . . . private static int lastAssignedNumber = 1000; // Executed once, // when class is loaded } 1. Use a static initialization block Static fields should always be declared as private Continued Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Static Fields (cont.) Exception: Static constants, which may be either private or public public class BankAccount { . . . public static final double OVERDRAFT_FEE = 5; // Refer to it as // BankAccount.OVERDRAFT_FEE } Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. A Static Field and Instance Fields Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Self Check 8.14 Name two static fields of the System class. Answer: System.in and System.out. Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Self Check 8.15 Harry tells you that he has found a great way to avoid those pesky objects: Put all code into a single class and declare all methods and fields static. Then main can call the other static methods, and all of them can access the static fields. Will Harry's plan work? Is it a good idea? Answer: Yes, it works. Static methods can access static fields of the same class. But it is a terrible idea. As your programming tasks get more complex, you will want to use objects and classes to organize your programs. Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Scope of Local Variables Scope of variable: Region of program in which the variable can be accessed Scope of a local variable extends from its declaration to end of the block that encloses it Continued Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Scope of Local Variables (cont.) Sometimes the same variable name is used in two methods: public class RectangleTester { public static double area(Rectangle rect) { double r = rect.getWidth() * rect.getHeight(); return r; } public static void main(String[] args) { Rectangle r = new Rectangle(5, 10, 20, 30); double a = area(r); System.out.println(r); } } These variables are independent from each other; their scopes are disjoint Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Scope of Local Variables Scope of a local variable cannot contain the definition of another variable with the same name Rectangle r = new Rectangle(5, 10, 20, 30); if (x >= 0) { double r = Math.sqrt(x); // Error - can't declare another variable called r here . . . } Continued Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Scope of Local Variables (cont.) However, can have local variables with identical names if scopes do not overlap if (x >= 0) { double r = Math.sqrt(x); . . . } // Scope of r ends here else { Rectangle r = new Rectangle(5, 10, 20, 30); // OK - it is legal to declare another r here . . . } Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Scope of Class Members Private members have class scope: You can access all members in any method of the class Must qualify public members outside scope Math.sqrt harrysChecking.getBalance Inside a method, no need to qualify fields or methods that belong to the same class Continued Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Scope of Class Members (cont.) An unqualified instance field or method name refers to the this parameter public class BankAccount { public void transfer(double amount, BankAccount other) { withdraw(amount); // i.e., this.withdraw(amount); other.deposit(amount); } . . . } Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Overlapping Scope A local variable can shadow a field with the same name Local scope wins over class scope public class Coin { . . . public double getExchangeValue(double exchangeRate) { double value; // Local variable . . . return value; } private String name; private double value; // Field with the same name } Continued Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Overlapping Scope (cont.) Access shadowed fields by qualifying them with the this reference value = this.value * exchangeRate; Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Self Check 8.16 Consider the deposit method of the BankAccount class. What is the scope of the variables amount and newBalance? Answer: The scope of amount is the entire deposit method. The scope of newBalance starts at the point at which the variable is defined and extends to the end of the method. Big Java by Cay Horstmann Copyright 2008 by John Wiley & Sons. All rights reserved. Self Check 8.17 What is the scope of the balance field of the BankAccount class? Answer: It starts at the beginning of the class a...

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:

UPR Mayagüez - ICOM - 4015
ICOM 4015: Advanced ProgrammingLecture 9Chapter Nine: Interfaces and PolymorphismICOM 4015 Fall 2008Big Java by Cay Horstmann Copyright 2008 by John Wiley &amp; Sons. All rights reserved.Chapter Nine: Interfaces and PolymorphismBig Java by Cay H
UPR Mayagüez - ICOM - 4015
ICOM 4015: Advanced ProgrammingLecture 10Chapter Ten: InheritanceICOM 4015 Fall 2008Big Java by Cay Horstmann Copyright 2008 by John Wiley &amp; Sons. All rights reserved.Chapter Ten: InheritanceBig Java by Cay Horstmann Copyright 2008 by John
UPR Mayagüez - ICOM - 4015
ICOM 4015: Advanced ProgrammingLecture 13Chapter Thirteen: RecursionICOM 4015 Fall 2008Big Java by Cay Horstmann Copyright 2008 by John Wiley &amp; Sons. All rights reserved.Chapter Thirteen: RecursionBig Java by Cay Horstmann Copyright 2008 b
UPR Mayagüez - ICOM - 4015
ICOM 4015: Advanced ProgrammingLecture 14Chapter Fourteen: Sorting and SearchingICOM 4015 Fall 2008Big Java by Cay Horstmann Copyright 2008 by John Wiley &amp; Sons. All rights reserved.Chapter Fourteen: Sorting and SearchingBig Java by Cay Hor
UPR Mayagüez - INEL - 4206
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|15 Jan 2003 14:53:06 -0000 vti_extenderversion:SR|5.0.2.3409 vti_title:SR|Department of Electrical and Computer Engineering vti_assignedto:SR| vti_approvallevel:SR| vti_backlinkinfo:VX|courses/spring200
UPR Mayagüez - ICOM - 4029
Department of Electrical and Computer Engineering University of Puerto Rico Mayagez CampusICOM 4029 Compilers Fall 2003Prof: Bienvenido Vlez Asistente: Arturo SilvaLaboratorio N 2: Ejecutando FLEX bajo LinuxObjetivos1. Entender la metodologa
UPR Mayagüez - ICOM - 4036
The Nature of ComputingICOM 4036 Lecture 2Prof. Bienvenido VelezSpring 2007ICOM 4036 Programming Laguages Lecture 21Some Inaccurate Yet Popular Perceptions of Computing Computing = Computers Computing = Programming Computing = Software
UPR Mayagüez - ICOM - 4036
Universidad de Puerto Rico Recinto Universitario de Mayagez Departamento de Ingeniera Elctrica y ComputadorasICOM 4036 Programming LanguagesOtoo 2004 Ejercicios de prctica Examen Parcial I 1. Add a STACK pointer register to the Easy I Data Path.
UPR Mayagüez - ICOM - 4036
ICOM 4036: PROGRAMMING LANGUAGESLecture 5 Functional Programming The Case of Scheme 05/17/09Required Readings Texbook (Scott PLP) Chapter 11 Section 2: Functional Programming Scheme Language Description Revised Report on the Algorithmic Langu
UPR Mayagüez - INEL - 4206
Universidad de Puerto Rico Recinto Universitario de MayagezINEL 4206 MicroprocesadoresPrimavera 2002 Ejercicios de prctica Examen Parcial I 1. Processor Implementation. Add an instruction BrL (Branch and link) to the Easy I processor designed in
UPR Mayagüez - INEL - 4206
INEL 4206 Fall 2002 Exmen I Nombre: _5/17/09 Seccin: _Anota tu nombre y nmero de seccin en todas las hojas del examen AHORA! (penalidad de 5 puntos)Tienes 2 horas para completar tres problemas. Lee cuidadosamente todo el examen antes de empezar
UPR Mayagüez - INEL - 4206
INEL 4206 Fall 2002 Exmen I Nombre: _5/17/09Anota tu nombre y nmero de seccin en todas las hojas del examen AHORA! (penalidad de 5 puntos)Tienes 2 horas para completar todos los problemas. Lee cuidadosamente todo el examen antes de empezar a tra
UPR Mayagüez - ICOM - 4015
ICOM 4015 Advanced ProgrammingLecture 9 Data Abstraction II Class Specialization Subtype PolymorphismProf. Bienvenido Vlez05/17/09ICOM 40151Inheritance Subtype Polymorphism Outline Defining derived classes Member inheritance Method over
UPR Mayagüez - INEL - 4206
Easy IControl Unit(Level 3 Flowcharts) fetchop1DI&lt;0:9&gt; ABUS AOFetchOpfetchop2AO EAB EDB DI00 11x00 00x00 branch on opcode 100 101 0000 01000 011opcodeaoprsoprloadstorebrnjumpFall 2002INEL 4206 Microprocessors
UPR Mayagüez - INEL - 4206
The Nature of ComputingINEL 4206 Microprocessors Lecture 2Bienvenido Vlez Ph. D. School of Engineering University of Puerto Rico - MayagezSome Inaccurate (Although Popular) Perceptions of Computing Computing = (Electronic) Computers Computing
UPR Mayagüez - ICOM - 4036
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|15 Jan 2004 16:25:08 -0000 vti_extenderversion:SR|5.0.2.4330 vti_title:SR|Department of Electrical and Computer Engineering vti_syncwith_ece.uprm.edu\:21/public_html:TX|15 Jan 2004 16:25:08 -0000 vti_sy
UPR Mayagüez - INEL - 4206
Universidad de Puerto Rico Recinto Universitario de MayagezINEL 4206 MicroprocesadoresPrimavera 2002 Ejercicios de prctica Examen Parcial I 1. Processor Implementation. Add an instruction BrL (Branch and link) to the Easy I processor designed in
UPR Mayagüez - INEL - 4206
INEL 4206 Spring 2002 Exmen II Nombre: _5/17/09 Seccin: _Anota tu nombre y nmero de seccin en todas las hojas del examen AHORA! (penalidad de 5 puntos)Tienes 2 horas para completar tres problemas. Lee cuidadosamente todo el examen antes de empez
UPR Mayagüez - ICOM - 4036
Universidad de Puerto Rico Recinto Universitario de MayagezICOM 4036 Programming LanguagesOtoo 2003 Ejercicios de prctica Examen Parcial II 1. Write a logic program in Prolog to compute the greatest common divisor (GCD) of 2 integer arguments. Th
UPR Mayagüez - ICOM - 4029
Programming Assignments Dates Happy Hour October 15 November 22 December 14-16PA 3 (Parser) 4a (Semantic Analyzer) 4b 5a (Code Generator) 5bHand-out Date September 29 October 11 October 25 November 15 November 29Deadline October 11 October 25 N
UPR Mayagüez - INEL - 4206
Evaluacion Curso INEL 4206 Segundo Examen.Menciona los aspectos que ms te gustan de la clase INEL 4206 en orden decreciente de importancia.AspectoEl uso de las transparencias en la clase y tener un buen Web-Site para el curso.Porcentaje37.09
UPR Mayagüez - INEL - 4206
Universidad de Puerto Rico Mayaguez Department of Electrical and Computer Engineering INEL 4206 Microprocessors Exam III Summary of Topics Review all previous material up to Exam II Procedures o Parameter Passing o Stack frames o Recursive proce
UPR Mayagüez - ICOM - 4015
Sus contestaciones al problemario 2 deben ser entregadas electrnicamente por e-mail siguiendo las siguientes instrucciones.0. Crear un directorio para almacenar los archivos relacionados con cadaproblemario. No tiene que hacer este paso si ya lo h
UPR Mayagüez - ICOM - 4015
Department of Electrical and Computer Engineering University of Puerto Rico Mayagez ICOM 4015 Advanced Programming Fall 2006 Exam I Practice Exercises and Problem Set 1 DUE: September 14, 2006 In class 1) Create a new Eclipse project titled icom4015
UPR Mayagüez - ICOM - 4036
vti_encoding:SR|utf8-nl vti_author:SR|BVWS\bvelez vti_modifiedby:SR|BVWS\bvelez vti_timelastmodified:TR|15 Aug 2005 18:50:12 -0000 vti_timecreated:TR|08 Nov 2004 11:08:29 -0000 vti_title:SR|Universidad de Puerto Rico vti_extenderversion:SR|5.0.2.6417
UPR Mayagüez - ICOM - 4036
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|29 Aug 2005 18:28:44 -0000 vti_extenderversion:SR|5.0.2.6417 vti_author:SR|CHURCH\bvelez vti_modifiedby:SR|BVWS\bvelez vti_timecreated:TR|20 Jan 2004 16:01:58 -0000 vti_title:SR|Chapter 1 vti_nexttolast
UPR Mayagüez - ICOM - 4036
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|18 Oct 2005 18:41:18 -0000 vti_extenderversion:SR|5.0.2.6417 vti_author:SR|CHURCH\bvelez vti_modifiedby:SR|BVWS\bvelez vti_timecreated:TR|04 Sep 2003 17:25:30 -0000 vti_title:SR|Imperative Programming T
UPR Mayagüez - PA - 4029
ICOM 4029 Compiler Writing 1HandoutProgramming Assignment I1 Due Friday, September 3, 2004 at 11:59pmThis assignment asks you to write a short Cool program. The purpose is to acquaint you with the Cool language and to give you experience with so
UPR Mayagüez - ICOM - 4036
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|13 Oct 2004 16:46:56 -0000 vti_extenderversion:SR|5.0.2.6417 vti_author:SR|CHURCH\bvelez vti_modifiedby:SR|BVWS\bvelez vti_timecreated:TR|04 Sep 2003 17:25:30 -0000 vti_title:SR|Imperative Programming T
UPR Mayagüez - ICOM - 4036
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|11 May 2004 18:57:00 -0000 vti_extenderversion:SR|5.0.2.4803 vti_backlinkinfo:VX|courses/Fall2004/icom4036/icom4036.htm courses/Spring2004/icom4036/icom4036.htm vti_author:SR|CHURCH\bvelez vti_modifiedb
UPR Mayagüez - INEL - 4206
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|25 Nov 2002 14:19:52 -0000 vti_extenderversion:SR|5.0.2.3409 vti_author:SR|CHURCH\bvelez vti_modifiedby:SR|CHURCH\bvelez vti_timecreated:TR|22 Nov 2002 13:30:27 -0000 vti_title:SR|Problema vti_assignedt
UPR Mayagüez - ICOM - 4015
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|30 Jan 2001 13:43:12 -0000 vti_extenderversion:SR|4.0.2.4426 vti_backlinkinfo:VX|courses/spring2001/icom4015/icom4015.htm vti_cacheddtm:TX|30 Jan 2001 13:43:12 -0000 vti_filesize:IR|42496 vti_cachedlink
UPR Mayagüez - ICOM - 4015
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|18 Sep 2001 12:37:56 -0000 vti_extenderversion:SR|4.0.2.4426 vti_filesize:IR|60416 vti_title:SR|ICOM 4015 Advanced Programming vti_assignedto:SR| vti_approvallevel:SR| vti_backlinkinfo:VX|courses/fall20
UPR Mayagüez - ICOM - 4015
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|14 Nov 2001 16:22:06 -0000 vti_extenderversion:SR|4.0.2.4426 vti_backlinkinfo:VX|courses/fall2001/icom4015/icom4015.htm vti_filesize:IR|44544 vti_title:SR|ICOM 4015 Advanced Programming vti_syncwith_ece
UPR Mayagüez - PA - 4029
ICOM 4029 Compiler WritingHandout 4Programming Assignment IV1 A Semantic Analyzer for COOLDue Friday, November 14, 2003i.IntroductionIn this assignment you will implement the static semantics of Cool. You will use the abstract syntax trees
UPR Mayagüez - ICOM - 4015
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|02 Oct 2001 15:15:56 -0000 vti_extenderversion:SR|5.0.2.4803 vti_title:SR| vti_backlinkinfo:VX|courses/fall2001/icom4015/icom4015.htm vti_syncwith_ece.uprm.edu\:21/public_html:TX|02 Oct 2001 15:15:56 -0
UPR Mayagüez - ICOM - 4015
vti_encoding:SR|utf8-nl vti_author:SR|Michael vti_timecreated:TR|29 Feb 2000 02:30:38 -0000 vti_timelastmodified:TR|27 Mar 2000 14:32:00 -0000 vti_filesize:IR|50176 vti_title:SR|ICOM 4015 Advanced Programming vti_assignedto:SR| vti_approvallevel:SR|
UPR Mayagüez - ICOM - 4015
vti_encoding:SR|utf8-nl vti_author:SR|Michael vti_timecreated:TR|29 Feb 2000 02:30:38 -0000 vti_timelastmodified:TR|27 Mar 2000 14:32:00 -0000 vti_filesize:IR|59904 vti_title:SR|ICOM 4015 Advanced Programming vti_assignedto:SR| vti_approvallevel:SR|
UPR Mayagüez - ICOM - 4029
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|04 Oct 2004 20:46:56 -0000 vti_extenderversion:SR|5.0.2.6417 vti_author:SR|BVWS\bvelez vti_modifiedby:SR|BVWS\bvelez vti_timecreated:TR|04 Oct 2004 20:46:56 -0000 vti_cacheddtm:TX|04 Oct 2004 20:46:56 -
UPR Mayagüez - ICOM - 4029
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|04 Oct 2004 20:46:56 -0000 vti_extenderversion:SR|5.0.2.6417 vti_author:SR|BVWS\bvelez vti_modifiedby:SR|BVWS\bvelez vti_timecreated:TR|04 Oct 2004 20:46:56 -0000 vti_cacheddtm:TX|04 Oct 2004 20:46:56 -
UPR Mayagüez - ICOM - 4036
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|05 Apr 2005 17:18:26 -0000 vti_extenderversion:SR|5.0.2.6417 vti_author:SR|CHURCH\bvelez vti_modifiedby:SR|BVWS\bvelez vti_timecreated:TR|19 Mar 2004 16:55:12 -0000 vti_title:SR|Universidad de Puerto Ri
UPR Mayagüez - ICOM - 4036
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|08 Nov 2004 11:17:18 -0000 vti_extenderversion:SR|5.0.2.6417 vti_author:SR|BVWS\bvelez vti_modifiedby:SR|BVWS\bvelez vti_timecreated:TR|08 Nov 2004 11:17:18 -0000 vti_cacheddtm:TX|08 Nov 2004 11:17:18 -
UPR Mayagüez - ICOM - 4036
vti_encoding:SR|utf8-nl vti_author:SR|BVWS\bvelez vti_modifiedby:SR|BVWS\bvelez vti_timelastmodified:TR|08 Nov 2004 11:08:29 -0000 vti_timecreated:TR|08 Nov 2004 11:08:29 -0000 vti_cacheddtm:TX|08 Nov 2004 11:02:46 -0000 vti_filesize:IR|36352 vti_cac
UPR Mayagüez - ICOM - 4029
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|27 Aug 2003 18:35:04 -0000 vti_extenderversion:SR|5.0.2.4330 vti_author:SR|CHURCH\bvelez vti_modifiedby:SR|CHURCH\bvelez vti_timecreated:TR|20 Aug 2003 18:05:26 -0000 vti_title:SR|Introduction to Progra
UPR Mayagüez - ICOM - 4036
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|22 Oct 2004 15:27:20 -0000 vti_extenderversion:SR|5.0.2.6417 vti_author:SR|BVWS\bvelez vti_modifiedby:SR|BVWS\bvelez vti_timecreated:TR|22 Oct 2004 15:27:20 -0000 vti_cacheddtm:TX|22 Oct 2004 15:27:20 -
UPR Mayagüez - ICOM - 4036
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|21 Sep 2004 17:24:56 -0000 vti_extenderversion:SR|5.0.2.4803 vti_backlinkinfo:VX|courses/Fall2004/icom4036/icom4036.htm vti_author:SR|CHURCH\bvelez vti_modifiedby:SR|CHURCH\bvelez vti_timecreated:TR|21
UPR Mayagüez - INEL - 4206
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|17 Mar 2003 20:15:32 -0000 vti_extenderversion:SR|5.0.2.3409 vti_author:SR|CHURCH\bvelez vti_modifiedby:SR|CHURCH\bvelez vti_timecreated:TR|17 Mar 2003 14:40:29 -0000 vti_title:SR|Universidad de Puerto
UPR Mayagüez - INEL - 4206
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|19 Mar 2003 13:18:30 -0000 vti_extenderversion:SR|5.0.2.3409 vti_author:SR|CHURCH\bvelez vti_modifiedby:SR|CHURCH\bvelez vti_timecreated:TR|19 Mar 2003 13:18:30 -0000 vti_cacheddtm:TX|19 Mar 2003 13:18: