0 CS100J September 2007 CS100J: 12 weeks programming using Java, 2 using Matlab. David Gries. CS100M: 7 weeks of Matlab and 7 of Java. Daisy Fan. CS100H:

Slides:



Advertisements
Similar presentations
1 CS100J. Lecture 2, 25 January 2007 Today’s topic: Objects and classes Reading for this lecture: Section 1.3. It’s most important that you study this.
Advertisements

ATS Programming Short Course I INTRODUCTORY CONCEPTS Tuesday, Jan. 20 th, 2009.
What Data Do We Have? Sections 2.2, 2.5 August 29, 2008.
Math 1160 – Finite Mathematics and Its Applications Openers.
1 ICS 101 – LAB 2 Arithmetic Operations I Putu Danu Raharja kfupm.edu.sa Information & Computer Science Department CCSE - King Fahd University.
CS100J 11 September 2003 Course Management System for CS100J is now populated with students who were pre-registered. Look at course web page to see how.
If You Missed Last Week Go to Click on Syllabus, review lecture 01 notes, course schedule Contact your TA ( on website) Schedule.
Welcome to IIT and cs105!. CS Secs Jon Hanrath SB Office Hours: –MW 8:00 A.M. – 9:45 A.M. –W 5:00 P.M. – 6:00 P.M
1 Lab Session-IV CSIT-120 Spring 2001 Lab 3 Revision and Exercises Rev: Precedence Rules Lab Exercise 4-A Machine Language Programming The “Micro” Machine.
CS 330 Programming Languages 09 / 06 / 2007 Instructor: Michael Eckmann.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
OBJECT ORIENTED PROGRAMMING I LECTURE 1 GEORGE KOUTSOGIANNAKIS
Honors 101, Fall 2006 Please do not sit in back of room! Lots of info on web page Join the mailing list Download Eclipse and start using it Read the text.
Transition to Matlab CS1132 Fall 2009 Instructor: K.-Y. Daisy Fan TA: Lucian Leahu Course consultants
Computer Science 102 Data Structures and Algorithms V Fall 2009 Lecture 1: administrative details Professor: Evan Korth New York University 1.
CS190/295 Programming in Python for Life Sciences: Lecture 1 Instructor: Xiaohui Xie University of California, Irvine.
1 CS1130 Spring 2011: David Gries & Walker White Transition to Object-Oriented Programming Assumes programming knowledge in a language like Matlab, C,
1 CS1110 Fall 2011: David Gries & Steve Marschner CS1112: Matlab No prior programming experience One semester of calculus Math- & engineering- type problems.
Quote for the day: Computational thinking: a fundamental skill for everyone … [It] is … choosing an appropriate representation for a problem or modeling.
CSE Graphical User Interface Design & Implementation Jason Murphy Lecture 1 - Introduction.
1 CS1110 Fall 2010 Instructors: David Gries & Lillian Lee CS1112: Matlab No prior programming experience One semester of calculus Math- & engineering-
Chapter 8 High-Level Programming Languages (modified by Erin Chambers)
Computing with Numbers CSC 161: The Art of Programming Prof. Henry Kautz 9/14/2009.
CIS Computer Programming Logic
Quote for the day: Computational thinking: a fundamental skill for everyone … [It] is … choosing an appropriate representation for a problem or modeling.
CS 106 Introduction to Computer Science I 01 / 25 / 2010 Instructor: Michael Eckmann.
CS 330 Programming Languages 09 / 04 / 2008 Instructor: Michael Eckmann.
1 Agenda Administration Background Our first C program Working environment Exercise Memory and Variables.
Programming in Java This is a one semester course. You will learn the language and some basic programming skills. You are expected to read, program,
First Java Program COMP 102 #2 2015T2 Xiaoying Sharon Gao Computer Science Victoria University of Wellington.
1 CS1110. Lecture 1, 31 Aug Types, expressions, variables, assignment statements Can’t install DrJava and running a Microsoft operating system? Contact.
CS100J Spring 2006 CS100J: 11 weeks of programming using Java and 2 weeks using Matlab. David Gries is teaching CS100J. Graeme Bailey is teaching a special.
Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
General Computer Science for Engineers CISC 106 James Atlas Computer and Information Sciences 2/10/2010.
1 CS1110 Fall 2011 David Gries, Steve Marschner Reading for this lecture and previous lecture: Sections 1.1, 1.2, 1.3. Lab 1 will give you practice with.
CS 415 Daily Announcements. Friday, 26 August 2005 Readings: –Read Chapter 1 for next Monday –Read Algol 60 report for next Wednesday –Read some of chapter.
CPSC 121: Models of Computation Unit 0 Introduction George Tsiknis Based on slides by Patrice Belleville and Steve Wolfman.
Number Representation, Data Types and Elementary Programming Shirley Moore CS 1401 February 5-7, 2013.
Introduction to computers and programming Instructor: Alex Iskold.
1 CS1110. Lecture 1, 31 Aug Types, expressions, variables, assignment statements Summary of lectures : On course webpage, click on “Lecture summaries”.
1 CS1100 Fall Instructor: David Gries CS100M: Matlab No prior programming experience One semester of calculus Math & engineering type problems CS100J:
1 CS1110 Fall Instructors: David Gries & Lillian Lee CS1112: Matlab No prior programming experience One semester of calculus Math- & engineering-
CS Class 03 Topics  Sequence statements Input Output Assignment  Expressions Read pages Read pages 40 – 49 for next time.
School of Computer Science & Information Technology G6DICP - Lecture 4 Variables, data types & decision making.
CS 115 QUIZ # 2 INFORMATION 1. When TUESDAY 11/10 Worth: 8 points 2.
CS100R: Introduction to Computing Using MATLAB and Robotics Prof. Ramin Zabih
1 CS 101 Today’s class will begin about 5 minutes late We will discuss the lab scheduling problems once class starts.
1 CS100J 08 September 2005 Today’s topic: Customizing a class (continued) Quote for the day: There is no reason anyone would want a computer in their home.
Textbook C for Scientists and Engineers © Prentice Hall 1997 Available at NUS CO-OP at S$35.10.
1 CS1110. Lecture 2, 28 Jan Objects & classes PLive: Activities 3-3.1, 3-3.2, (not 3-3.3), 3-4.1, Summary of lectures: On course page,
Data Structures and Algorithms in Java AlaaEddin 2012.
1 CS100J Spring Instructor: David Gries CS100M: Matlab No prior programming experience One semester of calculus Math & engineering type problems.
PROBLEM SOLVING AND PROGRAMMING ISMAIL ABUMUHFOUZ | CS 170.
Review A program is… a set of instructions that tell a computer what to do. Programs can also be called… software. Hardware refers to… the physical components.
CMSC201 Computer Science I for Majors Lecture 05 – Comparison Operators and Boolean (Logical) Operators Prof. Katherine Gibson Prof. Jeremy.
CS101 Computer Programming I
CS1110 Spring Instructor: David Gries
CS100J. Lecture 2, 24 September Objects & classes
CS190/295 Programming in Python for Life Sciences: Lecture 1
Problem Solving Using C: Orientation & Lecture 1
Introduction to Java, and DrJava part 1
CS 1110 Please do this now. Draw three variables on a piece of paper as shown to the right: b 4 c 7 d false Below is a “program” consisting of 3 assignment.
3-3 Side Effects A side effect is an action that results from the evaluation of an expression. For example, in an assignment, C first evaluates the expression.
Computer Programming 1 introduction to JAVA Lecture 1 Instructor: Ruba A. Salamah Islamic University of Gaza.
High Level Programming Languages
Introduction to Java, and DrJava
Problem Solving Using C: Orientation & Lecture 1
CS100J CS100M is in Kimball Bll.
Introduction to Java, and DrJava part 1
CS Problem Solving and Object Oriented Programming Spring 2019
Presentation transcript:

0 CS100J September 2007 CS100J: 12 weeks programming using Java, 2 using Matlab. David Gries. CS100M: 7 weeks of Matlab and 7 of Java. Daisy Fan. CS100H: 12 weeks Java, 2 Matlab 11:15 only. Graeme Bailey Quote for the day: I think there is a world market for maybe five computers. Thomas Watson, chairman of IBM, 1943 No prior programming experience 7 wks Matlab, 7 wks Java One semester of calculus Math & engineering type problems No prior programming experience 12 wks Java, 2 wks Matlab No calculus More non-numerical problems MJ

1 Course outcomes: (1)Basic understanding of object-oriented and proced- ural aspects of programming, as expressed in Java. (2)Fluency in Java --able to write programs using classes and subclasses, as well as assignments, conditionals, recursion, and loops. (3)Knowledge of the basic API classes and their specifications. Academic Integrity. We ask you not to cheat, in any way, shape, or form. On our side, we will try our best to be fair about the amount of work we are giving you, in the grading of that work, and in giving you a course grade. For more info, see course website. Website.

2 Methods to increase chances of success in the course. Section is in the ACCEL Lab. Guided exercises on the computer, with a TA & consultants there to help. Quizzes let you know what material is important at eachpoint. Everyone expected to get A on each quiz. Lectures are not 45 minutes of Gries talking. You will see demos of programming and execution of programs in class almost every lecture. Use iclickers to get sense of class and encourage participation. Course text provides alternative learning medium; the CD has minute lectures, each on one specific point. Interludes discuss aspects of computing or the internet or CS to help you understand the computing world we live in today. AEW classes. 1 credit, 2 hrs per week, no homework. Small collaborative classes. Not remedial. Students do better. Go to Olin 167 for info.

3 DrJava. We write programs using the free IDE (Integrated Development Environment) called DrJava. Download it from the course website. Reading for this lecture: Sections 1.1, 1.2, 1.3. Lab 01 will give you practice with concepts and details of 1.2, 1.3 PLive: Lesson 0, Lesson page 1.3, Activity Summary of lectures: On course home page, click on “Handouts” and then “Outline of lectures held so far”. Topics of all lectures (this may change): On course home page, click on “Syllabus”. Today: Introduce expressions and assignment (using DrJava)

4 Recitations (Labs) Are in the Engineering ACCEL LAB Do NOT go to the room given in the Course and Room Roster. To get to the ACCEL Lab, go into the Engineering Library in Carpenter Hall, walk straight until you come to a staircase on your left, and go up the stairs. Do not be concerned if you haven’t been able to register for a recitation section. Just go to the one you want this week. We will straighten it out soon, so that you can register. Here are the times of the recitation-labs: Attend ONE of them. Tuesday:12:2, 1:25, 2:30, 3:35 Wednesday:12:2, 1:25, 2:30, 3:35

5 Programming Languages Computer program: set of instructions for a computer to perform, or execute. Written in a programming language. We use mainly the programming language Java. Other programming language: Java, C, C++, Matlab, Algol 60, Lisp, Scheme, Ada, Fortran, Javascript, Python, … Compiler: translates program written in Java into the machine language. Type: A set of values together with operations on them. Type integer: values: …, –2, –1, 0, 1, 2, 3, 4, … operations: +, –, *, /, unary – Memorize this definition! Write it down several times.

6 Type: A set of values together with operations on them. Type integer: values: …, –3, –2, –1, 0, 1, 2, 3, 4, 5, … operations: +, –, *, /, unary – Type int: values: – , – , …, –3, –2, –1, 0, 1, 2, 3, 4, 5, …, , operations: +, –, *, /, unary – Memorize this definition! Write it down several times It uses 32 bits 2 31 –1. It uses 32 bits

7 Type: A set of values together with operations on them. Type double: values: Examples: –22.51E6 equivalent to – or –22.51 * E–6 equivalent to or * 10 –6 An approximation to the real numbers. operations: +, –, *, /, unary – exponent mantissa

8 Precedence of operators (page 23) Unary operators: + – ! Binary arithmetic: * / % Binary arithmetic: + – Arithmetic relations: = Equality relations: == != Logical and: && Logical or: | | The lecture also touches on: Types boolean (p. 20) and String (p. 22) You will use these things in Lab 01.

9 Variables. p. 26 A variable is a name together with a value. A variable is a named box with a value in the box. 5 Memorize definition! Write it down several times. xHere’s variable x, with value 5. It can contain an int value. int 20.1 areaHere’s variable area, with value 20.1 It can contain a double value. double

10 Declaration of a variable. p. 26 In Java, a declaration of a variable gives the name of the variable and the type of value it can contain. Memorize definition! Write it down several times. int x;Here’s a declaration of x, indicating that it contain an int value. double area;Here’s a declaration of area, indicating that it can contain a double value.

11 Assignment statement. p. 27 In Java, execution of an assignment statement stores a value in a variable. Memorize definitions! Write them down several times. x= x + 1;Evaluate the expression x+1 and store its value in variable x. area= 25.0;Evaluate the expression 25.0 and store its value in variable area. To execute the assignment = ; evaluate expression and store its value in variable.