Download presentation
Presentation is loading. Please wait.
Published byMolly Gray Modified over 9 years ago
1
CSC 107 – Programming For Science
2
Science Means Solving Problems Physics -- How does an atom work?
3
Science Means Solving Problems Physics -- How does an atom work? Engineering -- Will the bridge hold?
4
Science Means Solving Problems Physics -- How does an atom work? Engineering -- Will the bridge hold? Biology -- What is crawling up my leg?
5
Science Means Solving Problems
6
Solving Problems With Code Simple trick to this issue: good programs work Everything else is secondary and much less important Must have focus on creating working solution
7
Solving Problems With Code good programs work Simple trick to this issue: good programs work Everything else is secondary and much less important Must have focus on creating working solution
8
Solving Problems With Code
11
Problem Solving Method 1. Clearly define the problem Will splitting an atom cause unstoppable explosion? Must translate series of digits into number, how? What bet in Vegas gives me best odds of winning? What are tonight's winning lottery numbers? Am I pretty enough to become Miss America?
12
Problem Solving Method 2. Describe input and output information Input: U 235 Output: Input: Degree of angle Output: Angle's cosine Input: Car design Output: Fuel efficiency Input: Models of monster Output: Hair movement
13
Problem Solving Method 3. Develop algorithm or flowchart of solution before Check algorithms work before starting to code Better be careful, double-check algorithms work Triple-check algorithms work just to be certain Do this by following example of Manhattan Project
14
Problem Solving Method 3. Develop algorithm or flowchart of solution before Check algorithms work before starting to code Better be careful, double-check algorithms work Triple-check algorithms work just to be certain Do this by following example of Manhattan Project
15
Problem Solving Method 4. Write code solving first part of problem Test just this code to be certain free from bugs Frequently testing gives bugs fewer places to hide Bug MUST be in code – already tested algorithm! Debugging simple – look for mismatch w/flowchart 5. Once first part done, write second part of code Focus on reducing bugs to make process easier Grow by continue building slowly upon tested code
16
Brian Kernighan, Creator of C
17
For Monday You can use on this midterm: Your textbook & notes IF Printout of slides IF has notes on that day's slides At the same time, you may NOT use: Computer, calculator, cell phone, or similar Copies of daily activities and/or solutions Friends, Romans, countrymen or their ears To be certain rules are followed, when test ends Hand in all printed material you had with you
18
How to Prepare for Monday DODON'T Make cheat sheets for the test Review how parts of C++ work Add post-its to important pages Memorize Drink case of 40s before test Use post-its as clothing
19
For Next Lecture Program Assignment #1 due tonight Remember could also use virtual extensions Midterm #1 will be in class on Monday
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.