CS 200 - Programming I Jim Williams, PhD.

Slides:



Advertisements
Similar presentations
Creating a Program In today’s lesson we will look at: what programming is different types of programs how we create a program installing an IDE to get.
Advertisements

AP Computer Science. Google Interview Question You are given 8 identical looking balls. One of them is heavier than the rest of the 7 (all the others.
CMPT 120 Introduction to Computer Science and Programming I Chris Schmidt.
1 Programming & Programming Languages Overview l Machine operations and machine language. l Example of machine language. l Different types of processor.
1 Programming Languages Translation  Lecture Objectives:  Be able to list and explain five features of the Java programming language.  Be able to explain.
1 Programming & Programming Languages Overview l Machine operations and machine language. l Example of machine language. l Different types of processor.
A-1 © 2000 UW CSE University of Washington Computer Programming I Lecture 1: Overview and Welcome Dr. Martin Dickey University of Washington.
CS 153: Concepts of Compiler Design August 25 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak
CSE 131 Computer Science 1 Module 1: (basics of Java)
1 TOPIC 1 INTRODUCTION TO COMPUTER SCIENCE AND PROGRAMMING Topic 1 Introduction to Computer Science and Programming Notes adapted from Introduction to.
Computer Programming A program is a set of instructions a computer follows in order to perform a task. solve a problem Collectively, these instructions.
Lecture 2: Classes and Objects, using Scanner and String.
© 2012 Pearson Education, Inc. All rights reserved. 1-1 Why Java? Needed program portability – Program written in a language that would run on various.
Programming Concept Chapter I Introduction to Java Programming.
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.
CHAPTER 3 GC Java Fundamentals. 2 BASICS OF JAVA ENVIRONMENT  The environment  The language  Java applications programming Interface API  Various.
CSci 111 – computer Science I Fall 2014 Cynthia Zickos WRITING A SIMPLE PROGRAM IN JAVA.
CS110 Programming Language I Lab 4: Control Statements I Computer Science Department Spring 2014.
1 CSC 221: Computer Programming I Spring 2008 course overview  What did we set out to learn?  What did you actually learn?  Where do you go from here?
Introduction Chapter 1 8/31 & 9/1 Imagine! Java: Programming Concepts in Context by Frank M. Carrano, (c) Pearson Education - Prentice Hall, 2010.
1 WELCOME TO CIS 1068! Instructor: Alexander Yates.
Overview of Java CSCI 392 Day One. Running C code vs Java code C Source Code C Compiler Object File (machine code) Library Files Linker Executable File.
Reading input from the console input. Java's console input The console is the terminal window that is running the Java program I.e., that's the terminal.
©2016 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. CSC 110 – INTRO TO COMPUTING - PROGRAMMING Overview of Programming.
Lecture1 Instructor: Amal Hussain ALshardy. Introduce students to the basics of writing software programs including variables, types, arrays, control.
COP 2551 Introduction to Object Oriented Programming with Java Topics –Introduction to the Java language –Code Commenting –Java Program Structure –Identifiers.
import java.util.Scanner; class myCode { public static void main(String[] args) { Scanner input= new Scanner(System.in); int num1; System.out.println(“Enter.
Computer Science A 1. Course plan Introduction to programming Basic concepts of typical programming languages. Tools: compiler, editor, integrated editor,
© Peter Andreae Java Programs COMP 102 # T1 Peter Andreae Computer Science Victoria University of Wellington.
Execution ways of program References: www. en.wikipedia.org/wiki/Integrated_development_environment  You can execute or run a simple java program with.
INTRODUCTION TO COMPUTER PROGRAMMING(IT-303) Basics.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
CS 201 Lecture 1 (b) Using an IDE Tarik Booker CS 201: Introduction to Programming California State University, Los Angeles.
Foundations of Programming: Java
Sophomore Scholars Java
Lecture 1b- Introduction
Content Programming Overview The JVM A brief look at Structure
CSCI-235 Micro-Computer Applications
Key Ideas from day 1 slides
Logger, Assert and Invariants
CSC 221: Computer Programming I Spring 2010
Chapter 3 GC 101 Java Fundamentals.
Lecture 10: More on Methods and Scope
University of Washington Computer Programming I
Comp Sci 200 Programming I Jim Williams, PhD.
Something about Java Introduction to Problem Solving and Programming 1.
Comp Sci 302 Introduction to Programming
Assembler, Compiler, Interpreter
Lecturer: Mukhtar Mohamed Ali “Hakaale”
CS Week 3 Jim Williams, PhD.
Assembly Language for Intel-Based Computers
First Python Program Professor Hugh C. Lauer CS-1004 — Introduction to Programming for Non-Majors (Slides include materials from Python Programming: An.
CSE 1020:Programming by Delegation
Fundamental Error Handling
Introduction CSC 111.
CS Week 3 Jim Williams.
CS 200 Primitives and Expressions
Assembler, Compiler, Interpreter
CS 200 Primitives and Expressions
Welcome to AP Computer Science A!
Tonga Institute of Higher Education IT 141: Information Systems
An Introduction to Programming with C++ Fifth Edition
Tonga Institute of Higher Education IT 141: Information Systems
Zorah Fung University of Washington, Spring 2015
CS Week 2 Jim Williams, PhD.
CS Programming I Jim Williams, PhD.
Ben Stanley for gAlpha gALPHA free, four-week venture-creation workshop designed to help entrepreneurially-minded students and technologists create high-growth.
CS Programming I Jim Williams, PhD.
Zorah Fung University of Washington, Winter 2016
Presentation transcript:

CS 200 - Programming I Jim Williams, PhD

Comp Sci 200 - Programming I Who Am I? What is Computer Science & Programming? Who is here? Large Course Overview Programming Process

Who Am I? My Interests: CS Education, specifically the teaching and learning of programming. PhD in Computer Science, minor in Educational Psychology Husband, Father, Coach, Traveller, ... http://pages.cs.wisc.edu/~jimw/

What is Computer Science? With a name like computer science, you might think it is all about the computer. Core principles: Abstractions and algorithms This course: Learning to give instructions to the computer. Read and Write Java

What is Computer Science? The study of the computer itself as well as how computers are applied to solve problems in any field. What is Programming? Designing algorithms and writing them in a language a computer can execute.

Why Study Computer Science? To understand our world To study and understand processes To be able to ask questions about influences To use a new form of literacy A new way to learn science and math Job skill Use computers better https://cs200-www.cs.wisc.edu/wp/why-study-computer-science/

Enjoyment and Satisfaction Lots of puzzles, problem solving and challenge Opportunity to create something from nothing Opportunity to apply to any field Many enjoy these aspects of Computer Science and find a lot of satisfaction when successful.

Key Concepts Sequence Choice Repetition Delegation Sharing information information may be an Address Testing/Verification

Programming aka Writing Code Java is a text language for controlling the computer. Programs are called "code" for a reason. Decode "convert (a coded message) into intelligible language." [Google Dictionary]

Learning Programming Learn fundamentals of the Java language Learn key concepts of controlling a computer that are independent of a language. In other words, learning other similar programming languages will be a bit easier.

Who is here?

Quality of Writing Is the quality of an author's writing directly related to how long it took to learn the language they are writing in? (I don't think so…) It takes people different amounts of time to learn a programming language, but once you achieve fluency, there doesn't seem to be much difference. John Anderson

When Women Stopped Coding http://www.npr.org/sections/money/2014/10/21/357629765/when-women-stopped-coding

Course Overview Large Course Learn how to learn programming Course Website https://pages.cs.wisc.edu/~cs200/

Society of Women Engineers Not just for women and not just for engineers; all students are welcome. We are especially looking for more computer science students! Emilie Wille

Today Course Logistics Learning Expectations: Understand vs Apply zyBooks Assignments Getting Help Lecture Notes Learning Expectations: Understand vs Apply Content: Programming Process Tracing & Explaining (Decoding) Edit-Compile-Run Cycle

Understand vs. Apply Steph Curry, NBA Golden State Warriors Basketball Analogy Demonstration vs. Practice Declarative Knowledge vs Procedural Knowledge Importance of Practice for learning If you watch the same video or even 10 different videos on how to shoot a basketball do you get better at shooting a basketball? Steph Curry, NBA Golden State Warriors

Learning Programming Lots of little steps that quickly build Not mastering little steps creates bigger steps Goes beyond Remembering and Understanding to Applying, Analyzing, Evaluating and Creating. Goal: Have basic fluency in Java and be able to solve small problems using it.

Tracing & Explaining Tracing Stepping through a program anticipating what each instruction does and the next instruction to execute (run). Keep track of what is happening in memory. Explaining In your own words, summarize what Java statements do.

CS200 View of Computer A view of the computer appropriate to understand programming with Java. This view of the computer gets more detailed as we go in the course.

CS200 View of Computer Processor Executes program one step at a time. Java statements say what to do. Memory holds data (and program itself) access through variables and references

Learning to Trace with Java Visualizer Java Visualizer available via our course website or: https://cscircles.cemc.uwaterloo.ca/java_visualize/ import java.util.Scanner; public class RectangleArea { public static void main(String [] args) { Scanner input = new Scanner(System.in); int height = 0; int width = 0; System.out.print("Enter height: "); height = input.nextInt(); System.out.print("Enter width: "); width = input.nextInt(); int area = height * width; System.out.println("A rectangle with height " + height + " and width " + width + " has an area of: " + area); input.close(); return; //optional at end of method, unless returning value }

Programming Process Users Files Programmer Editor (Virtual) Compiler Machine Compiler Hello.java Hello.class Computer Files Programmer

Programming Errors Naming/Saving Syntax/Compile time Runtime & Logic Editor (Virtual) Machine Compiler Hello.java Hello.class Computer Files Programmer

Programming Process Question Cat.txt Cat.java Cat.class Cat For the class named Cat, what is the name of the file that the compiler creates and is provided to the Java Virtual Machine to run?

Edit-Compile-Run Cycle From the command-line: notepad javac java