1 / 14

Topic 1 Introduction to Computer Science and Programming

Topic 1 Introduction to Computer Science and Programming. Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach by M. Guzdial and B. Ericson, and instructor materials prepared by B. Ericson. Topic 1 Introduction to Computer Science and Programming.

Télécharger la présentation

Topic 1 Introduction to Computer Science and Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Topic 1Introduction to Computer Scienceand Programming Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach by M. Guzdial and B. Ericson, andinstructor materials prepared by B. Ericson. Topic 1Introduction to Computer Scienceand Programming

  2. Outline • What is Computer Science • Some of the roles of Computer Science in our society • What is in a computer • What is programming • What is a program • What a compiler does • Some specificities of Java

  3. What is Computer Science? • The design, analysis, implementation, … • of algorithms, • that solve problems. Why study Computer Science? • computing is part of everything we do • develops your problem solving skills • Lots of jobs! • Network and data analysts, software engineers are projected to be some of the fastest growing professions, 2006-2016

  4. Roles of Computer Science • Maintaining the technical infrastructure • network, software • But also many algorithmic challenges • AI for games • search or auction algorithms (Google, Bing) • medical imaging • cryptology (RIM) • low-power chips

  5. CPU and RAM • Central Processing Unit (CPU)(processor) executes instructions • MainMemory (RAM) • Internal storage that holds the programs (instructions and data) currently executed • Made of switches, each of whichrepresents 0 or 1 and iscalled a bit(binary digit) • Information is lost when power is turned off

  6. External memory and I/O • Secondary Memory: hard disks, CDs, DVDs, USB sticks • Provide long-term storage • Organized as files,each of which has a file name and a folder (directory)that contains it. • Input/Output (I/O) units: keyboard, mouse, screen, printer, webcam, etc. • Used for communications with the user

  7. What is programming? • Programming is the process of creating detailed instructionsthat a computer can execute to accomplish some task • It is much like: • writing a recipe for your favorite dish • giving someone directions to your house • making a robot do what you want

  8. What is a program? • Programs consist of • Instructions to perform a task • Datavalues used in performing the task • Programs are written in a language that a computer can understand • System.out.println(…) prints to the screen public class HelloWorld { public static void main(String[ ] args) { System.out.println("Hello World!"); } }

  9. High-level languages • Programmers usually write programs in high-level languages • Java, C, C++, C#, Visual Basic, Python, Scheme, Lisp, Pascal, Fortran, etc. etc. • People-oriented: created to make it easier for programmers to write complicated programs • Machineindependent: not written for any particular kind of computer (Intel, Mac, etc.) • But computers do not understand high-level languages directly

  10. Machine language • The machine language consists of the set of instructions that the CPU can execute directly • Instructions to the CPU (to add, subtract, read, store, etc) are made up of 0’s and 1’s • Machine dependent: each type of computer has its own machine language 000100111000010100100110101111001

  11. High-level to machine language High-Level Language Program (source code) Compiler Machine Language Program (executable code) CPU

  12. Java • A high-level language developed by Sun Microsystems in the early 1990s • Cross-platform • Object-oriented (later) • Widely used in business, science and education • One of the fastest-adopted technologies of all time! • Different from previous high-level languages

  13. From program to execution Java source code Java Compiler Bytecode CPU Java Virtual Machine

  14. Summary • Terminology introduced: • CPU, RAM • Bit • Program • High-Level Language • Machine Language • Compiler • Bytecode • Java Virtual Machine

More Related