Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 1—Introduction Introduction C H A P T E R 1 [The Analytical Engine offers] a new, a vast, and a powerful language... for the purposes of mankind.

Similar presentations


Presentation on theme: "Chapter 1—Introduction Introduction C H A P T E R 1 [The Analytical Engine offers] a new, a vast, and a powerful language... for the purposes of mankind."— Presentation transcript:

1 Chapter 1—Introduction Introduction C H A P T E R 1 [The Analytical Engine offers] a new, a vast, and a powerful language... for the purposes of mankind. —Augusta Ada Byron, Lady Lovelace, 1843 The Art and Science of An Introduction to Computer Science ERIC S. ROBERTS Java Özyeğin University Slides are adapted from the originals available at

2 What is Computer Science? In its classical use, science refers to the study of natural phenomena. Many people imagine that computer science is the study of computers as artifacts and wonder how that can be a science. Car science? Refrigerator engineering?

3 What is Computer Science? Computer science has more to do with the study of problem solving in which the solutions happen to use computers. Computing/Computation Science? Computer science draws on a range of intellectual traditions that includes aspects of mathematics, classical science, and engineering. Computer science plays an increasingly important role in other disciplines: –Biology. Computers made it possible to map the human genome. –Economics. Computers enable the creation of better economic models. –Psychology. Artificial intelligence helps us to understand the brain. –Environment. Climate models require modern computing technology. –Literature. Computerized analysis helps resolve disputed authorship. –and most everything else...

4 Computer From Wikipedia: A computer is a programmable machine designed to carry out a sequence of arithmetic or logical operations. The particular sequence of operations can be changed readily, allowing the computer to solve more than one kind of problem.

5 Eniac [http://ftp.arl.mil/ftp/historic-computers]

6 Components of a Computer Hardware: Physical parts. Tangible. Software: Programs. Abstract, intangible. Combination of hardware and software makes computation possible.

7 A Brief Tour of Computer Hardware CPU memory secondary storage I/O devices network bus

8 Central Processing Unit “The Brain” Actual computation and coordination of the entire computer May be more than one: Multiprocessor May have more than one computation units: Multicore

9 Memory Retains data Both program data and program itself Volatile: Data is lost when power is off. RAM (Random Access Memory): Allows the program to use the contents of any memory cell at any time.

10 Secondary Storage Retains data Long-term. High capacity. Persistent: Data is preserved when power is off. CD, DVD, Flash drive, tape, harddisk.

11 Input Receive data from input devices

12 Output Pass data to output devices

13 Network Connection to other computers. Internet: Vast collection of computers throughout the world that are connected together by communication lines that allow them to share data and programs.

14 From Amazon.com

15 Algorithms Much of computer science involves the study of algorithms. A procedure/strategy for solving a problem. Derived from the name of the Persian mathematician al-Khwarizmi, who wrote the book Kitab al jabr w’al-muqabala.

16 Algorithms To meet its more formal definition, an algorithm must be: –Clearly and unambiguously defined. –Effective, in the sense that its steps are executable. –Bad: “multiply r by the exact value of π”. –Finite, in the sense that it terminates after a bounded number of steps. –There may be more than one algorithm to solve a problem. –Complexity of the algorithm plays a crucial role in which one to use.

17

18 A simple algorithm for presentation Slide visible? Control the projector Control the computer Start No

19 A simple algorithm for presentation Slide visible? Control the projector Control the computer Present the content questions? Answer the question Start No Yes

20 A simple algorithm for presentation Slide visible? Control the projector Control the computer Present the content Last slide? questions? Answer the question Switch to the next slide Start End No Yes No Yes No Yes

21 Algorithm as a simple program 01.REPEAT until the last slide 02.IF slide is visible 03.Present the content 04.ELSE 05. Control the projector 06.Control the computer 07.RETURN TO step # REPEAT for each question 09.Answer the question 10. SWITCH to next slide

22 01.REPEAT until the last slide 02.IF slide is visible 03.Present the content 04.ELSE 05. Control the projector 06.Control the computer 07.RETURN TO step # REPEAT for each question 09.Answer the question 10. SWITCH to next slide Algorithm as a simple program similar to keywords of a programming language Numbered lines of code A line of code in the program

23 Java and the World-Wide Web Part of Java’s success comes from the fact that it is the first language specifically designed to take advantage of the power of the World-Wide Web, which came into prominence shortly before Java’s release in In addition to more traditional application programs, Java makes it possible to write small interactive programs called applets that run under the control of a web browser. The programs that you will learn to write in this book run as either applications or applets, which means that you can easily share them on the web.


Download ppt "Chapter 1—Introduction Introduction C H A P T E R 1 [The Analytical Engine offers] a new, a vast, and a powerful language... for the purposes of mankind."

Similar presentations


Ads by Google