### Create a StudySoup account

#### Be part of our community, it's free to join!

Already have a StudySoup account? Login here

# Sample First Upload CS3060

UCCS

GPA 3.6

### View Full Document

## 163

## 2

1 review

## Popular in Object Oriented Programming With C++

## Popular in ComputerScienence

This 20 page Class Notes was uploaded by Andrew Notetaker on Saturday January 2, 2016. The Class Notes belongs to CS3060 at University of Colorado Colorado Springs taught by Dr. Rory Lewis in Fall 2015. Since its upload, it has received 163 views. For similar materials see Object Oriented Programming With C++ in ComputerScienence at University of Colorado Colorado Springs.

## Reviews for Sample First Upload

Please tell me you're going to be posting these awesome notes every week..

-*Mr. Zula Upton*

### What is Karma?

#### Karma is the currency of StudySoup.

#### You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 01/02/16

Principles of Computer Science 01/22/2014 ‘Variables: Rules: 1. Can be any length 2. No Spaces 3. Must begin with a letter, underscore or dollar sign ($) (No digits) 4. Cannot be a reserved word (Appendix A) 5. Can only contain alphanumerics, underscores, and $ Conventions 1. Start with a lower case 2. all lower case except when starting a new word (CamelCase) ▯ Types of Variable: 2 basic categories (but that's a lie) o Strings: char: single character - char letter = 'A'; Strings: conglomerate of chars - String word = "Hello"; Numerics: o Integers: int myAge = 18; byte short long o Decimals: double average = 87.9; float score = 79.8; Booleans (true, false, null) Class Names: Follow same rules and conventions as variables except begin with a capital letter. Quotes tells Java to ignore all the things within. Because. Declare variables at the beginning of main. Scanners – Import them if you need to get user input. nextInt() nextFloat() nextDouble() next() nextLine() ▯ ▯ Cast Operation: Mix data types -> Let’s you temporarily turn a variable into another. int numberOfExams = 12; double scoresTotal = 600.12; double average = 0; //average = scoresTotal/numberOfExams; average = scoresTotal/(double)numberOfExams; ▯ ▯ String: To declare a String variable: o String name = “Andrew”; o String greeting = “Hello “; o String message = greeting + “ “ + name; o System.out.printf(“%s”, message); o Casting from chars to numeric ▯ Chapter 1: Measurement ▯ F=ma ▯ tstringe@uccs.edu ▯ Fundamentals of Physics by Halliday, Resnik, and Wlaker, 10 Edition th ▯ Read the chapters ahead of time ▯ ▯ Kilograms, meters, and seconds – The standard units we will use for this class ▯ ▯ Mathematics will involve calculus, vectors, trigonometry, and algebra ▯ Final is May 14 Wednesday from 1:40 to 4:10p ▯ Bring Calculators and use them ▯ ▯ ▯ Science and Math Learning Centers uccs.edu/~slc/ uccs.edu/~mlc/ ▯ ▯ Successfully doing physics: Simplify (“The Spherical Cow”) Be very careful with units – Always check your units Common Sense test Think! Don’t plunge in and think about what actually is being done. Isolate the pieces and find the difficulty – Divide and Conquer ▯ ▯ Math to Review: Values of sines, cosines, and tangents of common angles (30, 45, 60) and the signs of these in the four quadrants. Binomial Theorem Quadratic Formula Scientific Notation ▯ ▯ Conversion: Using chains of 1’s. ▯ 2min = 2min(60sec/1min) = 120 seconds ▯ ▯ Themes from Chapter 1: SI units Significant Figures Converting units using chain-link method ▯ ▯ Example 1: Suppose x = (a+b)*c and a = 12.972, b = 3.9874 and c = 4.02E3. What is x? 68200 = 6.82E4 ▯ ▯ Example 2: Linda walks 45ft in about 1 minute. What is her speed in SI units? o 1m = 3.28 ft o 1 min = 60 seconds Speed in SI = m/s 45ft/1min * 1m/3.28ft * 1min/60sec = 0.2m/s ▯ ▯ Example 3: What speed would be required to go from Earth to the Andromeda Galaxy in 100 years? Distance to the Andromeda Galaxy = 2E22m D = 2 x 10^22m o T = 100 years V = D/T = 2E22m/100 years 100years * 365 days/1 year * 24 hours/1 day * 60 min/1 hour * 60 seconds/ 1 minute = 3E9 seconds 2E22/3E9 = 6E12 m/s ▯ ▯ Example 4: ▯ A gry is an old English measure for length, defined as 1/10 of a line which is in turn defined as 1/12 inch. A common measure for length in the publishing business is a point, defined as 1/72 inch. What is an area of . 5gry^2 in points squared. Area = 0.5 gry^2 x (1 line/10 gry)^2 x (1 inch/12 lines)^2 x (1 point/ (1/72)inch)^2 = ▯ ▯ Speed in furlongs per fortnight 6 furlongs/ 1 fortnight * 1 fortnight/2 weeks * 1 week/7days * 1 day/24 hours * 1hr/60 min * 1min/60 seconds * 201.168m/1 furlong = 1.0E-3 ▯ ▯ January 27, 2014 – ▯ Homework assigned, due next Monday check email for it Briefly recap delta x, V avg, S avg Problems in 2.1 Review/Introduce Calculus concepts o Integral and Derivative ▯ Chapter Two is Kinetics (the beginning of what you need for Mechanics) ▯ ▯ 1D – Motion along a line ▯ Define Displacement delta x as x2 – x1 ▯ Define Average Velocity V avg as delta x/delta t ▯ Define time displacement delta t as t2 – t1 where delta t must be > 0 ▯ Define Average Speed S avg as total distance/delta t ▯ ▯ Example 1: Drive 60mi at 60mph X = 0mi to x = 60mi Drive 60mi at 60mph X = 60mi to x = 0mi Vavg = (60-60)/1hr = 0mph Savg = (60 + 60)/2hr = 60mph ▯ Example 2: Savg Re: Drive 60mi at 60mph X = 0mi to 60mi Drive 30mi at 60mph X = 60mi to 30mi Vavg = (30)/1.5 = 20mph Savg = (60 + 30)/1.5 = 90/1.5 = 60 ▯ Sample Problem 2.01: ▯ You drive a beat up pickup truck along a straight road for 8.4km at 70km/h, at which point the truck runs out of gasoline and stops. Over the next 30min, you walk another 2.0km farther along the road to a gasoline station. a. what is your overall displacement from the begging of your drive to your arrival at the station? 10.4km (8.4 + 2) b. what is the time interval (delta t) from the beginning of your drive to your arrival at the station? .62 hours (37.2 minutes) (8.4/70 +.5) c. what is your average velocity from the beginning of your drive to your arrival at the station? (10.4/.62) = 17km/h d. Suppose that to pump the gasoline, pay for it, and walk back to the truck takes you another 45 minutes, what is your average speed from the beginning of your drive to your return to the truck with the gasoline? Savg = (10.4 + 2)/1.37 = 9.1km/h ▯ ▯ Problem 7: ▯ Two trains each having a speed of 30km/h, are headed at each other on the same straight track. A bird that can fly 60km/h flies off the front of one train when they are 60km apart and heads directly for the other train. On reaching the other train, the bird flies directly back to the first train, and so forth. What is the total distance the bird travels before the trains collide? Trick: Find point of collision of trains (60km/30km*2) = 1 hour. Now multiply time by bird speed (60km/h * 1h) There is your answer: 60km covered. ▯ ▯ Calculus Review and Introduction: ▯ ▯ Derivative: df/dt = limit as delta t goes to 0 of delta f/delta t F(t) = C then df/dt = 0 F(t) = Ct then df/dt = C F(t) = Ct^2 then df/dt = 2Ct F(t) = Ct^n then df/dt = nCt^n-1 Examples: o X(t) = 3t – 2 then dx/dt = 3 o X(t) = -4t^2 – 2 then dx/dt = -8t o X(t) = 2t^-2 then dx/dt = -4t^-3 o X(t) = -2 then dx/dt = 0 o Which ones have constant v = dx/dt? That would be A and D. ▯ ▯ X,V,A as functions of time are the next big step. X(t) V = dX/dT A = dV/dT ▯ ▯ ▯ ▯ Derivatives Review: ▯ Constants, linear equations and the like. ▯ d/dt(constant + alpha t + beta t ^2) ▯ = 0 + alpha + 2betat ▯ D/dt(alpha t^n) = n * alpha *t^n-1 ▯ ▯ Finish chapter 2 this week ▯ Homework on chapter 1 due on Monday, Homework on Chapter 2 assigned on Wednesday ▯ ▯ Chapter 2: Section 2-2: Instantaneous Velocity and Speed Section 2-3: Acceleration Section 2-4: Constant Acceleration Section 2-5: Free-fall Acceleration Section 2-6: Graphical Integration in Motion Analysis (read, no lecture) ▯ ▯ ▯ 2.2 – Instantaneous Velocity and Speed: V= limit as delta t approaches 0 of delta x/delta t o dx/dt Checkpoint One: o 1. X(t) = 3t-2 dx/dt = 3 o 2. X(t) = -4t^2 – 2 v = dx/dt dx/dt = -8t o 3. X(t) = 2/t^2 v = dx/dt dx/dt = -4/t^3 o 4. X(t) = -2 v = dx/dt = 0 ▯ 2.3 – Acceleration: Aavg = v2 – v1/t2 - t1 As delta t goes to 0 we get the instantaneous acceleration. A = limit as dt goes to 0 of v2-v1/dt == dv/dt d^2x/dt^2 = d/dt(dx/dt) Units on A: m/s^2 -9.8m/s^2 is gravity acceleration downward at the Earth’s surface. A g= 9.8 m/s^2 ▯ 2.4 – Constant Acceleration: This is the main point of the chapter. The real prize. 5 equations: Focus on three: o V(t) = Vo + At o X(t) = Xo + Vo*t+1/2*A*t^2 o V(X)^2 = Vo^2 + 2A(X – Xo) Derives these algebraically: o p.24 to see Derivation Algebraically Derive them using Calculus: o V(t) = Vo + At => A = dv/dt = 0 + A = A o X(t) = Xo + Vo*t+1/2*A*t^2 => V = dx/dt = 0 + Vo + At = V(t) Derive one of them algebraically: o V = Vo + At o X – Xo = Vot + 1/2At^2 o t = V-Vo/A o X- Xo = Vo(V-Vo/A) + 1/2A (V-Vo/A)^2 o X-Xo = VoV/A - Vo^2/A + A/2[V^2-2VVo+ Vo^2/A^2] o A(X-Xo) = -Vo^2/A + 1/2V^2+ Vo^2 o 2A(X-Xo) = V^2 – Vo^2 o Umm... Sure. ▯ ▯ Find the height of a thrown ball: A=-g & v(h) = 0 -Vo^2 = 2ah Vo^2/2g = h V = Vo +At 0 = Vo – g*tsubh Vo/g = tsubh ▯ ▯ February 3 2014 – Homework 2 due Monday February 10 3 Equations and 3 problems with those equations Start Chapter 3 on Vectors ▯ ▯ 3 Equations: V(t) = Vo + a*t X(t) – Xo = Vo*t + (1/2)*a*t^2 V(x)^2 = Vo^2 + 2*a*(x-xo) ▯ ▯ Just look at what you are given information wise and make the educated decision on what equation you want to use. If you are given Vo and A, and you want to find a stopping distance the look at the third equation (2-16) In the above, you are asked what time it takes to stop Use 2-11 with V=0 You are asked how far a particle goes in time t with some initial speed and acceleration a. Use 2-15 ▯ ▯ “Solvephysics.com” #74 – car moving at 10m/s from x=0 to x=d you are given acceleration a = 5m/s*s Want to find the distance traversed in the acceleration phase. Given time = 6s for acceleration Use 2-15 X(t) = (1/2) * 5*36 X(t) = 90 m. + 10*6 X(t) = 150m total. ▯ ▯ Building Problem: Top of the building, you throw a ball straight up in the air and goes to some height. See Moleskine notebook for this. ▯ ▯ #61 in the text: Vo = 0 drop a ball Given the time t12 = 0.1255 ------- 1.20m Lets work with bounce back up (+y direction) dT=1s Ball enters lower part of the window at y2 and moves up toward y1 Suggests 2-15 X-Xo = Vot+1/2at^2 Y1-y2 = V2dt – 1/2g*t^2 Y1-Y2 = 1.2m = V2(0.1255)-1/2(9.8)(.01255)^2 V2 = 10.2m/s dealing with bounce back up. 2-11 to get vB form v2 V2 = VB – gdTsub2b VB= 10.2m/s + (9.8)m/s*s(1s) VB = 20.0 m/s V^2-Vo^2 = 2a(x-xo) Vo = Vb V=0 a=-g x => y=h Y=0 -Vb^2 = -2gh h = Vb^2/2g h = 20/[2(9.8)] h = 20.4m ▯ ▯ That was intense… Wish I knew what he actually has just done. That is an intense serious weirdness. ▯ Seemingly not enough actually is enough. ▯ ▯ No problems with homework hopefully, apparently looks hard. ▯ Takes an hour at most, don’t make silly mistakes.’ Silly mistakes are the evil thing that makes our homework take longer. ▯ ▯ Chapter 3: Vectors: Quantities with both magnitude and direction. Distinguish vectors from scalars: scalars are just numbers (temperature, speed). Consider 2 dimensions: X and Y axis Vector A with angle theta between x and A Then we can project the vector along the axis using Ax and AY Concept of the Unit Vector: o i for x axis, j for y axis, k for z axis o they all are valued as unity. Break a vector down into compliments. o Then we can write A = Ax * I + Ay * j o In 3D then some vector V = Vx*I + Vy*j + Vz*k o Ax is the magnitude of A * cos(theta) o A = |A|(cos(theta)*i+(sin(theta) * j) o Adding vectors: A + b = c Addition graphically is easy. o A+B=C = (Ax + Bx)*I + (Ay + By)*j + (Az + Bz) *k ▯ ▯ Homework One returned: ▯ Answers were checked. ▯ ▯ More vectors: Things we need to know or whatever. Trigonometry and all of that. Denote a vector with an arrow over the top of an associated symbol. Vectors can be funcions of time, position, etc. Go through check point stuff to test knowledge of subjects in class. Most common way to add vectors, add the components. ▯ ▯ Monuments make momentous men immortal but more memorable are mortals making mere moments monumental. ▯ ▯ Vectors can be described as a Quantity with components in any of three perpendicular directions. Maybe. ▯ ▯ What is the magnitude of a vector? Vector A Magnitude = sqrt(Ax^2 + Ay^2 + Az^2) Q = 7.3i -2.1j Magnitude Q = sqrt(7.3^2 + (-2.1^2)) = 7.6 Qx = Mag.Q*cos(theta) Qy = Mag.Q*sin(theta) Cos(theta)^2 + sin(theta)^2 = 1 Tan(theta) = Qy/Qx = -2.1/7.3 = -0.29 Quadrants of Trigonometry: o ASTC are positive in 1234 o Just figure out what the XY values are in the different quadrants and use them to figure out trig. Some things that may not be obvious: o you can multiply vectors by scalars o Multiplication: o Dot Product: Written A • B = AxBx + AyBy + AzBz Just a number Two vectors such A•B = 0 are perpendicular o Cross Product: Written A x B = AyBz – AzBy * i + (AzBx-AxBz)*j + (AxBy – AyBx) * k Think about matrices for this ▯ ▯ X=Xo+Vot+1/2at2 ▯ ▯ This is the last lecture… ON VECTORS!!! ▯ Magnitude and Direction. ▯ Discussed Unit vectors – I j k for x y z ▯ Vector addition and subtraction. ▯ ▯ Vector Multiplication: Dot Product Cross Product Scalar Multiplication with Vectors ▯ ▯ Salient (Prominent and central) Ideas: Can not add scalars to vectors. Dot Product: If A • B = 0 Then vectors are perpendicular. o A•B = magA*magB*cos(ø) = 0 CROSS PRODUCT: o A x B = 0 means A and B are parallel. o C = A x B Is perpendicular to the plane of A,B o Use Right hand rule to determine the direction of C, I don’t know what that means… Vectors can be space and time dependent. o A(r,t) A as a function of r and t. Position vector is r, time vector is t ▯ ▯ Let’s prove 2 ways that A • (A x B) = 0 ▯ Algebraically: ▯ A•(AxB) = Ax(AyBz-AzBy) + Ay(AxBz-AzBx) + Az(AxBy-AyBx) ▯ AxAyBz – AxAzBy + AyAxBx – AyAxBx + AzAxBx – AzAyBx ▯ Cancel them out!!! ▯ ▯ Valid Vector Expression: Project Vector onto X Y and Z axis Projection of B onto Y-axis: B•j = By ▯ ▯ D1 = -3i + 3j + 2k ▯ D2 = -2i – 4j + 2k ▯ ▯ D1 • D2 = 6-12+4 = -2 ▯ Then cosø = (D1 • D2)/(mag.d1 * mag.D2) ▯ Cosø = -2/(4.7)(4.9) = cos(8.7e-2) ▯ 1.66*180 = something/pi ▯ 95º roughly. ▯ ▯ Project D1 onto D2 ▯ Let r be a unit vector along d2 ▯ ▯ -2i-4j+2k/4.9 ▯ ▯ d1 X r = (-3i+3j+2k) * (-2i – 4j + 2k)/4.9 ▯ 6-12+4/4.9 = -2/4.9 = -.41 ▯ ▯ HOMEWORK DUE MONDAY! ▯

### BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.

### You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

## Why people love StudySoup

#### "I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

#### "I used the money I made selling my notes & study guides to pay for spring break in Olympia, Washington...which was Sweet!"

#### "Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

#### "Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.