Programming 1. Lecture 1 COP 3014 Fall August 28, 2017

Similar documents
Programming 1 - Honors

Programming 1. Lecture 1 COP 3014 Fall August 28, 2018

Introduction to Java Programming

Chapter 1: Introduction to Computers and Programming

Chapter 1: Why Program? Main Hardware Component Categories 8/23/2014. Main Hardware Component Categories: Why Program?

Chapter 1: Why Program? Computers and Programming. Why Program?

Week 0: Intro to Computers and Programming. 1.1 Why Program? 1.2 Computer Systems: Hardware and Software. Hardware Components

Chapter 1 Introduction to Computers and Programming

BITG 1113: Introduction To Computers And Programming Language LECTURE 1 LECTURE 1 1

Problem Solving and Program Design - Chapter 1. Cory L. Strope

Introduction. Arizona State University 1

CHAPTER 1 Introduction to Computers and Java

Computers in Engineering COMP 208. Computer Structure. Computer Architecture. Computer Structure Michael A. Hawker

Topics. Hardware and Software. Introduction. Main Memory. The CPU 9/21/2014. Introduction to Computers and Programming

Chapter 1: An Overview of Computers and Programming Languages. Objectives. Objectives (cont d.) Introduction

Computer Fundamentals

Chapter 1: Introduction to Computers and Java

8/23/2014. Chapter Topics. Introduction. Java History. Why Program? Java Applications and Applets. Chapter 1: Introduction to Computers and Java

From High Level to Machine Code. Compilation Overview. Computer Programs

C H A P T E R 1. Introduction to Computers and Programming

C++ Programming Language Lecture 1 Introduction

CSc 10200! Introduction to Computing. Lecture 1 Edgardo Molina Fall 2013 City College of New York

CSCE150A. Administrivia. Overview. Hardware. Software. Example. Program. Pseudocode. Flowchart. Control Structures. Hello World Program CSCE150A

Computer Science & Engineering 150A Problem Solving Using Computers

Computer Basics 1/6/16. Computer Organization. Computer systems consist of hardware and software.

Computer Programming-1 CSC 111. Chapter 1 : Introduction

Programming: detailed instructions which tell the computer hardware what to do aka software Computer Science: the study NOT of computers, but of what

Introduction to Computer Programming for Non-Majors CSC 2301, Fall The Department of Computer Science

CHAPTER 1: INTRODUCTION TO COMPUTERS AND PROGRAMMING. 1 Muhalim Mohamed Amin Faculty of

Computer Basics 1/24/13. Computer Organization. Computer systems consist of hardware and software.

Elements of Computers and Programming Dr. William C. Bulko. What is a Computer?

Fundamentals of Programming. Lecture 1: Introduction to C Programming

Chapter 1 Computer and Programming. By Zerihun Alemayehu

SCSP Programming Technique C

CSC180: Lecture 2. Wael Aboulsaadat.

Chapter 1 Introduction to Computers, Programs, and Java. What is a Computer? A Bit of History

COP4020 Programming Languages. Compilers and Interpreters Robert van Engelen & Chris Lacher

SKILL AREA 304: Review Programming Language Concept. Computer Programming (YPG)

Computer Architecture 2/26/01 Lecture #

Computer Architecture

Fundamentals of Programming (Python) Basic Concepts. Ali Taheri Sharif University of Technology Spring 2018

CSI31 Introduction to Computer Programming I. Dr. Sharon Persinger Fall

Chapter 1 INTRODUCTION

0 Introduction: Computer systems and program development

! Learn how to think like a computer scientist. ! Learn problem solving. ! Read and write code. ! Understand object oriented programming

Week 1 Introduction to Computer and Algorithm (Part1) UniMAP Sem II 11/12 DKT121: Basic Computer Programming 1

1.The First Instrument known in the history of computers was. a) Pascal s adding machine b) Napier s bones c) Abacus d) Analytical Engine

Introduction to Computers and Java

Chris Riesbeck, Fall Introduction to Computer Systems

Chapter. Focus of the Course. Object-Oriented Software Development. program design, implementation, and testing

Compiling and Interpreting Programming. Overview of Compilers and Interpreters

Java and Software Design

The Programming Process Summer 2010 Margaret Reid-Miller

Lecture 1: Preliminaries

Introduction to Computer Programming for Non-Majors

assembler Machine Code Object Files linker Executable File

Welcome to Computer Organization and Design Logic

The Computer System. Hardware = Physical Computer. Software = Computer Programs. People = End Users & Programmers. people

Chapter 1 Introduction to Computers and C++ Programming

Computer Software: Introduction

Introduction to Computers and Programming Languages. CS 180 Sunil Prabhakar Department of Computer Science Purdue University

ST. MARY S COLLEGE FORM 4

INTRODUCTION TO THE COURSE

An Introduc+on to Computers and Java CSC 121 Spring 2017 Howard Rosenthal

An Introduction to Computers and Java CSC 121 Spring 2015 Howard Rosenthal

Fundamentals of Programming Session 1

9/11/08 (c) 2008 Matthew J. Rutherford Class (c) 2008 Matthew J. Rutherford Class

Topic 1: Programming concepts

Programming Principles and Techniques

EKT 120/4 Computer Programming KOLEJ UNIVERSITI KEJURUTERAAN UTARA MALAYSIA

Introduction to Computers. Joslyn A. Smith

LECTURE SCHEDULE 2. Units of Memory, Hardware, Software and Classification of Computers

Lab Determining Data Storage Capacity

CS150 Introduction to Computer Science 1. What is CS150? Who Are We? CS150 is a programming course You will learn

Administration Computers Software Algorithms Programming Languages

Agenda Computer Hardware Input Devices Output Devices Secondary Storage Computer Software System Software Application Software Working with Windows

A+ Guide to Managing and Maintaining your PC, 6e. Chapter 2 Introducing Operating Systems

Computer is an electronic machine that can receive, store, transform and output data of all kinds (image, text, numeric, graphics and sound).

COMP Computer Basics. Yi Hong May 13, 2015

Computer Principles and Components 1

Lecture 01: Basic Structure of Computers

Introduction to Java. Lecture 1 COP 3252 Summer May 16, 2017

Zimmer CSCI /24/18. CHAPTER 1 Overview. COMPUTER Programmable devices that can store, retrieve, and process data.

CMSC131. Hardware and Software. Hardware

CMSC131. Hardware and Software

Welcome to Computer Organization and Design Logic CS 64: Computer Organization and Design Logic Lecture #1 Winter 2018

Question Bank. Fundamentals Of Computer FYBCA (SEM - I)

AT76.09 Digital Image Processing in Remote Sensing using C Language

Outline. Introduction to Programming (in C++) Introduction. First program in C++ Programming examples

Syllabus for Computer Science General Part I

Fundamentals of Programming Session 1

Lecture 1: CS2400 Introduction to Computer Science

Downloaded From :

Introduction to Computers and Java. Objectives. Outline. Harald Gall, Prof. Dr. Institut für Informatik Universität Zürich.

Introduction to Computers and Java

1) What is the first step of the system development life cycle (SDLC)? A) Design B) Analysis C) Problem and Opportunity Identification D) Development

Chapter 1: An Overview of Computers and Logic

Introduction to Computers and Java

Information Communications Technology (CE-ICT) 6 th Class

Introduction to Computers and Java

Transcription:

Programming 1 Lecture 1 COP 3014 Fall 2017 August 28, 2017

Main Components of a computer CPU - Central Processing Unit: The brain of the computer. ISA - Instruction Set Architecture: the specific set of low-level instructions available to a CPU. Differs for various CPU types (Intel Pentium, Mac G4, etc). ALU - Arithmetic & Logic Unit responsible for performing arithmetic calculations, as well as logical operations (comparisons for equality, inequality, for instance). Main Memory (RAM - Random Access Memory). storage close to CPU Faster to access than hard disk stores executing programs and data being currently worked on Secondary Memory hard disk, floppy disk, CD, DVD, etc.

Main Components of a computer Input devices mouse, keyboard, scanner, network card, etc. Output devices screen/console, printer, network card, etc. Operating System Examples: Mac OS, Windows XP, Linux Controls computer operations Manages allocation of resources for currently running applications

Memory Concepts bit: a binary digit Stores the value 0 or 1 Smallest unit of storage in a computer byte: 8 bits Smallest addressable unit of storage in a computer Storage units (variables) in a program are 1 or more bytes Each byte in memory has an address (a number that identifies the location)

Programming, and Programming Languages Program - a set of instructions for a computer to execute Evolution of Programming languages Machine Language Based on machine s core instruction set Needed by computer, hard for humans to read (1 s and 0 s) Example: 1110110101010110001101010

Programming, and Programming Languages Assembly Language translation of machine instructions to symbols, slightly easier for humans to read Example: ADD $R1, $R2, $R3

Programming, and Programming Languages High-level procedural languages Abstraction of concepts into more human-readable terms Closer to natural language (i.e. what we speak) Easy to write and design, but must be translated for computer Examples include C, Pascal, Fortran Object-oriented languages Abstraction taken farther than procedural languages Objects model real-world objects, not only storing data (attributes), but having inherent behaviors (operations, functions) Easier to design and write good, portable, maintainable code Examples include Smalltalk, C++, Java

Code Translation Bridging the gap between high-level code and machine code Interpreted languages source code is directly run on an interpreter, a program that runs the code statements Compiled Languages A compiler program translates source code (what the programmer writes) to machine language (object code) A linker program puts various object code files together into an executable program (or other target type, like a DLL) C and C++ are compiled languages

Software Development Involves more than just writing code

Software Development Analysis and problem definition Design - includes design of program or system structure, algorithms, user-interfaces, and more Implementation (coding) Testing - can be done during design, during implementation, and after implementation Maintenance - usually the major cost of a software system. Not part of development, but definitely part of the software life cycle

Programming is about Problem Solving Algorithm - a finite sequence of steps to perform a specific task To solve a problem, you have to come up with the necessary step-by-step process before you can code it This is often the trickiest part of programming Some useful tools and techniques for formulating an algorithm Top-down Refinement: Decomposing a task into smaller and simpler steps, then breaking down each step into smaller steps, etc Pseudocode: Writing algorithms informally in a mixture of natural language and general types of code statements Flowcharting: If you can visualize it, it s often easier to follow and understand!

Programming is about Problem Solving Testing - algorithms must also be tested! Does it do what is required? Does it handle all possible situations? Syntax vs. Semantics Syntax the grammar of a language. A syntax error: I is a programmer. Semantics the meaning of language constructs Correct syntax, but a semantic error: The headphones ate the tree.

Basic Creation and Execution of a C++ program Create source code with a text editor, store to disk. Source code is just a plain text file, usually given a filename extension to identify the programming language (like.c for C, or.cpp for C++) Preprocessor Part of compiler process, performs any pre-processing tasks on source code. Compilation syntax checking, creation of object code. Object code is the machine code translation of the source code. Linking Final stage of the creation of an executable program. Linking of object code files together with any necessary libraries (also already compiled). Execution of program Program loaded into memory, usually RAM CPU executes code instructions

Software Required for the Class The recommended software is Microsoft Visual Studio c++ Express 2015 or 2017 for Windows Desktop. You can find it at https://www.visualstudio.com/downloads/. After it is installed, you can register the software when prompted. It s free. If you want to go with a newer edition, you can get the 2017 Community Edition as well. If you use the 2017 version, when you open the installer, it ll ask you which modules workloads you want to install. Choose Desktop Development with C++. When it s done installing, click launch. Mac users can use XCode. However, if you do so, please keep in mind that the TA s will use Visual Studio to grade. You can also create an account on the CS department programming servers, and use a text editor and the g++ compiler to run your code.