Introduction to Programming Initial Slides developed by Dr. Doman.

Slides:



Advertisements
Similar presentations
Foundations of Programming and Problem Solving Introduction.
Advertisements

INTRODUCTION Chapter 1 1. Java CPSC 1100 University of Tennessee at Chattanooga 2  Difference between Visual Logic & Java  Lots  Visual Logic Flowcharts.
Chapter 1 - VB 2008 by Schneider1 Chapter 1 - An Introduction to Computers and Problem Solving 1.1 An Introduction to Computers 1.2 Windows, Folders, and.
Software. What Is Software? software –Also called Computer programs –Are a list of instructions –Instructions are called code –CPU performs the instructions.
Computer Science 1620 Variables and Memory. Review Examples: write a program that calculates and displays the average of the numbers 45, 69, and 106.
Problem solving by Searching Problem Formulation.
Computer Science 1620 Programming & Problem Solving.
Software Development Unit 6.
OBJECT ORIENTED PROGRAMMING IN C++ LECTURE
Problem Solving. What is a Problem? An ambiguous situation not clearly showing how to reach the goal. Given Initial Situation Desired Goal Situation What.
RAY PASTORE, PH.D. ASSISTANT PROFESSOR OF INSTRUCTIONAL TECHNOLOGY – UNCW How to Build Mobile Apps for iOS and Android.
Vocabulary Crossword 2-1 Vocabulary Crossword Puzzle 2-1 Click mouse to advance slides. Press Esc key to close presentation.
Improving the Odds of Success in Computer Science 1 Dr. Wayne Summers TSYS School of Computer Science 16 November 2012.
Programming is instructing a computer to perform a task for you with the help of a programming language.
1 ENG236: ENG236: C++ Programming Environment (2) Rocky K. C. Chang THE HONG KONG POLYTECHNIC UNIVERSITY.
Introduction to Programming Doman’s Lecture CSCI101.
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
CSCI-100 Introduction to Computing Algorithms Part I.
Chapter Introduction to Computers and Programming 1.
Introducing Java.
Lecture 1 Introduction to Java MIT- AITI 2004 What is a Computer Program? For a computer to be able to do anything (multiply, play a song, run a word.
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 16: Java Applets & AWT Fundamentals of Web Programming.
Spreadsheets in Finance and Forecasting Presentation 8: Problem Solving.
Basics Programming Concepts. Basics A computer program is a set of instructions to tell a computer what to do Machine language = circuit level language.
UNIVERSITI TENAGA NASIONAL “Generates Professionals” CHAPTER 4 : Part 2 INTRODUCTION TO SOFTWARE DEVELOPMENT: PROGRAMMING & LANGUAGES.
1 TOPIC 1 INTRODUCTION TO COMPUTER SCIENCE AND PROGRAMMING Topic 1 Introduction to Computer Science and Programming Notes adapted from Introduction to.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming 1.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
IT253: Computer Organization Lecture 4: Instruction Set Architecture Tonga Institute of Higher Education.
Algorithms and Programming
The Program Development Cycle
Se Over the past decade, there has been an increased interest in providing new environments for teaching children about computer programming. This has.
Introduction to Arrays. definitions and things to consider… This presentation is designed to give a simple demonstration of array and object visualizations.
Lecture 1 Introduction to Java MIT-AITI Ethiopia 2004.
Introduction Algorithms and Conventions The design and analysis of algorithms is the core subject matter of Computer Science. Given a problem, we want.
© 2012 Pearson Education, Inc. All rights reserved. 1-1 Why Java? Needed program portability – Program written in a language that would run on various.
CS 1308 Computer Literacy and The Internet Software.
Art 321 Lecture 7 Dr. J. Parker. Programming In order to ‘make things happen’ on a computer, you really have to program it. Programming is not hard and.
Jens Dalsgaard Nielsen Jan Dimon Bendtsen Dept. of Electronic Systems Basic Programming INS-basis GF, PDP and HST.
CPSC 230 Computers and Programming I Spring 2003 Dr. Lynn Lambert.
CPSC 433 Artificial Intelligence Search Modeling Practice Problems M. Reza Zakerinasab Please include [CPSC433] in the subject line.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 8 Debugging, Creating Executable Files, and Distributing a Windows Application.
CS101: Introduction to Computer Science Slides adapted from Sedgewick and Wayne Copyright © Your First Java.
1 12/4/1435 h Lecture 2 Programs and Programming Languages.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
1 CSC 221: Computer Programming I Fall 2009 See online syllabus (also accessible via BlueLine): Course goals:  To develop.
Teaching Through Problem Solving
C++ LANGUAGE TUTORIAL LESSON 1 –WRITING YOUR FIRST PROGRAM.
© 2012 Pearson Education, Inc. All rights reserved types of Java programs Application – Stand-alone program (run without a web browser) – Relaxed.
Problem solving Introduction to programming. Do Now You are at a river that you want to cross with all your goods. Your goods consist of a chicken, a.
ITP 109 Week 2 Trina Gregory Introduction to Java.
AS Computer Studies Algorithms & Problem Solving 1 & 2.
Today We Will Review: Operating Systems (Windows) (week 3 & 4) Starting up MS Windows Desktop and its contents Functions of the desktop components Brain.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Software Engineering Algorithms, Compilers, & Lifecycle.
Maitrayee Mukerji. INPUT MEMORY PROCESS OUTPUT DATA INFO.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Lecture 1b- Introduction
Computer Programming (BCT 1113)
Problem solving by Searching
Computer Software: Programming
Chapter 1 - An Introduction to Computers and Problem Solving
Chapter 1: An Overview of Computers and Programming Languages
Artificial Intelligence Problem solving by searching CSC 361
4. Computational Problem Solving
11 Recursion Software Solutions Lewis & Loftus java 5TH EDITION
The Challenge of Cross - Language Interoperability
ICT Gaming Lesson 2.
Java Software Solutions Foundations of Program Design Sixth Edition
Problem Solving by Searching Search Methods :
Presentation transcript:

Introduction to Programming Initial Slides developed by Dr. Doman

A deep understanding of programming, in particular the notions of successive decomposition as a mode of analysis and debugging of trial solutions, results in significant educational benefits in many domains of discourse, including those unrelated to computers and information technology per se. (Seymour Papert, in "Mindstorms") What is programming?

 Programming is a creative process done by programmers to instruct a computer on how to do a task. (  Writing an original program that performs a particular task that meets all stated constraints (Think Like a Programmer, V.Anton Spraul, No Starch Press, Inc. 2012) What is programming?

The major resource for this information is the book Think Like a Programmer, By V.Anton Spraul, No Starch Press, Inc What is programming?

Method or interface to do this: PROGRAMMING LANGUAGES Example: Java: Public class helloWorld { Public static void main ( ) { system.out.println(“Hello World”) } } Instruct a computer

Example: C++ #include using namespace std; int main() { cout << “Hello World” << endl; } Instruct a computer

Example: html Hello World Instruct a computer

GAMEMAKER Drag and drop structured language Uses icons, text…. Made to be easier than any of the previous languages. Easily used by non-programmers. Instruct a computer

 Programming is a creative process done by programmers to instruct a computer on how to do a task. (  Writing an original program that performs a particular task that meets all stated constraints (Think Like a Programmer, V.Anton Spraul, No Starch Press, Inc. 2012) What is programming?

 Puzzles  Problem solving What is programming? Programming Involves

Your car has blue smoke coming from the tailpipe, is idling roughly and has lost fuel efficiency. How do you solve this puzzle? Problem Solving

 Unbreakable rules about problems or the way in which problems must be solved.  Car problem constraints:  Maximum amount you can pay for repair  Time you can wait before you need it fixed  Can not require new tools to be purchased Constraints

 Must use a particular programming language (Java, C++)  Specific Platform (Windows, Mac), (IPad, Nexus)  Have a certain performance/speed (page refresh in 1.5 seconds)  Amount of memory the program uses while running, memory footprint  User/customer specific constraints  Design constraints Common Programming Constraints

 Figure out the steps needed to solve the problem  Be able to list the steps  Be able to repeat the steps  You can NOT change the rules (constraints) to get something solved! Problem solving

P ROBLEM : H OW TO CROSS THE RIVER ? A farmer with a fox, a goose and a sack of corn needs to cross a river. The farmer has a rowboat, but there is only room for the farmer and one of his three items. Unfortunately, both the fox and the goose are hungry. The fox cannot be left alone with the goose; the goose cannot be left alone with the grain. How does the farmer get everything across the river? Puzzle: Fox, goose, grain

 Constraints  Only one item at a time in the boat  Can’t leave fox with goose  Can’t leave goose with grain  Operations  Carry the fox to the far side of the river  Carry the goose to the far side of the river  Carry the grain to the far side of the river Puzzle: Fox, goose, grain

 Abstract the problem  Be more general in describing the way we will solve the problem  Concept: Variable Items are fox, goose or grain Let item vary between fox, goose or grain Rephrase the problem

 Constraints  Only one item at a time in the boat  Can’t leave fox with goose  Can’t leave goose with grain  Operations  Row the boat from one shore to the other  If the boat is empty, load an item on the boat  If the boat is full, take the item off the boat Puzzle: Fox, goose, grain

Puzzle: Sudoku

P ROBLEM : T HE SLIDING EIGHT A 3x3 grid is filled with eight tiles, numbered 1 through 8 with one empty space. The grid is jumbled. A tile can be slid into an adjacent empty space, leaving its previous location empty. Slide the tiles so that they are in numerical order Puzzle: Sliding Tile

Puzzle: Sliding Tile Solution

Puzzle: Sliding Tile

Technique: the train A circuit of tile positions that include an empty slot forms a train of tiles that can be rotated anywhere along the circuit, preserving the relative order of the tiles. Puzzle: Sliding Tile

 Look at the problem in subsets  P ROBLEM : T HE SLIDING FIVE Puzzle: Sliding Tile

 Use this technique to generalize the solution to any sliding puzzle….. Puzzle: Sliding tile

 Use this technique to generalize the solution to any sliding puzzle….. Puzzle: Sliding tile

 Use this technique to generalize the solution to any sliding puzzle….. Puzzle: Sliding tile

 Use this technique to generalize the solution to any sliding puzzle….. Puzzle: Sliding tile

 Use this technique to generalize the solution to any sliding puzzle….. Puzzle: Sliding tile

 Use this technique to generalize the solution to any sliding puzzle….. Puzzle: Sliding tile

Problem Solving  Have a plan  Generalize the problem  Restate the problem  Start with what you know  Divide the problem  Look for analogies or patterns  Experiment!!! THINK like a programmer!

Creation of Software