1 CSC 221: Computer Programming I Fall 2009 See online syllabus (also accessible via BlueLine): Course goals:  To develop.

Slides:



Advertisements
Similar presentations
Chapter 1 - An Introduction to Computers and Problem Solving
Advertisements

Chapter 2 - Problem Solving
1 CSC 421: Algorithm Design & Analysis Spring 2013 See online syllabus: (also on BlueLine2) Course.
1 CSC 221: Computer Programming I Fall 2006 See online syllabus (also accessible via Blackboard): Course goals:  To develop.
© Janice Regan Problem-Solving Process 1. State the Problem (Problem Specification) 2. Analyze the problem: outline solution requirements and design.
Lecture Notes 1/21/04 Program Design & Intro to Algorithms.
CSC 111 Course orientation
Lecture Notes 8/30/05 Program Design & Intro to Algorithms.
Chapter 2: Algorithm Discovery and Design
Concept of Computer Programming November 2, 2011.
Introduction to Programming Doman’s Lecture CSCI101.
1 CSC 221: Introduction to Programming Fall 2012 course overview  What did you set out to learn?  What did you actually learn?  Where do you go from.
 A set of objectives or student learning outcomes for a course or a set of courses.  Specifies the set of concepts and skills that the student must.
1 CSC 221: Computer Programming I Fall 2004 course overview  what did we set out to learn?  what did you actually learn?  where do you go from here?
1 CSC 427: Data Structures and Algorithm Analysis Fall 2011 See online syllabus (also available through BlueLine): Course goals:
CSC1401: Introductory Programming Steve Cooper
Purpose of study A high-quality computing education equips pupils to use computational thinking and creativity to understand and change the world. Computing.
1 CSC 221: Introduction to Programming Fall 2013 See online syllabus (also accessible via BlueLine2): Course goals:  To develop.
1 CSC 221: Computer Programming I Spring 2008 repetition & simulations  conditional repetition, while loops  examples: dot race, paper folding puzzle,
Computer Programming TCP1224 Chapter 2 Beginning the Problem-Solving Process.
CSC-115 Introduction to Computer Programming
The string data type String. String (in general) A string is a sequence of characters enclosed between the double quotes "..." Example: Each character.
CS 106 Introduction to Computer Science I 03 / 19 / 2007 Instructor: Michael Eckmann.
1 Nassau Community CollegeProf. Vincent Costa Acknowledgements: An Introduction to Programming Using Visual Basic 2012, All Rights ReservedAn Introduction.
Introduction Algorithms and Conventions The design and analysis of algorithms is the core subject matter of Computer Science. Given a problem, we want.
1 CSC 221: Computer Programming I Fall 2006 repetition & simulations  conditional repetition, while loops  examples: dot race, paper folding puzzle,
Computer Concepts 2014 Chapter 12 Computer Programming.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Ver Chapter 2: Recursion: The Mirrors Data Abstraction & Problem Solving.
CS 140 Computer Programming (I) Second semester (3 credits) Imam Mohammad bin Saud Islamic University College of Computer Science and Information.
1 CSC 222: Computer Programming II Spring 2004 See online syllabus at: Course goals:
What does a computer program look like: a general overview.
1 CSC 427: Data Structures and Algorithm Analysis Fall 2010 See online syllabus (also available through BlueLine): Course goals:
IXA 1234 : C++ PROGRAMMING CHAPTER 1. PROGRAMMING LANGUAGE Programming language is a computer program that can solve certain problem / task Keyword: Computer.
1 CSC 222: Object-Oriented Programming Spring 2013 Course goals:  To know and use basic Java programming constructs for object- oriented problem solving.
CSE 501N Fall ‘09 12: Recursion and Recursive Algorithms 8 October 2009 Nick Leidenfrost.
Working with arrays (we will use an array of double as example)
1 CSC 321: Data Structures Fall 2013 See online syllabus (also available through BlueLine2): Course goals:  To understand.
1 CSC 221: Computer Programming I Spring 2010 Understanding class definitions  class structure  fields, constructors, methods  parameters  assignment.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Ver Recursive Solutions Recursion is an extremely powerful problem-solving.
1 CSC 221: Computer Programming I Fall 2005 See online syllabus (also accessible via Blackboard): 
C++ and Ubuntu Linux Review and Practice CS 244 Brent M. Dingle, Ph.D. Game Design and Development Program Department of Mathematics, Statistics, and.
1 CSC 221: Computer Programming I Spring 2010 repetition & simulations  conditional repetition, while loops  examples: paper folding, sequence generation,
CSC 221: Computer Programming I Fall 2001 course overview  what did we set out to learn?  what did you actually learn?  where do you go from here? 
1 CSC 221: Computer Programming I Fall 2009 interaction & repetition  modular design: dot races  constants, static fields  conditional repetition, while.
A-1 © 2000 UW CSE University of Washington Computer Programming I Lecture 21: Course Wrap-up and Look Ahead.
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?
Week 14 Introduction to Computer Science and Object-Oriented Programming COMP 111 George Basham.
1 CSC 427: Data Structures and Algorithm Analysis Fall 2006 See online syllabus (also available through Blackboard): Course goals:
1 CSE Programming in C++. 2 Overview Sign roster list Syllabus and Course Policies Introduction to C++ About Lab 1 Fill Questionnaire.
Problem-solving with Computers. 2Outline  Computer System  5 Steps for producing a computer program  Structured program and programming  3 types of.
Lecture1 Instructor: Amal Hussain ALshardy. Introduce students to the basics of writing software programs including variables, types, arrays, control.
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Tevfik Bultan Lecture 4: Introduction to C: Control Flow.
CS 161 Introduction to Computer Science I Winter, 2014: 112 Spring, 2014: 131 Summer, 2014: 132.
1 Structured Programming Arab Academy for Science and Technology CC112 Dr. Sherif Mohamed Tawfik The Course.
CS140 – Computer Programming 1 Course Overview First Semester – Fall /1438 – 2016/2017 CS140 - Computer Programming 11.
CSC 421: Algorithm Design & Analysis
CSC 222: Object-Oriented Programming
CSC 222: Object-Oriented Programming
ICS 3UI - Introduction to Computer Science
CSC 222: Computer Programming II
CSC 421: Algorithm Design & Analysis
CSC 321: Data Structures Fall 2017
COP 3503 FALL 2012 Shayan Javed Lecture 15
CSC 221: Computer Programming I Spring 2010
CSC 221: Computer Programming I Fall 2005
CSC 421: Algorithm Design & Analysis
CSC 421: Algorithm Design & Analysis
CSC 221: Computer Programming I Spring 2008
CSC 221: Introduction to Programming Fall 2018
Problem Solving and Computer Programming
Presentation transcript:

1 CSC 221: Computer Programming I Fall 2009 See online syllabus (also accessible via BlueLine): Course goals:  To develop problem solving and programming skills to enable the student to design solutions to non-trivial problems and implement those solutions in Java.  To master the fundamental programming constructs of Java, including variables, expressions, classes, methods, control structures, and arrays.  To build a foundation for more advanced programming techniques, including object- oriented design and the use of standard data structures (as taught in CSC 222).

2 What is programming? in short: programming is the process of designing, writing, testing and debugging algorithms that can be carried out by a computer we encounter algorithms everyday: directions to dorm, instruction manual, recipe  people are smart, so spoken languages can be vague  computers are not smart, so programming languages are extremely picky programming is applied problem-solving 1.understand a problem 2.identify relevant characteristics 3.design an algorithm (step-by-step sequence of instructions to carry out a task) 4.implement the algorithm as a computer program 5.test the program by repeated (and carefully planned) executions 6.GO BACK AND REPEAT AS NECESSARY

3 Problem-solving example Sudoku is a popular puzzle craze given a partially filled in 9x9 grid, place numbers in the grid so that each row contains 1..9 each column contains 1..9 each 3x3 subsquare contains 1..9 if we wanted to write a program to solve Sudoku puzzles, must/should it use the same strategies? how do people solve these puzzles?

4 Programming is a means to an end important point: programming is a tool for solving problems  computers allow people in many disciplines to solve problems they couldn’t solve without them — natural sciences, mathematics, medicine, business, …  to model this, many exercises will involve writing a program, then using it to collect data & analyze results PAPER FOLDING PUZZLE: if you started with a regular sheet of paper and repeatedly fold it in half, how many folds would it take for the thickness of the paper to reach the sun?  what information do you need (e.g., distance of sun)?  what data values do you need to store and update?  what is the basic algorithm?

5 recall, distance to sun is 93 million miles  93,000,000 mi x 5,280 ft/mi x 12 in/ft  5,892,480,000,000 inches Folding puzzle solution in Scratch

6 public class PaperSheet { private double thickness; // thickness in inches private int numFolds; // the number of folds so far /** * Constructs the PaperSheet object initial the initial thickness (in inches) of the paper */ public PaperSheet(double initial) { this.thickness = initial; this.numFolds = 0; } /** * Folds the sheet, doubling its thickness as a result */ public void fold() { this.thickness *= 2; this.numFolds++; } /** * Repeatedly folds the sheet until the desired thickness is reached goalDistance the desired thickness (in inches) */ public void foldUntil(double goalDistance) { while (this.thickness < goalDistance) { this.fold(); } /** * Accessor method for determining folds the number of times the paper has been folded */ public int getNumFolds() { return this.numFolds; } note: only the black text is necessary code (comments, which document the code, are shown here in blue) Folding puzzle solution in Java

7 Where do we start? explore programming concepts using Scratch  a fun, interactive environment for creating animations & games  we will explore your creative side, while building the foundation for programming  learn-by-doing, so be prepared to design & experiment & create  no previous programming experience is assumed will then segue into Java programming  transfer Scratch programming concepts into an industry-strength (object-oriented) language  classes will mix lecture and hands-on experimentation, so be prepared to do things!