Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more.
Course Hero has millions of course specific materials providing students with the best way to expand
their education.
Below is a small sample set of documents:
Iowa State - ENG - 446
= d Volx dx y dy = dz z x y z x y z d d = r d r d r d d r = ( x, y , z )D D D = d = Dt ( d) Dt Dt Vol Vol r r r d = d d d Dr D Dt
University of Alabama in Huntsville - EE - 213
EE 213 Thevenin Equivalent Circuit Examples 1. For the following circuit, use a Thevenin equivalent circuit to solve for the voltage VO.6 28 V42 + _ 1+ VO -2+ _ IO12 V8A2. For the following circuit, use a Thevenin equivalent circuit
Iowa State - ENG - 215
cal , display a calendar cat, concatenate and display cc , C compiler cd , change working directory chmod, change the permissions mode of a file cmp , perform a byte-by-byte comparison of two files
Iowa State - ENG - 215
%-global variables needed in functionglobal aa=2.;%-get guess for x from user inputx=input('Enter starting guess: ');%-let matlab do the iteration workfzero('myf',x)
Iowa State - ENG - 215
%-get input from the user for start, end & incrementx0 = input('Input starting x: ');xf = input('Input ending x: ');xi = input('Input x increment: ');%-global variables for functionglobal aa=2.;%-begin with function evaluation at beginning
Iowa State - ENG - 215
function k = findk(myz)global x f N;for j=1:length(myz), for i=1:N-1, kode=0; if myz(j) <= x(i+1) k(j) = i; kode=1;break;endend if kode = 0 k(j)=N-1; endendreturn;
Iowa State - ENG - 215
50.50.60.81.00.8
Iowa State - ENG - 215
%-function name and arguments and return infofunction y = myf(x)%-global variablesglobal a;%-function calculationy=a*sin(x)-x;%-return from functionreturn;
Iowa State - ENG - 215
function y = myf(myz)global x f N;k=findk(myz); for j = 1:length(k), i=k(j); y(j) = f(i)+(f(i+1)-f(i)*(myz(j)-x(i)/(x(i+1)-x(i); endreturn;
Iowa State - ENG - 215
1 2 - M = 1+ 2 1 M 2 B +12[ ()] )]( +1) ( -1)f 1( M ) = BM 2 -1 2 f 2( M ) = 2 1+ +1 2 M[ (( +1) ( -1)
Iowa State - ENG - 215
%-Sample m-file integrating f(x)dx where f(x) is given in a file as discrete% data along with x in a separate file. The x data is actually given in a % file containing x and y from which youi must extract x. This code shows% how to do that.
Iowa State - ENG - 215
%-Clean upclear all;%-Get ffile and xyfile names - enter in single quotes:global x f N;ffile=input('Enter f-file name: ');xyfile=input('Enter xy-file name: ');%-Get file handles (pointers in C)ffid = fopen(ffile,'r');xfid = fopen(xyfi
Iowa State - ENG - 215
5 1.0 0.0 2.0 0.0 3.0 0.0 4.0 0.0 5.0 0.0
Cornell - CS - 100
CS 100 Introductory Survey Summer 2001 Due in lecture, Tuesday June 26Name: Cornell net id (e.g. xyz12): (Note: if we need to contact you, we will use your netid@cornell.edu email address.) Class (circle one): High school student College: Freshman S
Cornell - CS - 100
f%1h) 1ddtt) ro xsP(!d $ dP4hoddoPddt)e)d )Yo dttt1Xy 4Y%ttxrPPditoY dPP|t G xt oP4ho1Ixtob)|U)d oP
Cornell - CS - 100
CS 100, Summer 2001Monday, 6/25Lecture 1-Introduction: + Welcome to CS 100!+ Instructor: Kiri Wagstaff+ TAs (Ben, Jay, Hongjie)+ Consultants (Jason, Radha, Sada)Announcements: + Important dates (see Info handout / website)+ Kiri out of tow
Cornell - CS - 100
/* *Program to determine area of a circle. *Author: Jane Q. Programmer. *Email Address: janeq@somemachine.etc.etc. *Programming Assignment 2. *Last Changed: October 7, 2001. **/public class CircleCalculation{ public static void main(Strin
Cornell - CS - 100
@xido'n|d~d~xqddnlin~bqdxmpxd@dq v g | q | ~ j ~ o xmd~ oo yz omuzidih'efdx'I4iI@Ex2wxviddoqxEhm2IypxdikjEihig ~ ~ g l x'EEutrpxmpd2d@ImI'Exp2d@hqm2dnx ztdqnq | q q s q ~ q ~
Cornell - CS - 100
CS 100, Summer 2001Tuesday, 6/26Lecture 2 -Introduction:+ Collect Survey+ Collect Exercise 1Announcements:+ Exercise 2 due Wednesday, 6/27+ Assignment 1 due Thursday, 6/28+ reading: Savitch 3.1, 3.2 (only while), 3.4 and Chapman (Ch. 1)+ h
Cornell - CS - 100
/ Author: Kiri Wagstaff, wkiri@cs.cornell.edu / Date: June 26, 2001public class Lecture2 { public static void main(String[] args) { / Four basic data types: int nStudents = 51; double avgGrade = 88.3; char finalGrade =
Cornell - CS - 100
CS 100, Summer 2001Wednesday, 6/27Lecture 3 -+ Collect Exercise 2Announcements: (2 mins)+ Assignment 1 due Thursday, 6/28+ reading: Savitch 3.2--Topics:+ operators+ expressions+ statements+ conditional statements-Miscellaneous:- do ch
Cornell - CS - 100
/ Author: Kiri Wagstaff, wkiri@cs.cornell.edu / Date: June 27, 2001public class Lecture3 { public static void main(String[] args) {/* * Read program, predict output, then run it and check yourself. * */ System.out.println("Welco
Cornell - CS - 100
/ Original author: David I. Schwartz, dis@cs.cornell.edu/ Modified slightly by Kiri Wagstaff, wkiri@cs.cornell.edu/ Date: June 27, 2001/ This program swaps two values (do you believe it?)public class Swap { public static void main(String[]
Cornell - CS - 100
/ Author: Kiri Wagstaff, wkiri@cs.cornell.edu / Date: June 27, 2001/ Example of if statementpublic class Conditional { public static void main(String[] args) {boolean myBoolean = true;if (myBoolean){ System.out.println("Yes
Cornell - CS - 100
/ Author: Kiri Wagstaff, wkiri@cs.cornell.edu / Date: June 27, 2001/ Brief quizpublic class Quiz { public static void main(String[] args) {/ 1. Calculate the average of { 1, 2, 3, 4, 5 }/ Two possible solutions: System.out.println
Cornell - CS - 100
R Q H # D PHIF DC @9 786 1 4$2 () & % isii s%bi%HRsiP"!siRisGB"3R"H31 0 i'$ E A 0 5 a b c int s y x rq u t x r s r h w r h t u t s r p gi g utrvtP"vgq"hefRib RiisbsRhPRs gi%ibh
Cornell - CS - 100
CS 100, Summer 2001Thursday, 6/28Lecture 4 -+ Collect Assignment 1Announcements: + Pick up (graded) Exercise 2+ Exercise 3 due Friday+ reading: Savitch 2.2 (Strings) and 3.1 (Cond operator)+ Ben and Hongie's office location (328)+ Assignmen
Cornell - CS - 100
/ Author: Kiri Wagstaff, wkiri@cs.cornell.edu / Date: June 28, 2001public class Div3 {public static void main(String[] args) {/ Output all the numbers from 1 to 10 that are/ evenly divisible by 3:if (1 % 3 = 0){System.out.prin
Cornell - CS - 100
/ Author: Kiri Wagstaff, wkiri@cs.cornell.edu / Date: June 28, 2001public class WhileLoop {public static void main(String[] args) {/ Output all the numbers from 1 to 20 that are/ evenly divisible by 3:/ Loop: setupint checkNum
Cornell - CS - 100
/* *Program to find the greatest common divisor of two integers * *Algorithm by Euclid * *Jay Henniger *June 26, 2001 *henniger@cam.cornell.edu **/public class GCD{ public static void main(String[] args){/Declare variablesin
Cornell - CS - 100
a acSQPWVURSQPwXWW0b`cvQs#`c rhiReIFRSXcbSRSWVTSPQIGE%1 BA4 @ H s H q sU y E x H c U EUU R X s u R t H q p g f Ed E a ` Y E X EUU R R H F D C 2 9 47 ) 2 1 ) ' " 68654230(`&2`Fi8$%#d8!q &)3&d8 3&3d)VVVF`)!)2`2`
Cornell - CS - 100
CS 100, Summer 2001Monday, 7/2Lecture 5-Announcements: + Pick up (graded) Assignment 1+ Exercise 4 due Tuesday (7/3)+ Changes: + Assignment 2 due Friday (7/6) + PRELIM 1 on Monday (7/9): covers Savitch Ch.1-3+ reading: Savitch ?-- Assig
Cornell - CS - 100
/ This version uses a while loop.public class SpaceInvadersWhile{ public static void main(String args[]) { / Use invalid values for min and max so / we know they need to be updated with the first number int minScore = -1; i
Cornell - CS - 100
CS 100, Summer 2001Tuesday, 7/3Lecture 6-Announcements: + Hand in Exercise 4+ Assignment 2 due Friday (7/6)+ PRELIM 1 on Monday (7/9)+ Change in consultant and office hours this week (Weds to Thurs)+ reading: Savitch 5.1, 5.2, skim 5.3-- P
Cornell - CS - 100
/ This version uses a do-while loop.public class SpaceInvadersDoWhile{ public static void main(String args[]) { / Use invalid values for min and max so / we know they need to be updated with the first number int minScore = -1;
Cornell - CS - 100
CS 100, Summer 2001Thursday, 7/5Lecture 7-Announcements: + Assignment 2 due Friday (7/6)+ PRELIM 1 on Monday (7/9): covers Savitch Ch.1-3, all lectures, exercises, assignments 1 and 2+ Leave office hours as is - if you cannot make them, please
Cornell - CS - 100
%-% CS 100, Summer 2001% Thursday, 7/5% Lecture 7% Author: David Schwartz, dis@cs.cornell.edu%-% This file will run in MATLAB!% To run it, do:% > addpath <directory where this file is>% > matlab1 %-% Notation:% + The percent symbol (%) me
Cornell - CS - 100
/ Trying out methods/ Author: Kiri Wagstaff/ Date: July 2, 2001public class Methods{ / myPrint: print a string enclosed by angle brackets / Input: a string / Output: none (void) public static void myPrint(String s) {System
Cornell - CS - 100
66666666 66666666 66666666 66666666 66666666 66666666 66666666 66666666 yIyay 4dqd ) ddI6m ) ddI6m ) ddIm ) ddIm ) ddIm ) ddIq ) ddIq ) ddIqzs} | mj | $X n s} y~| sX | s}
Cornell - CS - 100
Prelim 1 Grading Guide/SolutionsProblem 1, Part A (10 points total)The correct answer is: The value of x is _26_. (3 points) -1 for x = 28. -2 for x = 4. -2 if the x value is not an integer. The value of y is _16_. (3 points) -1 for y = 15 or y = 3
Cornell - CS - 100
5W5 b 9952bH5D 55D9SR25925a 5a55Fa22 cb& Fv 5X5eW $H5F52eeW H&F52FX555 9X2&a5X555X5W5WIU" 2 W F2v y k j ~ l5X~Xwj
Cornell - CS - 100
wee hY%c wc pcce x@w } v t v rq q o v q rq q o | { v u o o n | {y s q s rq u t z oy @ugceue{h{cxe~oce~hscs&we{t@ezeuo x pwhxe~hreqp}pcwe{hesps x eueot%xeqp5Qf CklifgdeAdceicedYqceybhcwwehwv!pdcxwhuphphedc` wv q s r
Cornell - CS - 100
CS 100, Summer 2001Tuesday, 7/10Lecture 8-Announcements: + Exercise 5 due 7/11+ PRELIM 1 results (avg 53, good!)+ Assignment 2 results (avg 84/100!)+ drop deadline is Friday+ will post grades soon; please check them over+ reading: Savitch 5
Cornell - CS - 100
Floating, by Ray Thomas (performed by the Moody Blues)-Floating, free as a birdSixty foot leaps It's so absurdFrom up here you should see the viewSuch a lot of space for me and you!Oh, you'd like itGliding around Get your feet off the grou
Cornell - CS - 100
Floating, by Ray Thomas (performed by the Moody Blues)-Floating, free as a birdSixty foot leaps It's so absurdFrom up here you should see the viewSuch a lot of space for me and you!CHORUS:Oh, you'd like itGliding around Get your feet off
Cornell - CS - 100
/ Lack of methods/ Author: Kiri Wagstaff/ Date: July 2, 2001/ This version uses no methods; note repetition.public class NoMethods{ public static void main(String args[]) {String name = "Kiri";System.out.println("The string is "
Cornell - CS - 100
/ Trying out methods, part 2/ Author: Kiri Wagstaff/ Date: July 4, 2001public class TensComplement{ / tensComplement: take in a number and output 10 minus that number / Input: a number from 0 to 10 / Output: 10 minus the given number, or -
Cornell - CS - 100
/ Basic concepts of scope/ Dealing mostly with variables; will eventually expand to methods/ Author: David Schwartz, dis@cs.cornell.edu/ Modified by: Kiri Wagstaff, wkiri@cs.cornell.edupublic class scope { public static void main(String[] ar
Cornell - CS - 100
/ BunchOfGrapesNoObjects.javapublic class BunchOfGrapesNoObjects{ / Set up variables to keep track of three / bunches of grapes public static int numGrapesInBunch1; public static int numGrapesInBunch2; public static int numGra
Cornell - CS - 100
/ BunchOfGrapes.java/ NOTE: None of the methods are static!public class BunchOfGrapes{ public int numGrapes; public boolean isWashed; / Constructor: create a new bunch of grapes / Input: How many grapes are in the bunch / Out
Cornell - CS - 100
/ GrapesTester.java/ Author: Kiri Wagstaff/ Date: July 8, 2001public class GrapesTester{ public static void main(String args[]) {/ Create three bunches of grapesBunchOfGrapes bunch1 = new BunchOfGrapes(20);BunchOfGrapes bunch2 = ne
Cornell - CS - 100
v v v w w o j o w v xj h w o o l o o e j swdpxx%wxih%suzihwx%xihyuxivf!hxihxutswx%mlih%ihndoesdh1djndekdsiddeQ1ihx!x j wh o h o xxdoidswdjdw1deqsx eddp1owxihnidhemsfswxvYsidhdehwfddwdYhswxxxxxu j eh r g e v v l k w j w e g e w
Cornell - CS - 100
CS 100, Summer 2001Wednesday, 7/11Lecture 9-Announcements: + Exercise 6 due 7/12+ drop deadline is Friday+ will post grades today, please check them+ reading: Savitch 4.2, 5.6-Topics:+ scope+ methods+ OOP (object oriented programming)+
Cornell - CS - 100
/ Spaceship.java: implementation of a spaceship/ The spaceship is located inside a 10x10 grid./ Position (1,1) is at the upper left corner;/ Position (1,10) is the upper right;/ Position (10,1) is the lower left;/ Position (10,10) is the
Cornell - CS - 100
/ SpaceshipTester: tests your implementation of the Spaceship class/ Author: Kiri Wagstaff/ Date: July 7, 2001/ - Do not modify! -public class SpaceshipTester{ / Main method: provides a means to test your implementation / of the Spacesh
Cornell - CS - 100
CS 100, Summer 2001Thursday, 7/12Lecture 10-Announcements: + Assignment 3 due 7/13+ drop deadline is Friday + did you check the posted grades?+ reading: Savitch 5.4 - also, go back now and re-read 5.1, 5.2, 5.3 - they are certain to make
Cornell - CS - 100
CS 100, Summer 2001Monday, 7/16Lecture 11-Announcements: + Assignment 4 due 7/19 - note Spaceship.java has changed (again) - download new version+ Prelim 2 on 7/20 (topics posted to Web soon)+ reading: Savitch 6.1, 8.1-Topics:+ encapsulat
Cornell - CS - 100
import javax.swing.*;import java.awt.*; /* *Simple demonstration of drawing a face in a JFrame. */public class Madeleine extends JFrame{ public static final int FRAME_WIDTH = 400; public static final int FRAME_HEIGHT = 400; public
Cornell - CS - 100
import javax.swing.*;import java.awt.*;/* *Simple demonstration of drawing a face in a JFrame. */public class MadeleineColor extends JFrame{ public static final int FRAME_WIDTH = 400; public static final int FRAME_HEIGHT = 400; pub
Cornell - CS - 100
CS 100, Summer 2001Tuesday, 7/17Lecture 12-Announcements: + Assignment 4 due 7/19+ Prelim 2 on 7/20 + reading: Savitch 6.2, Chapman 2.3, 2.4, 2.5, 2.7, 2.0--Topic:+ arrays--+ Online submission: did it work? - Allows us to run our own
Cornell - CS - 100
/ Spaceship2000: A new and improved Spaceship class/ Author: Kiri Wagstaff, wkiri@cs.cornell.edu/ Date: July 16, 2001/ Note this file only includes enough methods so that/ the new method, moveFormation(), will work./ Also note that isValidPositi