cs211 data structures
DESCRIPTION
CS211 Data Structures. Sami Rollins [email protected] Fall 2004. Introduction. Course Website Syllabus Academic Dishonesty Tentative Calendar. Administrative Information. Class web page http://www.mtholyoke.edu/courses/srollins/cs101/. Assignments. Reading – Chapter 1 - PowerPoint PPT PresentationTRANSCRIPT
![Page 2: CS211 Data Structures](https://reader036.vdocument.in/reader036/viewer/2022072014/56812daf550346895d92d744/html5/thumbnails/2.jpg)
Introduction
• Course Website
• Syllabus
• Academic Dishonesty
• Tentative Calendar
![Page 3: CS211 Data Structures](https://reader036.vdocument.in/reader036/viewer/2022072014/56812daf550346895d92d744/html5/thumbnails/3.jpg)
Administrative Information
• Class web page
http://www.mtholyoke.edu/courses/srollins/cs101/
![Page 4: CS211 Data Structures](https://reader036.vdocument.in/reader036/viewer/2022072014/56812daf550346895d92d744/html5/thumbnails/4.jpg)
Assignments
• Reading – Chapter 1
• Homework 0 – due Monday
![Page 5: CS211 Data Structures](https://reader036.vdocument.in/reader036/viewer/2022072014/56812daf550346895d92d744/html5/thumbnails/5.jpg)
Computer Hardware
• Main memory
• Secondary memory
• CPU
• Input devices
• Output devices
![Page 6: CS211 Data Structures](https://reader036.vdocument.in/reader036/viewer/2022072014/56812daf550346895d92d744/html5/thumbnails/6.jpg)
Computer Software
• Operating system– Examples?
• Applications– Examples?
• How is a new application developed?
![Page 7: CS211 Data Structures](https://reader036.vdocument.in/reader036/viewer/2022072014/56812daf550346895d92d744/html5/thumbnails/7.jpg)
Computer Programs
• At the lowest level – machine instructions– 00000111000
• One step up – assembly language– ADD A
• More user friendly – high level languages– C = A + B;– Examples?
![Page 8: CS211 Data Structures](https://reader036.vdocument.in/reader036/viewer/2022072014/56812daf550346895d92d744/html5/thumbnails/8.jpg)
Translation
• High level language must be translated into a language the computer can understand
High-levelCode
CompilerMachineInstructions
![Page 9: CS211 Data Structures](https://reader036.vdocument.in/reader036/viewer/2022072014/56812daf550346895d92d744/html5/thumbnails/9.jpg)
Writing Programs
• Understand requirements
• Write an algorithm
• Implement your algorithm
• Test your code
![Page 10: CS211 Data Structures](https://reader036.vdocument.in/reader036/viewer/2022072014/56812daf550346895d92d744/html5/thumbnails/10.jpg)
What is an algorithm?
• A specific set of instructions
• An algorithm to make a PBJ sandwich?
![Page 11: CS211 Data Structures](https://reader036.vdocument.in/reader036/viewer/2022072014/56812daf550346895d92d744/html5/thumbnails/11.jpg)
Hello World/* * Name: Sami Rollins * Source file name: hello.c * My first "hello, world" program in C. */#include <stdio.h>
//the main functionint main (void){ //print the phrase printf("Hello, world!");
return(0);}
![Page 12: CS211 Data Structures](https://reader036.vdocument.in/reader036/viewer/2022072014/56812daf550346895d92d744/html5/thumbnails/12.jpg)
Errors
• You WILL have errors in your programs• Syntax Errors
– Compiler doesn’t understand code– Ex. – printf(Hello, world!”);– Sometimes error messages don’t match problem
• Logic– Program runs, but doesn’t do what you want– Ex. – printf(“Hell, world!”);– Can be hard to track down