bg287

CSC 210 Notes

Posted in csc210 by bnmng on 2011 01/12

Homework. Read Chapter 1 to end, and read 2.1 and 2.4.
Using Disk Files:
Good Habit: Step 1: create data file.
Phases of software development.
Example: Finding Averages
Specification: Find the average of a series of numbers.
Design: For example, decide what data types you want to use, design what to do if number isn’t pure digits.
Break down task into steps.
Consider using functions. Functions help with re-usability and understandability
Random notes
Best to put pre-and post conditions in forms of assertions.

Big O. Example: A simple summation. (Mr. S. Doesn’t like the stair counting example in the book)
Different possibilities for how to solve.
1) Count with a loop: O(m)
2) Formula: (m/m+1)/2 : O(1)

Lower big O is more desirable.
Big O is used for large data sets. It’s calculus based on the value of m (the number of operations) as it approaches infinity.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: