Course Hero - We put you ahead of the curve!
You have requested the below document.

Java_Tutorial Brandeis COSI 31a
Sign up now to view this document for free!
  • Title: Java_Tutorial
  • Type: Notes
  • School: Brandeis
  • Course: COSI 31a
  • Term: Spring

Coursehero >> Massachusetts >> Brandeis >> COSI 31a
Course Hero has millions of student submitted documents similar to the one below including study guides, homework solutions, papers, and exam answer keys.

Linux, Java, Emacs Tutorial COSI 31A 01/24/2008 Outline Simple java program Loops and statements Classes and objects Strings, Arrays, Vectors Inheritance Interfaces and Abstract classes Exceptions Linux commands Emacs 1 Java First Java Program /* My very first java program. */ public class HelloWorld { public static void main(String[] args) { // print message on screen System.out.println("Hello World"); System.out.println(" World" } } save this code in file named HelloWorld.java Compile: $ javac HelloWorld.java => creates HelloWorld.class file Run: $ java HelloWorld 2 First Java Program /* My very first java program. */ public class HelloWorld { public static void main(String[] args) { // print message on screen System.out.println("Hello World"); System.out.println(" World" } } Comments: multi-line and single-line Comments: multisinglemain method Called when "java HelloWord" is run Argument: Array args hold command-line arguments $ java HelloWord first program args[0] = first args[1] = program Methods public class HelloWorld { public static void printToScreen(String message) { System.out.println(message); } public static void main(String[] args) { printToScreen("My First Java Program"); printToScreen(" Program" printToScreen("Hello World"); printToScreen(" World" } } public : method can be called from outside this class static : method can be called without creating an instance void : return type (what the method returns) printToScreen : name of method String message : type and name of arguments passed into method 3 Learning Through Errors Four kinds of errors Insignificant errors Compile-time errors (syntax) Run-time errors (syntax) Semantic errors (bugs) Errors 1 public class HelloWorld { public static void main(String[] args) { main(String[] // print message on screen System.out.println("Hello World"); System.out.println( World" } } Insignificant Errors Misspell or leave out words in green Program works the same Compilation Errors Misspell or leave out words in yellow Program won't compile won' 4 Errors 2 public class HelloWorld { public static void main(String[] args) { main(String[] // print message on screen System.out.println("Hello World"); System.out.println(" World" } } Runtime Errors Misspell or leave out words in green Program will compile, but won't run won' Semantic Errors Misspell or leave out words in yellow Program works, but differently Operators Arithmetic operators +, -, *, /, %(mod) i = i + 5 => i += 5 i = i + 1 => ++i or i++ i = i - 1 => --i or i---i i-+ can also be used to concatenate strings String s = "Hello" + "World " + "!"; Hello" Relational operators ==, !=, <, <=, =>, > && (AND), || (OR), ! (NOT) 5 Data Types Primitive Reference boolean (true, false) char (`a', `z') (` int (1, 100, -8) float[32bit] (3.1415) double[64bit] (3.1415) Others: byte, objects arrays String (very basic) short, long for statement for (initialization; test; increment) { // body of loop } for (int i = 0; i < 5; i++) System.out.println("loop no. = " + i); System.out.println(" 6 while / do-while statement while (condition) { // body of loop do } { // body of loop } while (condition); int i = 0; while (i < 5) { System.out.println("loop no. = " + i); i++; } if statement if (condition) { // statements } else if (condition) { // more statements } else { // else statements } int x; if (x == 1) System.out.println("x = 1"); System.out.println(" 1" else if (x == 2) { System.out.println("x = 2"); System.out.println(" 2" } else System.out.println("x > 2"); System.out.println(" 2" 7 switch statement switch (variable) { case value1: // body of value1 break; case value2: // body of value2 break; ... default: // body of default } int month; switch (month) { case 1: System.out.println("Jan"); System.out.println(" Jan" break; case 2: System.out.println("Feb"); System.out.println(" Feb" break; ... default: System.out.println("N/A"); System.out.println(" N/A" } Outline Simple java program Loops and statements Classes and objects Strings, Arrays, Vectors Inheritance Interfaces and Abstract classes Exceptions Linux commands Emacs 8 Object-Oriented language In C, sub-problems solved by functions. subIn Java, solve sub-problems by sending messages to subobjects Object has a private state and a public message protocol. protocol. Example: A Stack State: A pile of objects Protocol: Push: Pop: "add an object to the stack" stack" "remove top object and return it" it" Classes and Objects public class Rectangle { // member variables private int length; private int width; // constructor special method // initializes variables when instance is created public Rectangle (int x, int y) { length = x; width = y; } // method area() calculates the area of this rectangle public int area() { int area = length * width; return area; } } 9 Classes and Objects public static void main(String[] args) { Rectangle r = new Rectangle (5,2); int area = r.area(); System.out.println("area = " + area); System.out.println(" } Method Overloading public double area(int x, int y) { ... } public double area(double x, double y) { ... } => calls the first method r.area(2.5,3.5); => calls the second method r.area(2,3); Overloading constructors public Rectangle (int length, int width) { ... } public Rectangle () { ... } 10 Static and Non-Static methods Static methods No need to create an instance to call the method System.out.println("a"); System.out.println(" Math.random(); Non-Static methods (instance methods) Create an instance of the class and then call the method r.area(2,3); Static and Non-Static variables Static variables Only one copy for all instances of that class Math.PI System.out Non-Static height width variables (instance variables) Each instance has its own copy 11 Objects as reference public class Rectangle { ... /* more methods in this class */ public void print() { System.out.print("l = " + length + "; "); System.out.print(" System.out.println("w = " + width); System.out.println(" } public void swap() { int temp = length; length = width; width = temp; } } Objects as reference Output Screen rect1 length = 5 width = 2 Rectangle rect1 = new Rectangle (5,2); Rectangle rect2 = rect1; rect1.print(); rect2.print(); rect2.swap(); rect1.print(); rect2.print(); 12 Objects as reference Output Screen rect1 rect2 length = 5 width = 2 Rectangle rect1 = new Rectangle (5,2); Rectangle rect2 = rect1; rect1.print(); rect2.print(); rect2.swap(); rect1.print(); rect2.print(); Objects as reference Output Screen l = 5; w = 2 rect1 rect2 length = 5 width = 2 Rectangle rect1 = new Rectangle (5,2); Rectangle rect2 = rect1; rect1.print(); rect2.print(); rect2.swap(); rect1.print(); rect2.print(); 13 Objects as reference Output Screen rect1 rect2 l = 5; w = 2 l = 5; w = 2 length = 5 width = 2 Rectangle rect1 = new Rectangle (5,2); Rectangle rect2 = rect1; rect1.print(); rect2.print(); rect2.swap(); rect1.print(); rect2.print(); Objects as reference Output Screen rect1 rect2 l = 5; w = 2 l = 5; w = 2 length = 2 width = 5 public void swap() { int temp = length; length = width; width = temp; } Rectangle rect1 = new Rectangle (5,2); Rectangle rect2 = rect1; rect1.print(); rect2.print(); rect2.swap(); rect1.print(); rect2.print(); 14 Objects as reference Output Screen rect1 rect2 l = 5; w = 2 l = 5; w = 2 l = 2; w = 5 length = 2 width = 5 Rectangle rect1 = new Rectangle (5,2); Rectangle rect2 = rect1; rect1.print(); rect2.print(); rect2.swap(); rect1.print(); rect2.print(); Objects as reference Output Screen rect1 rect2 l = 5; w = 2 l = 5; w = 2 l = 2; w = 5 l = 2; w = 5 length = 2 width = 5 Rectangle rect1 = new Rectangle (5,2); Rectangle rect2 = rect1; rect1.print(); rect2.print(); rect2.swap(); rect1.print(); rect2.print(); 15 Strings Not a primitive type, but very basic String s1 = "hello"; hello" String s2 = s1.substring(1,4); System.out.println(s2); // "ell" ell" System.out.println(s1.length()); // 5 // to check equality of strings if (s1.equals(s2)) // true statements else // false statements Other String methods at http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html Arrays Contains type a fixed number of objects of the same Usually created as any other object int[] digits = new int[10]; int digits[] = new int[10]; Can time also be created and initialized at the same int[] digits = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; No need to specify size or say "new" new" 16 Array of Objects When creating an array of objects, you must allocate the array using new allocate each object using new Rectangle[] rectangles = new Rectangle[5]; for (int i = 0; i < 5; i++) { rectangles[i] = new Rectangle (i,i); } By default primitive numeric: initialized to 0 Objects: initialized to null Some Array Operations To find number of elements access nth element array methods at rectangles.length To rectangles[n-1] rectangles[n- Other http://java.sun.com/j2se/1.5.0/docs/api/java/util/Arrays.html 17 Vectors Vector contains a variable number of objects of different types is a class, so create an instance first Vector Vector v = new Vector(); v.add(new Rectangle (2,3)); v.add(new (8,6)); Rectangle System.out.println("vector size = " + v.size()); System.out.println(" Some Vector Operations To find number of elements v.size() To access nth element v.get(n-1) OR v.elementAt(n-1) v.get(nv.elementAt(n- To add elements v.add(Object o) OR v.addElement(Object o) Other vector methods at http://java.sun.com/j2se/1.5.0/docs/api/java/util/Vector.html 18 Using Java Packages To use Vector class, you need to refer to it with its full name java.util.Vector v = new java.util.Vector(); OR import the class at the very top of the file import java.util.Vector; Can also import the entire package containing it import java.util.*; Generally import java.<package name>.* // import all classes import java.<package name>.<file name> // import 1 class Package java.lang is imported by default e.g. String, Thread Outline java program Loops and statements Classes and objects Strings, Arrays, Vectors Inheritance Interfaces and Abstract classes Exceptions Linux commands Emacs Simple 19 Inheritance Important Allows and useful concept of Java to reuse code when dealing with similar objects ways Three Extending existing classes Implementing interfaces Extending existing abstract classes Base/Parent class /* base class */ public class Person { // properties of a Person private String name, ssn; private int age; public Person(String n, int a, String s) { name = n; age = a; ssn = s; } public void printPerson() { System.out.println("Name: " + name); System.out.println("Age: " + age); System.out.println("SSN: " + ssn); } } 20 Extending a class to create Student object Student is a Person that has a major and a GPA Class Want construction to call constructor of base class <derived class> extends <base class> Use super(...) super(... Sub-class /* sub-class */ subpublic class Student extends Person { // properties for a Student only private String major; private double GPA; public Student(String n, int a, String s, String m, double g) { super(n, a, s); // call the constructor in the Person class major = m; GPA = g; } public void studentInfo() { printPerson(); // call this method in the Person class System.out.println("Major: " + major); System.out.println("GPA: " + GPA); } } 21 Modifiers public, private, protected Can pertain to class variables or methods private Can be accessed from within the class only Member variables are usually declared private and accessed by get() and set() methods public void set(String major); public String get(); protected Can be accessed from within the class and any of its subclasses public Can be accessed from outside the class Type-casting Example Vector v = new Vector (); Person p = new Person ("James", 45, 012345678); (" James" Student s = new Student("Mary", 21, 098765432, "cs", 3.8); Student(" Mary" cs" v.add(p); v.add(s); Person p1 = (Person)v.get(0); Student s1 = (Student)v.get(1); Person p2 = (Person)v.get(1); // can cast to Person too! 22 Interfaces Are used to define behavior of an object Contains signatures of methods that must be defined in the class implementing the interface Class construction <class> implements <interface> Example public interface Shape { public static final double PI = 3.14159; public double area(); } Implementing Interfaces public class Circle implements Shape { private double radius; // properties of Circle public Circle (double r) { radius = r; } public double area() { // calculate the area of a circle return PI * radius * radius; } } ----------------------------------------------public class Rectangle implements Shape { private double height, width; // properties of Rectangle public Rectangle (double h, double w) { height = h; width = w; } public double area() { // calculate the area of a rectangle return height * width; } } 23 Interfaces A class that implements an interface must implement all the methods of that interface be instantiated Cannot Shape s = new Shape (); // NOT ALLOWED!!! Can have only static member variables Abstract Classes Similar to interface, but some methods can be implemented can have member variables Methods that are not implemented should be declared abstract must be implemented in classes that extend that abstract class Abstract classes cannot be instantiated 24 Abstract Class /* abstract class */ public abstract class Employee { private String name, title; protected double salary; public Employee(String n, String t, double s) { name = n; title = t; salary = s; } public void printInfo() { // System.out.println("Name: " System.out.println("Salary: } implemented + name + ", title" + title); title" $ " + salary); public abstract void computeRaise(); } // not implemented Extending Abstract Classes public class Manager extends Employee { private static final double BONUS = 2500; public Manager(String n, String t, double s) { super(n, t, s); } public void computeRaise() { salary += salary * .05 + BONUS; } } --------------------------------------------public class Developer extends Employee { private int numOfPrograms; public Developer(String n, String t, double s, int np) { super(n, t, s); numOfPrograms = np; } public void computeRaise() { salary += salary * .05 + numOfPrograms * 25; } } 25 Outline java program Loops and statements Classes and objects Strings, Arrays, Vectors Inheritance Interfaces and Abstract classes Exceptions Linux commands Emacs Simple Exceptions A way to nicely handle an unexpected event or error a program can catch an exception can handle it as programmer wants can pass it further (method can throw an exception) Method throws exception public final void wait() throws InterruptedException; 26 try-catch Exceptions Try-catch statement try { //some methods or statements that can //result in an exception } catch(<Exception class> e) { catch(<Exception // do something to handle the exception } finally { // actions to do whether exception // occurred or not } Exceptions Only exception of type specified in catch statement gets caught and handled. exception is not caught, it propagates up the call stack to the calling method. If If it propagates up to the original call to main() and is still not caught, the program terminates with an error. 27 Exception example public class TestException { public static void main(String args[]) { int num, recip; // generate a random number 0 or 1 // random() returns a double, cast to int num = (int) Math.random() * 2); try { recip = 1 / num; System.out.println("The reciprocal is " + recip); } catch (ArithmeticException e) { // output the exception message System.out.println(e); } finally { System.out.println("The number was " + num); } } } Java References Java API specification http://java.sun.com/j2se/1.5.0/docs/api/index.html Java Tutorials http://java.sun.com/docs/books/tutorial/index.html 28 Some Linux Commands Linux Commands Just very few basic things that you might need Change current working directory $cd $cd [DIRECTORY] cs31a/PA1 $cd .. $cd ../../.. List the contents of a directory $ls $ls $ls [options] [FILE] cs31a 29 More Linux Commands Make directories $mkdir [options] DIRECTORY Remove files or directories $rm [options] FILENAME (irreversible! Use option -i for confirmation) Copy files and directories $cp [options] SOURCE DEST Move (rename) file and directories $mv [options] SOURCE DEST Display manual pages (very helpful) (very helpful) $man COMMAND File permissions Each file has permissions Operations: read (r), write (w), execute (x) Groups: owner, group, others To check permissions get long listing of file $ls l -rw-r-xr-rw- xr-- 1 cs31a guest 535 Sep 9 18:00 HelloWorld.java Interpreting the listing Permissions: {-} {r w -} {r - x} {r - -} => {d/-} {owner} {group} {others} {- {r {r {r {d Owner: cs31a (read & write) Group: guest (read & execute) Others: read Size: 535 bytes Last modified: Sep 9 18:00 Filename: HelloWorld.java 30 File permissions Permissions can be changed $chmod {a,u,g,o} {+,-} {r,w,x} FILENAME {+,- Example Initial permissions for file HelloWorld.java -r-xr-xr-- xr- xr-- Issue command: $chmod go-r HelloWorld.java go- Result: -r-x--x----x Other Linux commands A listing of Linux commands http://www.oreillynet.com/linux/cmd/ 31 Emacs Emacs Public domain text editor (GNU Emacs and XEmacs) Easy to use Easy text entry Cut and paste or search and replace using simple commands Creation of multiple screens Run unix shell in a window Special modes for C, Java, and other code files Allows coloring of code and automatic indentation 32 Using Emacs Start emacs typing buffer to file $emacs [FILENAME] Start Save <Ctrl-x><Ctrl-s> Ctrl- ><Ctrl Quit <Ctrl-x><Ctrl-c> Ctrl- ><Ctrl- emacs Most useful emacs commands <Ctrl-p> Ctrl<Ctrl-n> Ctrl<Ctrl-b> Ctrl<Ctrl-f> Ctrl<Ctrl-a> Ctrl<Ctrl-e> CtrlEsc 4 <Ctrl-p> Ctrl<Ctrl-d> Ctrl<Ctrl-k> Ctrl<Ctrl-y> Ctrl- move cursor to previous line move cursor to next line move cursor to backward move cursor to forward move cursor to beginning of line move cursor to end of line move cursor 4 lines up delete character at cursor cut from the cursor to end of line paste from clipboard 33 Learn More Emacs Basic emacs commands http://www.cs.colostate.edu/helpdocs/emacs.html 34

Find millions of documents here - Study Guides, Homework Solutions, Papers, Exam Answer Keys and more. Course Hero has millions of course related materials that will enable you to learn better, faster and get an A in all your courses.
Below is a small sample set of documents:

04. Equity Kidd version
Path: Old Dominion >> ECI >> 301 Fall, 2007

Description: What would you do? Ashley is a wiz at math. She \"gets\" everything instantly. It usually takes her only five minutes to do her math homework. Nick, on the other hand, struggles with math. He labors over math problems, sometimes for hours. Should...
case study
Path: LSU >> BLAW >> 3201 Spring, 2008
Description: case study chapter 7 State Farm Mutual automobile insurance v Campbell the question is whether, in the circumstances we shall recount, an award of 145 million in punitive damages where full compensatory damages are 1 million, is excessive an in viola...
hw2
Path: Brandeis >> MATH >> 15a Spring, 2008
Description: Otto Bretscher Linear Algebra with Applications 3rd Edition Section 1.3 18. 20. a. b. 52. Section 2.1 8. ...
chapter4
Path: University of Alberta >> STAT >> 151 Fall, 2007
Description: CHAPTER 4: PRODUCING DATA 4.1 Introduction How to verify the following statements? 1. 2. Pet owners are less likely to die of coronary heart disease. Regular large doses of vitamin C reduce the chance of getting a common cold. Response variable a v...
Geography
Path: LSU >> GEOG >> 2050 Spring, 2008
Description: Geography The science of geography Geography o The science that studies the relationships among natural systems, geographic areas, society, cultural activities, and the interdependence of all these over space Spatial- the nature and character of phy...
05. Accountability Kidd version
Path: Old Dominion >> ECI >> 301 Fall, 2007
Description: What do you think? Mrs. Bright is getting a huge bonus ($5,000) this year. Her fourth graders moved from an initial 3.1 grade eqivalency score in math at the start of the year to 5.0 at the end. Mr. Bummer works in another school across town. H...
series_solution1_examples_p2
Path: New Mexico >> CHNE >> 525 Fall, 2008
Description: 2 Series Solutions to Linear Ordinary Differential Equations II Examples: Solutions about an Ordinary Point yx c0 1 1 3 x 3 2 1 6 5 3 2 x6 c1 x 1 4 x 4 3 1 x7 7 6 4 3 This gives two solutions 1 3 1 1 y1 x 1 x x6 x9 3 2 6 5 3 2 9 8 6 5 3 2 1 ...
hw3
Path: Brandeis >> MATH >> 15a Spring, 2008
Description: Otto Bretscher Linear Algebra with Applications 3rd Edition Section 2.1 6. 20. 22. Section 2.4 4. 6. ...
chapter5
Path: University of Alberta >> STAT >> 151 Fall, 2007
Description: CHAPTER 5: PROBABILITY 5.1 What is probability? Random experiment results in one of a number of possible outcomes. The outcome that occurs cannot be predicted with certainty. Examples: Tossing a coin, rolling a die. Sample Space (S) - the list of a...
power_series_ode_solution1
Path: New Mexico >> CHNE >> 525 Fall, 2008
Description: Series Solutions to Linear Ordinary Differential Equations I Power Series Solution for the Harmonic Oscillator Equation : ODE: Transform independent variable Transform derivatives d2y dx 2 2 y 0 x dy dy d dx d dx d2y dx 2 d2y dx 2 dy d d dx 2 ...
hw6
Path: Brandeis >> MATH >> 15a Spring, 2008
Description: Otto Bretscher Linear Algebra with Applications 3rd Edition Section 5.1 10. and are perpendicular when . So, Section 5.2 2. 6. 16. ...
hw8
Path: Brandeis >> MATH >> 15a Spring, 2008
Description: Otto Bretscher Linear Algebra with Applications 3rd Edition Section 6.2 2. 6. 12. 14. ...
hw1a
Path: Brandeis >> COSI >> 30a Spring, 2008
Description: Michael Sipser Introduction To The Theory Of Computation 2nd Edition Chapter 0 (0.3) a. b. c. d. e. f. (0.5) (0.6) 1 2 3 4 5 (0.8) 6 7 6 7 6 1 2 3 4 5 6 7 8 9 10 10 10 10 10 10 7 8 9 10 6 7 7 8 8 9 9 8 7 6 10 6 6 6 6 6 a. b. c. d. e. 1 4 (0.10...
hw4
Path: Brandeis >> MATH >> 15a Spring, 2008
Description: Otto Bretscher Linear Algebra with Applications 3rd Edition Section 2.3 4. 6. 16. 20. ...
hw1
Path: Brandeis >> MATH >> 15a Spring, 2008
Description: Otto Bretscher Linear Algebra with Applications 3rd Edition Section 1.2 2. 4. 6. 8. ...
hw5
Path: Brandeis >> MATH >> 15a Spring, 2008
Description: Otto Bretscher Linear Algebra with Applications 3rd Edition Section 3.3 2. Redundant vectors: Basis of image: Basis of kernel: 4. Redundant vectors: none Basis of image: Basis of kernel: 6. Redundant vectors: Basis of image: Basis of kernel: 8. R...
hw7
Path: Brandeis >> MATH >> 15a Spring, 2008
Description: Otto Bretscher Linear Algebra with Applications 3rd Edition Section 6.1 10. By Sarrus\'s rule, is invertible. 24. is not invertible when , which is when . 32. By Fact 6.1.6, 44. For an matrix , : For any : For any matrix . , , , so . , so Th...
05series_solution2_frobenius_examples
Path: New Mexico >> CHNE >> 525 Fall, 2008
Description: Series Solutions to Linear Ordinary Differential Equations III Examples: Frobenius\' Solution about Regular Singular Points Text Example 2, pp. 253, 3rd ed Text Example 2, pp. xxx, 2nd ed ODE: 3xy\' \' y\' y 0 1 1 Standard form: y\' \' y\' y 0 3x 3x 1 Px 3x...
frobenius_p3
Path: New Mexico >> CHNE >> 525 Fall, 2008
Description: Series Solutions to Linear Ordinary Differential Equations III 3 Method of Frobenius Note: The indicial equation yields tow values for r. These are labeled r1 and r2 . By convention we take r1 to be the larger root r1 r2 . We get some information abo...
chapter1
Path: University of Alberta >> STAT >> 151 Fall, 2007
Description: CHAPTER 1: INTRODUCTION 1.1 What is Statistics? Questions to explore: 1. What is the population of Canada? What is the population of Alberta? Canada: 31,612,897, Alberta: 3,306, 359 (2006). Census (every member of the population counted). Also data c...
ProblemSet-6-2005
Path: New Mexico >> CHNE >> 524 Fall, 2008
Description: NE-524 Interaction of radiation with Matter Problem Set #6 (Complete by 11/20/2005) 1) Aluminum bronze, an alloy containing 90% Cu and 10% Al by weight has a density of 7.6 g/cc. What are the linear and mass attenuation coefficients? ( Cu = 9.91 and ...
frobenius
Path: New Mexico >> CHNE >> 525 Fall, 2008
Description: Series Solutions to Linear Ordinary Differential Equations III Method of Frobenius ODE for a 2nd order linear differential equation with a regular singular point x x 0 2 y \' \' x x 0 p x y\' q x y 0 This requires p(x) and q(x) are analytic at x x 0 Me...
ProblemSet-4-2005
Path: New Mexico >> CHNE >> 524 Fall, 2008
Description: NE-524 Interaction of radiation with Matter Problem Set #4 (Complete by 11/6/2005) 1) Give 1 gram of At-218 (T1/2 = 1.5 seconds), and assuming that all the alphas (E=6.694 MeV) interact with an Aluminum absorber in 0.1 seconds, how much energy is dep...
ProblemSet-5-2005
Path: New Mexico >> CHNE >> 524 Fall, 2008
Description: NE-524 Interaction of radiation with Matter Problem Set #5 (Complete by 11/13/2005) 1) A beam of 0.52 MeV electrons pass into a large reservoir of He at 3 atm pressure, 20 oC (electrons are totally absorbed). a) What is the range of the electrons? b)...
04terminology_ideal_rocket07
Path: New Mexico >> CHNE >> 515 Fall, 2006
Description: Rocket Terminology Total Impulse: The integral of thrust over time tb IT 0 Fdt where t b is the burn time. I T Ft b Constant thrust Specific Impulse: Total impulse divided by the weight of propellant burned tb Fdt Is g0 0 0 tb m dt Constant thr...
02fluid_eqns07part1
Path: New Mexico >> CHNE >> 515 Fall, 2006
Description: FLUID MODELS: Part 1 Basic Equations Consider a control volume of volume V fixed in space. Fluid is free to cross the surface of the volume. A surface element is denoted as dA and a unit normal vector outward from the surface is ^ denoted by n . u ...
03fluid_eqns07part2
Path: New Mexico >> CHNE >> 515 Fall, 2006
Description: FLUID MODELS: Part 2 Reduced Equations Splitting the energy equation: We can use the momentum equation and the continuity equation to write the energy equation in a shorter form. First take the dot product of u with the Du u p differential form o...
01rocket_eqn_momentum07
Path: New Mexico >> CHNE >> 515 Fall, 2006
Description: Thrust Equation - Momentum Transfer Consider a vehicle made up of mass m m moving at velocity v at time t. At time t t mass m has been ejected from the vehicle with a relative velocity v 2 so that m has a velocity v v 2 . The velocity of mass ...
05quasi1d_thrust_eqn_cv07
Path: New Mexico >> CHNE >> 515 Fall, 2006
Description: Steady Quasi-One Dimensional Flow Consider the control volume shown below. We will consider steady quasi-one-dimensional flow through the volume. Material enters the control volume at the inlet of area A1 with velocity v1 at pressure p1 , mass densit...
ENES102 hw 1
Path: Maryland >> ENES >> 102 Spring, 2008
Description: Problem 1.2: Problem 1.3: Problem 1.14: - Problem 1.16: Problem 1.21(a,f): -- Problem 1.22: Problem 1.27: Problem 1.28(a,d): ...
History_80_fullsyllabus[1]
Path: UCSB >> HIST >> 80 Spring, 2008
Description: History 80: East Asian Civilization Spring Quarter 2008 T-TH 9:30-10:45, Buchanan Hall, 1910 Sections as assigned. Instructor: Anthony Barbieri-Low HSSB 4225 805-893-4065 (no msg.) barbieri-low@history.ucsb.edu Office Hours: Tues. 12:30-2:30 TA\'s: ...
ENES102 hw 2
Path: Maryland >> ENES >> 102 Spring, 2008
Description: Problem 2.16: Problem 2.17: Problem 2.18: - Problem 2.19: Problem 2.21: Problem 2.22: Problem 2.25: Problem 2.26: Problem 2.33: - Problem 2.34: Problem 2.37(a): Problem 2.37(b): Problem 2.38(a): Problem 2.39(b): Problem 2.39(d): Prob...
ENES102 hw 3
Path: Maryland >> ENES >> 102 Spring, 2008
Description: Problem 3.6: Problem 3.7: Problem 3.9: Alternate Method: Problem 3.10: Problem 3.11: Problem 3.16: Problem 3.18: Problem 3.18 - Alternate Method: Problem 3.19: Problem 3.19 - Alternate Method: Problem 3.21: Problem 3.22: Problem 3.23: P...
ENES102 hw 6
Path: Maryland >> ENES >> 102 Spring, 2008
Description: Problem 6.8: Problem 6.10: Problem 6.12: Problem 6.13: Problem 6.13: (con\'t) Problem 6.17: Problem 6.20: Problem 6.23: Problem 6.23: (con\'t) Problem 6.25: Problem 6.26: Problem 6.27: Problem 6.30: Problem 6.31: Problem 6.35: ...
ENES102 hw 4
Path: Maryland >> ENES >> 102 Spring, 2008
Description: Problem 4.1: Problem 4.4: Problem 4.6: Problem 4.7: Problem 4.9: Problem 4.13: Problem 4.18: -- Problem 4.19: Problem 4.22: Problem 4.25: Problem 4.27: Problem 4.27: (con\'t) Problem 4.28: Problem 4.31: Problem 4.32: Problem 4.35: Pro...
CSDL1P1
Path: Syracuse >> CSD >> 315/615 Spring, 2008
Description: Anatomy 615 Index cards: Why did you enroll in this course? What do you expect to gain from this course? What are your concerns about the course? 1 CSD 315 ...
06. Obsolescence Kidd Version
Path: Old Dominion >> ECI >> 301 Fall, 2007
Description: Are dinosaurs cold-blooded or warm? What did you learn in school? From books? Dinosaur ectothermy (cold-bloodedness) remained a prevalent view until Robert T. \"Bob\" Bakker, an early proponent of dinosaur endothermy (warmbloodedness), published...
history80Essay1[1]
Path: UCSB >> HIST >> 80 Spring, 2008
Description: History 80: East Asian Civilization Spring 2008 Essay no. 1: DUE IN LECTURE: TUESDAY, APRIL 22, 2008 Your first essay will be an exercise in creative historical fiction, drawing from the lecture on the Warring States\' philosophers and from the passag...
Principles_of_Statistics_-_Exam_1
Path: CUNY City >> ECONOMICS >> 290 Spring, 2007
Description: Principles of Statistics First Examination Fall 2007 Name: Date: Instructions: Answer ALL the questions in the blue book. There is no need to write an explanation for the true or false questions or for the multiple-choice questions. For the problems...
212624
Path: Texas >> BIO >> 325 Spring, 2008
Description: ...
CSDL1P2
Path: Syracuse >> CSD >> 315/615 Spring, 2008
Description: Anatomy Of Respiration Respiration Respiration Inspiration Inhalation Breathing in Brings oxygen to the body\'s cells Expiration Exhalation Breathing out Eliminates waste products 1 Boyle\'s Law Pressure =force distributed over area P=F/A An incre...
Principles_of_Statistics_-_Exam_2
Path: CUNY City >> ECONOMICS >> 290 Spring, 2007
Description: Principles of Statistics Second Examination Fall 2007 Name: Date: Instructions: Answer ALL the questions in the blue book. There is no need to write an explanation for the true or false questions or for the multiple-choice questions. For the problem...
212655
Path: Texas >> BIO >> 325 Spring, 2008
Description: ...
PStats_-_H3_-_GH
Path: CUNY City >> ECONOMICS >> 290 Spring, 2007
Description: Homework PRINCIPLES OF STATISTICS 3 Spring 2008, Homework 3 Name 1: Name 2: Name 3: Name 4: Name 5: Instructions This homework consists of 5 questions. You must provide interpretations of your answers, not just calculations. The homework is due ...
212717
Path: Texas >> BIO >> 325 Spring, 2008
Description: ...
212852
Path: Texas >> BIO >> 325 Spring, 2008
Description: ...
PStats_-_H4_-_GH
Path: CUNY City >> ECONOMICS >> 290 Spring, 2007
Description: Homework PRINCIPLES OF STATISTICS 4 Spring 2008, Homework 4 Name 1: Name 2: Name 3: Name 4: Name 5: Instructions This homework consists of 7 questions. You must provide interpretations of your answers, not just calculations. The homework is due ...
103EX2-practice_ans
Path: CUNY City >> CHEM >> 103 Spring, 2007
Description: THE CITY COLLEGE Department of Chemistry Chemistry 103 ANSWERS TO PRACTICE EXAMINATION II Work problems out to the correct number of significant figures! 1. (8 pts) a) In the SI system , the derived units for pressure in Pascals are kg/m .s2 . b) Ch...
212808
Path: Texas >> BIO >> 325 Spring, 2008
Description: ...
213541
Path: Texas >> BIO >> 325 Spring, 2008
Description: ...
212744
Path: Texas >> BIO >> 325 Spring, 2008
Description: ...
212830
Path: Texas >> BIO >> 325 Spring, 2008
Description: ...
urban anthro study guide 2
Path: Bucknell >> EDUC >> 243 Winter, 2008
Description: Urban Anthro. STUDY GUIDE 2 Urbanism- UL (61-63) Definitions of City How does a person define the concept of a city? Where exactly is the line drawn between city, suburb, and rural areas? Personal reference is a subjective way to define a city. Where...
learnring log 2
Path: Bucknell >> EDUC >> 243 Winter, 2008
Description: Learning Log 2 Knowledge It is necessary to understand how children grow and develop to realize how to effectively teach, and in the second chapter of the text, the Piaget, Vygotsky, and Erikson views of cognitive, personal and social development are...
learning log 10
Path: Bucknell >> EDUC >> 243 Winter, 2008
Description: Learning Log 10 Knowledge The main idea of chapter 10 is that motivation, which is an internal process that activates, guides, and maintains behavior over time, is critically important for students and teachers in the classroom. Theories of motivatio...
learning log 3
Path: Bucknell >> EDUC >> 243 Winter, 2008
Description: Learning Log: Chapter 3 Knowledge The main idea is that children develop physically through changes in muscle development at early ages and later in life through puberty, mentally by becoming fully literate, socially with peer interaction and cogniti...
urban anthropolgy study guide 1
Path: Bucknell >> ANTHRO >> 290 Winter, 2008
Description: URBAN ANTHROPOLOGY-STUDY GUIDE EXAM 1 Urban Danger: Life in a Neighborhood of Strangers Sally Engle Merry pp.115-126 Ethnographic study of a multiethnic housing project in a high-crime neighborhood shows how the boundaries between social groups cont...
162C HW_2
Path: UCSB >> ECE >> 162c Spring, 2008
Description: ECE 162C: PROBLEM SET #2 DUE WEDNESDAY, APRIL 16, 2008 PROBLEMS: 1. Derive an expression for the confinement factor of single mode fibers defined as the fraction of the total mode power contained inside the core . Use the Gaussian approximation for...
HW_Set_13_1
Path: LSU Shreveport >> CHEM >> 121 Fall, 2008
Description: ...
CSDL3
Path: Syracuse >> CSD >> 315/615 Spring, 2008
Description: Anatomy Of Respiration Structures of Respiration Bony thorax Visceral thorax Muscles 1 The Rib Cage Forms the front, sides, and back of the bony thorax Mobility Consists of 12 thoracic vertebrae Sternum 12 pairs of ribs The Rib Cage 2 The Ribs ...
HW_Set_13_2
Path: LSU Shreveport >> CHEM >> 121 Fall, 2008
Description: ...
HW_Set_14_1
Path: LSU Shreveport >> CHEM >> 121 Fall, 2008
Description: ...
HW_Set_14_2
Path: LSU Shreveport >> CHEM >> 121 Fall, 2008
Description: ...
jjjournal1
Path: Kutztown >> CRJ >> 221 Spring, 2008
Description: Dr. Khondaker Juvenile Justice System Journal Entry #1 1. Having a separate justice system for juveniles can be traced back all the way to common law in England. They stated that children under seven should not face legal punishments. However, in the...
CSDL4
Path: Syracuse >> CSD >> 315/615 Spring, 2008
Description: Anatomy of Respiration Muscles of Expiration Muscles of Expiration Thorax Abdomen Passive Expiration Back Forced Expiration 1 Internal Intercostal Interosseous Portion O: Inferior margin of ribs 1-11 I: Superior surface of the rib below In: Interc...
jjjournal9
Path: Kutztown >> CRJ >> 221 Spring, 2008
Description: Dr. Khondaker Juvenile Justice System Journal 9 1. The reintegration philosophy, used by community-based programs, states that the community that the offender will be reentered into also must be changed; not just the offender. The community is just a...
jjjournal8
Path: Kutztown >> CRJ >> 221 Spring, 2008
Description: Dr. Khondaker Juvenile Justice System Journal 8 1. Probation is the suspension of a jail sentence. A juvenile who has been convicted of a crime does not serve jail time. The court orders probation and the juvenile returns to the community for a certa...
jjjournal5
Path: Kutztown >> CRJ >> 221 Spring, 2008
Description: Dr. Khondaker Juvenile Justice System Journal 5 1. Preventive detention occurs after the juvenile is taken by the police to the intake personnel. The intake personnel then review the case and decide if the juvenile should be taken to juvenile court. ...
jjjournal6
Path: Kutztown >> CRJ >> 221 Spring, 2008
Description: Professor Khondaker Juvenile Justice System Journal 6 1. A guardian ad litem is \"usually a lawyer who is appointed by the court to take care of youths who need help, especially in neglect, dependency, and abuse cases, but also occasionally in delinqu...
HW_Set_15_2
Path: LSU Shreveport >> CHEM >> 121 Fall, 2008
Description: ...

Course Hero is not sponsored or endorsed by any college or university.