Introduction to Computer Science I.

Slides:



Advertisements
Similar presentations
Introduction to Computer Science Robert Sedgewick and Kevin Wayne Recursive Factorial Demo pubic class Factorial {
Advertisements

Lecture 0 CSIS10A Overview. Welcome to CSIS10A (5 mins) – Typical format for class meetings New material first (monitors off, notebooks out) Practice.
Computer Science - I Course Introduction Computer Science Department Boston College Hao Jiang.
Computer Science - I Course Introduction Computer Science Department Boston College Hao Jiang.
Copyright 2008 by Pearson Education 1 Building Java Programs Chapter 2 Lecture 2-1: Expressions and Variables reading:
COMP 14: Primitive Data and Objects May 24, 2000 Nick Vallidis.
Unit 2: Java Introduction to Programming 2.1 Initial Example.
CSE 131 Computer Science 1 Module 1: (basics of Java)
IB Computer Science II Paul Bui
Introduction to Python Dr. Bernard Chen Ph.D. University of Central Arkansas July 9 th 2012
CS 1 •This is Computer Science 1. •Who is Professor Adams?
Overview of Computing. Computer Science What is computer science? The systematic study of computing systems and computation. Contains theories for understanding.
CS 106 Introduction to Computer Science I 01 / 25 / 2010 Instructor: Michael Eckmann.
IT253: Computer Organization Lecture 4: Instruction Set Architecture Tonga Institute of Higher Education.
Media Computing Instructor Byung Kim Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment.
1 Agenda Administration Background Our first C program Working environment Exercise Memory and Variables.
Session One Introduction. Personal Introduction Role of programmers Robot Examination HUD & HID Uploading Code.
Introduction to Application Programming IST 256 Application Programming for Information Systems Xiaozhong Liu
The string data type String. String (in general) A string is a sequence of characters enclosed between the double quotes "..." Example: Each character.
1.1 Your First Program Introduction to Programming in Java: An Interdisciplinary Approach · Robert Sedgewick and Kevin Wayne · Copyright © 2008 · October.
Programming Concept Chapter I Introduction to Java Programming.
CSCI 51 Introduction to Computer Science Dr. Joshua Stough January 20, 2009.
Input & Output In Java. Input & Output It is very complicated for a computer to show how information is processed. Although a computer is very good at.
Lecture.1: Getting Started With Java Jiang (Jen) ZHENG May 9 th, 2005.
Copyright 2008 by Pearson Education 1 Building Java Programs Chapter 2 Lecture 2-1: Expressions and Variables reading:
4. Computer Maths and Logic 4.2 Boolean Logic Logic Circuits.
1 TOPIC 1 INTRODUCTION TO COMPUTER SCIENCE AND PROGRAMMING Topic 1 Introduction to Computer Science and Programming Notes adapted from Introduction to.
The assignment expressions. The assignment operator in an assignment statement We have seen the assignment statement: Effect: var = expr; Stores the value.
Copyright 2010 by Pearson Education 1 Building Java Programs Chapter 2 Lecture 2-1: Expressions and Variables reading:
Computer Science A 1. Course plan Introduction to programming Basic concepts of typical programming languages. Tools: compiler, editor, integrated editor,
UFCFY5-30-1Multimedia Studio Coding for Interactive Media Fundamental Concepts.
Introduction to Computer Science What is Computer Science? Getting Started Programming.
MS. NANCY HARRIS LECTURER, DEPARTMENT OF COMPUTER SCIENCE CS 149 – Programming Fundamentals (Accelerated)
Introduction to programming in java
CMPT 201 Computer Science II for Engineers
Computer Engineering Department Islamic University of Gaza
ENCM 369 Computer Organization
CS101 Computer Programming I
CE221 – Data Structures & Algorithms Lab Introduction
MATH/COMP 340: Numerical Analysis I
May 17th – Comparison Sorts
Introduction to Programming (CS 201)
Building Java Programs
Principles of Programming I (CIE 105)
C Programming Language
CMPT 238 Data Structures Midterm Exam Review.
Computer Programming Methodology Introduction to Java
Computer Science 102 Data Structures CSCI-UA
September 27 – Course introductions; Adts; Stacks and Queues
Week 1 Gates Introduction to Information Technology cosc 010 Week 1 Gates
Definition In simple terms, an algorithm is a series of instructions to solve a problem (complete a task) We focus on Deterministic Algorithms Under the.
Introduction to Programming
Lesson 2 Programming constructs – Algorithms – Scratch – Variables Intro.
Algorithms September 28, 2017.
Building Java Programs
Computer Programming 1 introduction to JAVA Lecture 1 Instructor: Ruba A. Salamah Islamic University of Gaza.
Test Next Week Summer 3, 2016 Midterm Exam
Building Java Programs Chapter 2
CMPE 152: Compiler Design January 24 Class Meeting
Monday: 9/24 Language Arts Bell work I.N. page 37
A Java Application public class Hello { public static void main(String [] args) { System.out.println("Hello, World!"); } } public class.
A Java Application public class Hello { public static void main(String [] args) { System.out.println("Hello, World!"); } } public class.
Introduction to Primitives
BIT 115: Introduction To Programming
Fundamental OOP Programming Structures in Java: Comments, Data Types, Variables, Assignments, Operators.
IB Computer Science II Paul Bui
In this class, we will cover:
Building Java Programs Chapter 2
LCC 6310 Computation as an Expressive Medium
Week 1 - Friday COMP 1600.
Presentation transcript:

Introduction to Computer Science I

WHY? Before the bicycle the cheetah was the most efficient animal on the planet. A computer is a bicycle for your mind.

This class teaches you to ride that bicycle

In order to utilize a computer we need to be able to express our ideas within it’s limits

First challenge. Learn a programming language that lets us do that.

Let’s build up some intuition What does a programing language really represent

Phone Book Search (Mike Smith) 0 pick up phone book 1 open to middle of phone book 2 look at names 3 if Smith is among names 4 call Mike 5 else if Smith is earlier in book 6 open to middle of left half of book 7 go back to step 2 8 else if "Smith" is later in book open to middle of right half of book go back to step 2 else quit

Shampoo Algorithm

Class Count 0 Stand up and think of the number 1 1 Pair off with someone standing. Add your numbers together. 2 One of you should sit down. If you're still standing, go back to step 1.

But HOW

Assembly/ Machine Language 1 1 0 0

Input 1 1 Output 1 A = 1 B = 1 A and B Compiler A = 1 Input 1 1 B = 1 A and B Output 1 High-level programming languages

Still no bicycle

What if we could build a machine that could add large numbers? Binary and XOR Gate

We need a way to represent numbers/info Binary We need a way to represent numbers/info

XOR GATE

Could we build a simple two bit adding machine

Compiler A = 0 B = 1 1 A + B Output 1 High-level programming languages

Memory and State Save multiple numbers so that we can compute

Memory Input 0 0 0 1 1 1 Memory Output 0 0 0 1 1 0

1 Output 1 A = 0 B = 1 C = A + B High-level programming languages Memory Input 0 0 0 1 1 1 Memory Output 0 0 0 1 1 0 Compiler A = 0 B = 1 1 C = A + B Output 1 High-level programming languages

MIT Video Programming Cells.

Code to DNA Quick Section of MIT Video MIT Video http://cidarlab.org/cello/

What language should we choose?

No perfect language “ There are only two kinds of programming languages: those people always [gripe] about and those nobody uses.” - Bjarne Stroustrup (Creator of C++)

/******************************************* * Prints "Hello, World" * Everyone's first Java program. *******************************************/ public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World"); } We will talk about what the text in red means in later classes.

public class HelloWorld { public static void main(String[] args) { int a, b, c; a = 1; b = 0; c = a + b; System.out.println(c); }

Like learning to ride learning to program takes practice

https://www.youtube.com/watch?v=bvmibwafGXc

Test Quizzes Labs Logistics

Coursework and grading Labs. 20% Due on Fridays. Programming assignments. 25% Due on Tuesdays at 11pm via electronic submission. Late assignments will get docked 10% a day Exercises. 10% Due on Mondays at 11pm. Exams. 15% + 30% Midterm (in class on Wednesday, October 4). Final (to be scheduled by Registrar)

Textbook Introduction to Programming in Java [Amazon · Pearson · InformIT ] Robert Sedgewick and Kevin Wayne http://introcs.cs.princeton.edu/java/