The Internet belongs to everyone. Let’s keep it that way.

Protect Net Neutrality
Loading presentation...

Present Remotely

Send the link below via email or IM


Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.


Lecture 5 - Oct 20 2014

No description

Arman Suleimenov

on 20 April 2015

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Lecture 5 - Oct 20 2014

A few notes on the assignment 0
Good folder hierarchy
/Users/armansu/Documents/CIS 1.1 - ADA University/Assignments/hw0/
Output should match exactly. Don't forget to print a newline. Examples:
1) Hi Paul, John, Ringo, and George.
2) 11 + 7 + 3 = 21
3) distance from (5, 7) to (0, 0) = 8.602325267042627
For faster response, it's better to ask your questions on Piazza, rather than email (you can post anonymously if you want):
Don’t send your files over email, submit homework using PowerCampus.
In your questions, be more specific than asking, ‘Is this correct?’ I can tell you whether it's correct after Monday deadline :)

Q) Do you want be specific or general?
A) Specific. The way I will call your program is this:
java EuclidianDistance 5 7
NOT like this:
java EuclidianDistance 5 7 0 0
If you get an error after compiling, read the error message. Make sure your program and the file have the same name. If your program is called SumThree, but the file name is, it won't compile. The file name should be

Q) Why do I get an error when I run:
java UseArgument
A) Because you're not providing the argument:
java UseArgument Berti

Given the temperature t (in Fahrenheit) and the wind speed v (in miles per hour), compute the wind chill w using the formula from the National Weather Service:

w = 35.74 + 0.6215*t + (0.4275*t - 35.75) * v ^ 0.16

Compilation: javac
Execution: java WindChill t v

Why use Math.pow(x, 2.0) to find the square of x, when you can just do x * x?
Read 3 integer values from the command line and print them in ascending order.

Compilation: javac
Execution: java ThreeSort num1 num2 num3

% java ThreeSort 17 50 33
Type conversion
1.01^40 = 1.49
0.99^40 = 0.67
The power of small steps
180 sites in 180 days
Full transcript