Introduction to Programming. When you program, you are programming the instruction set of the CPU (machine language). Intel 8080 CPU.

Slides:



Advertisements
Similar presentations
What is a Computer Program? For a computer to be able to do anything (multiply, play a song, run a word processor), it must be given the instructions.
Advertisements

Computers Are Your Future
Java.  Java is an object-oriented programming language.  Java is important to us because Android programming uses Java.  However, Java is much more.
Programming Creating programs that run on your PC
Programming System development life cycle Life cycle of a program
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
Computers Are Your Future © 2006 Prentice Hall, Inc.
Computer Concepts 5th Edition Parsons/Oja Page 546 CHAPTER 11 Software Engineering Section A PARSONS/OJA Computer Programming.
Three types of computer languages
Computers: Tools for an Information Age
Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare.
Programming. Software is made by programmers Computers need all kinds of software, from operating systems to applications People learn how to tell the.
Programming Concepts and Languages Chapter 12 – Computers: Understanding Technology, 3 rd edition 1November
Chapter 1 Introduction to Programming. Computer Hardware CPU Memory –Main or primary –Secondary or auxiliary Input device(s) Output device(s)
Types of software. Sonam Dema..
Copyright 2003 Scott/Jones Publishing Brief Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Building Applications.
Your Interactive Guide to the Digital World Discovering Computers 2012.
Lesson 4 Computer Software
CS102 Introduction to Computer Programming
© Paradigm Publishing Inc Chapter 12 Programming Concepts and Languages.
Introduction 01_intro.ppt
Computers Are Your Future Tenth Edition Chapter 11: Programming Languages & Program Development Copyright © 2009 Pearson Education, Inc. Publishing as.
Program development & programming languages Chapter 13.
Introduction to Computer Programming itc-314
1 Lecture 2 : Computer System and Programming. Computer? a programmable machine that  Receives input  Stores and manipulates data  Provides output.
 2008 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and World Wide Web.
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
Understanding Computers Ch. 131 Chapter 13 Program Development and Programming Languages.
High-level Languages.
UNIVERSITI TENAGA NASIONAL “Generates Professionals” CHAPTER 4 : Part 2 INTRODUCTION TO SOFTWARE DEVELOPMENT: PROGRAMMING & LANGUAGES.
COMPUTER PROGRAMMING Source: Computing Concepts (the I-series) by Haag, Cummings, and Rhea, McGraw-Hill/Irwin, 2002.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
Programming. What is a Program ? Sets of instructions that get the computer to do something Instructions are translated, eventually, to machine language.
Programming Languages 1.07a.  A computer program is a series of instructions that direct a computer to perform a certain task.  A programming language.
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 13: An Introduction to C++
Chapter 1 Introduction to Computers and C++ Programming Goals: To introduce the fundamental hardware and software components of a computer system To introduce.
Introduction to C++ Programming Language
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 1- 1 October 20, October 20, 2015October 20, 2015October 20,
1 Chapter 13 Understanding Computers, 11 th Edition 13 Program Development and Programming Languages TODAY AND TOMORROW 11 th Edition CHAPTER.
Discovering Computers 2009 Chapter 13 Programming Languages and Program Development.
Computer Programs and Programming Languages What are low-level languages and high-level languages? High-level language Low-level language Machine-dependent.
IXA 1234 : C++ PROGRAMMING CHAPTER 1. PROGRAMMING LANGUAGE Programming language is a computer program that can solve certain problem / task Keyword: Computer.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
1 Lecture 2 : Computer System and Programming. Computer? a programmable machine that  Receives input  Stores and manipulates data  Provides output.
Chapter 0 Overview. Why you are here? Where will you go? What is this course for?
CS CS CS IA: Procedural Programming CS IB: Object-Oriented Programming.
Liang, Introduction to C++ Programming, (c) Chapter 1 Introduction to Computers, Programs, and C++
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
CS Computer Science I. BCPL was developed in 1967 as a language for writing operating systems and software compilers In 1970, the creators of the.
Programming in C++ Dale/Weems/Headington Chapter 1 Overview of Programming and Problem Solving.
Introduction to Programming and JavaScript. Programming.
Chapter 11  Getting ready to program  Hardware Model  Software Model  Programming Languages  Facts about C++  Program Development Process  The Hello-world.
Alexandria University Faculty of Science Computer Science Department Introduction to Programming C++
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
CHAPTER ELEVEN Information System Development and Programming Languages Copyright © Cengage Learning. All rights reserved.
Introduction to Algorithm. What is Algorithm? an algorithm is any well-defined computational procedure that takes some value, or set of values, as input.
Introduction to Computers and C++ Programming
Introduction to programming
CSCI-235 Micro-Computer Applications
Computer System and Programming
Introduction to Computers and Java
Application Development Theory
Computer Science I CSC 135.
CS IA: Procedural Programming CS IB: Object-Oriented Programming
Programming Logic and Design Eighth Edition
Introduction to Computer Science
Presentation transcript:

Introduction to Programming

When you program, you are programming the instruction set of the CPU (machine language). Intel 8080 CPU

Machine Language / Assembly Language The only programming language a CPU can directly execute is machine language (or machine code). Since machine language instructions are in binary, Assembly Language is created to allow a programmer to code the instructions in a familiar language, then compile these instructions into machine language. With Assembly Language, you are still programming using the instruction set of the CPU.

The Hierarchy of Programming Languages End-User Database, Worksheet, Document Access, Excel, Word C++, Java, C# Assembly Language Machine Language Hardware - CPU Lower Level - Higher Level #include main() { int Total,Kiwi,Bananas; Kiwi = 5; Bananas = 6; Total = Kiwi + Bananas; cout << Total << endl; }

Compiled versus Interpreted A compiler translates an entire program (source code) into machine language for execution by the CPU. The result is an executable (.exe) file that can be run on a computer. A = 5program.exe B = A Print B An interpreter translates or compiles a program one line at a time while it is executing. An older example of an interpreted language is Basic. A newer example is JavaScript.

Enter temperature in Fahrenheit: 75 It is degrees Celsius. #include float Convert(float); main() { float F,C; cout << "Enter temperature in Fahrenheit: "; cin >> F; C = Convert(F); cout << "It is " << C << " degrees Celsius.\n"; } float Convert (float F) { float C = (5.0/9.0) * (F ); return C; } Structured Programming Program Source Code Program Output Structured programming is a programming paradigm aimed at improving the clarity, quality, and development time of a computer program by making extensive use of subroutines, block structures and for and while loops—in contrast to using simple tests and jumps such as the goto statement which could lead to "spaghetti code" which is difficult both to follow and to maintain.

DeckofCards Lucky; // define object Lucky to be a deck of cards Player Kirk; // define object Kirk to be a player Lucky.Shuffle; // shuffle the deck of cards Lucky.Cut; // cut the deck or cards Kirk.Cards = Lucky.Deal(5); // deal 5 cards to Kirk Kirk.ShowCards; // display the cards Kirk.PokerHand; // display poker hand Object Oriented Programming (OOP) Full House Program Source Code Program Output Object-oriented programming (OOP) is a newer approach to program design. It focuses on creating objects. Objects have both properties (data) and methods (functions). For example, an object might be a deck of cards. It’s properties are the number and order of the cards. Its methods/functions are shuffling, cutting, dealing, etc.

Software Development Life Cycle PhaseComments Problem AnalysisSystem analysts study the problem and define the specifications for the software. Program DesignThe specifications are used to develop an algorithm for the program Program CodingProgrammers produce the code for the program. Alpha versions of the program are created. Program Debugging and TestingProgram testing may be done in-house, or a Beta version may be produced to allow end-users test the program. Program Implementation and Maintenance After the program is put into production, the maintenance phase begins. New versions will be released to fix bugs and add requested functionality.

Programming Languages LanguageDescription Machine LanguageThe native programming language of the computer's CPU. This low-level language is tedious – CPUs come with a specified set of very basic instructions and operations. For example, a load instruction will move each piece of data from memory to a register on the CPU for processing. Machine language is written in binary – all 1's and 0's. Assembly LanguageA more efficient way to write machine language. This low-level language allows instructions to be written in a more understandable format (instead of binary), then converted to machine language. CA high-level structured, procedural programming language that is widely used for programming applications as well as operating systems. It was developed on a UNIX system and later used to reprogram UNIX. C++A high-level object oriented programming language that is a superset of C. Originally designed by Bjarne Stroustrup of AT&T's Bell Labs in It adds better type checking, data abstraction, and object oriented programming to C. C#Pronounced C-Sharp, this programming language was developed by Microsoft for its.NET Framework. In many ways, it is an upgrade to C++ and was made to compete with the Java language. BASICAn early high-level programming language that is simple to use and widely popular. Many of the first home computers in the 1970's and 1980's included this programming language. COBOLCOBOL (Common Business Oriented Language) was the first widely used high-level language for business applications such as payroll and accounting. This older programming language has been updated and is still used today, mostly on mainframe computers. FORTRANFORTRAN (Formula Translation) is an older high-level language that was designed for scientific applications. Objective-CA programming language similar to C that is used by Apple in programming iOS apps. In 2014, Apple created a new language called Swift that will operate within Objective-C. PascalPascal is an older high-level language that was also designed for math and science applications. It was popular as a teaching tool for structured programming before C became popular. Visual Basic (VB)Microsoft's Visual Basic adds object-oriented features and a graphical user interface to the standard BASIC language. JavaA high-level object-oriented programming language developed by Sun Microsystems for creating programs that are platform independent. Java programs are.class files and will execute on any operating system that has the Java run-time console installed. Java is now the programming language used for Android apps. JavaScriptA scripting language used in web pages that enhances the limited capabilities of HTML. JavaScript adds many functions to HTML including event handlers, cookies, and pop-up windows.