Tonga Institute of Higher Education IT 141: Information Systems

Slides:



Advertisements
Similar presentations
Programming for Beginners
Advertisements

ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Lecture 1: Overview of Computers & Programming
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.
Programming Creating programs that run on your PC
Computer Concepts 5th Edition Parsons/Oja Page 546 CHAPTER 11 Software Engineering Section A PARSONS/OJA Computer Programming.
Lecture 1: Intro to Computers Yoni Fridman 6/28/01 6/28/01.
Chapter 16 Programming and Languages: Telling the Computer What to Do.
Chapter 1 Program Design
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Programming. Software is made by programmers Computers need all kinds of software, from operating systems to applications People learn how to tell the.
CC111 Lec#5: Program Development 1 Program Development and Programming Languages Lecture 4 Reference :Understanding Computers Chapter 13.
สาขาวิชาเทคโนโลยี สารสนเทศ คณะเทคโนโลยีสารสนเทศ และการสื่อสาร.
Alexandria University Faculty of Science Computer Science Department Introduction to Programming (CS 102) C++ Programminhg.
COMPUTER PROGRAMMING Source: Computing Concepts (the I-series) by Haag, Cummings, and Rhea, McGraw-Hill/Irwin, 2002.
IT253: Computer Organization Lecture 4: Instruction Set Architecture Tonga Institute of Higher Education.
Computer Programming TCP1224 Chapter 3 Completing the Problem-Solving Process and Getting Started with C++
Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task.
Computer and Programming. Computer Basics: Outline Hardware and Memory Programs Programming Languages and Compilers.
Alexandria University Faculty of Science Computer Science Department Introduction to Programming C++
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
Java Programming: From the Ground Up
Tonga Institute of Higher Education IT 141: Information Systems
Lecture 1b- Introduction
Component 1.6.
Software Development.
Chapter 10 Programming Fundamentals with JavaScript
Programming Languages
Computer Programming (BCT 1113)
Introduction to programming
Learning to Program D is for Digital.
Lecture 1 Introduction Richard Gesick.
CSCI-235 Micro-Computer Applications
Computer Programming.
Key Ideas from day 1 slides
Introduction to Visual Basic 2008 Programming
Chapter 2: Input, Processing, and Output
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
CS101 Introduction to Computing Lecture 19 Programming Languages
Introduction to Computers and Java
A451 Theory – 7 Programming 7A, B - Algorithms.
Lecture 2 Introduction to Programming
Chapter Topics 2.1 Designing a Program 2.2 Output, Input, and Variables 2.3 Variable Assignment and Calculations 2.4 Variable Declarations and Data Types.
Programming Concepts and Languages
Application Development Theory
Translators & Facilities of Languages
Assembler, Compiler, Interpreter
CS190/295 Programming in Python for Life Sciences: Lecture 1
Computer Programming.
Designing and Debugging Batch and Interactive COBOL Programs
Chapter 10 Programming Fundamentals with JavaScript
Tonga Institute of Higher Education IT 141: Information Systems
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
Chapter 1 Introduction(1.1)
Chapter One: An Introduction to Programming and Visual Basic
Programming.
Tonga Institute of Higher Education IT 141: Information Systems
Assembler, Compiler, Interpreter
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
and Program Development
PROGRAMMING FUNDAMENTALS Lecture # 03. Programming Language A Programming language used to write computer programs. Its mean of communication between.
ICT Programming Lesson 1:
Lecture 8 Programming Paradigm & Languages. Programming Languages The process of telling the computer what to do Also known as coding.
ICT Gaming Lesson 2.
Tonga Institute of Higher Education IT 141: Information Systems
Chapter 2: Input, Processing, and Output
1.3.7 High- and low-level languages and their translators
Programming Logic and Design Eighth Edition
Presentation transcript:

Tonga Institute of Higher Education IT 141: Information Systems Lecture 14: Programming

Software Engineering Computer programming is also known as software engineering. It covers the entirety of developing software, which includes systems analysis and programming. It can involve hundreds of people and many months or years to finish a really big software project Microsoft Word has about 750,000 lines of code. The US government only thinks a program is big if it is over 1 million lines of code

Problem Statement So how do we start engineering software? It’s best to start with defining the things we need to do and to know A Problem Statement is a list of things that Specifies all aspects of the problem Clearly specifies all the information we know Specifies when the problem is solved With this information, we can figure out the problems we want to solve and how to solve them

Algorithms With this information about the problem, we can create an algorithm to solve it. An algorithm is a series of steps that can be written down and coded into a program. If the instructions of an algorithm are followed, then you will always get the right answer (If the algorithm was made correctly) Usually, you must be pretty detailed with your instructions. Computers are stupid.

How to write algorithms Structured English – This is using regular language to write out your algorithm Multiply the length by the height to get the area Pseudo-Code – Mixes programming code and language to make something that looks like code, but would never compile Area = length x height Flowchart – this uses pictures and graphics to help you understand the algorithm

Flowchart of Algorithm Start Input width Input height multiply width height Output area

Coding Programs are called sequential order programs, because the commands happen in order. That is unless, you make them go somewhere else Control structures will control the sequence of the instructions in the programming. Examples: if, else, functions, etc They will change the flow of a program

Control Structures Sometimes we will draw pretty pictures to show how a control structure works

Repetition Controls Repetition Controls are ways to make something happen many times. These are called loops. In programming you may use "for" and "while" to make this happen They’ll have some condition that either makes them continue doing the loop or stop the loop.

Debugging And Documentation To make sure your program works, you have to do a lot of testing. The biggest problem is finding errors or "bugs" and removing them Sometimes testing takes longer than programming People who write programs with lots of problems look like this

Errors There are three types of errors you may get when you make a program Syntax errors – when you don’t follow the guidelines of the programming language. Maybe you forgot semi-colons or spaces Run-time errors – errors that happen after you compile and start running a program. Maybe you tried to divide by zero. Logic errors – when your algorithm and procedures don’t do what they are supposed to, but the program still runs

Documentation It’s a good idea to put comments within your programs. It makes it easier for people to read, for you to remember what you did, and also for other people to continue working with your code Once you have a program that runs, it’s also a good idea to have documentation that tells people how to actually use the program.

Programming Languages Hundreds of programming languages have been invented since computers started Some were invented for specific purposes (like business or math) and some are general purpose A “procedural” programming language has a series of statements that execute one after each other. Programs start at the beginning and end at the end. They follow a simple flow through the code, it is easy to see what is happening (one example, BASIC)

Programming Languages Object oriented languages – they try to let programs use an object to manipulate data and change things. An object will be defined by a class. Inside the class there will be methods which allow people to do things to the object. There will also be attributes inside the object which describe something about the object. These are mostly variables that define data inside the object

Object-Oriented So why do we use object oriented programming? It lets many people work on a program at once because they can all work on small parts themselves It lets people use things that others did without having to understand them It lets things be reused a lot, instead of redoing the same thing over and over again

Declarative Languages Declarative languages let programmers define a set of rules and statements about some relationship or problem. Then inside the compiler, it applies those rules to get the answer. The programmer does not have to actually write out the answer, but instead he just writes the rules. Then the compiler does the hard work of solving the problem. One example is SQL

Markup and Scripting Languages We know that markup languages are not really programming languages, because they are simple tags inserted into regular text to make it look different Scripting languages are like most programming languages, except they cannot be run without an interpreter. They are sometimes not as powerful as programming languages that can be compiled.

Low-Level Languages Low-level languages (also called Assembly Languages) are used when the programmer wants to work directly with hardware. People who write compilers and who write operating systems use this Machine language - the language of 1s and 0s that the processor uses to execute the program. It cannot really be understood by humans. When computers were first invented people had to use 1s and 0s in order to program Assembly language is the direct translation of machine language. It has simple commands that will change memory or do simple arithmetic. It can be understood by people, but not as easily as high level languages (languages you need to compile in order to change to a low-level language)

Compilers Compilers turn your high-level programming language into low level assembly language. Your code is called “source code” The low-level code that comes out of a compiler is called “object code.” Sometimes it is ready to be run right away, because it is an executable. Sometimes it is turned into an “intermediate language.” One example of an intermediate language is with Java. Java allows you to compile your program into “byte-code.” This byte code can then be run on any computer. Java’s goal is to eliminate the problem that programs written on one system cannot work on another.

Interpreters Interpreters will only compile one instruction at a time. It will look at the current instruction, turn it into machine language and let it be executed. Then the next instruction will be changed into machine language. It is a little slower than when a compiled program runs because each line of code needs to be changed into machine language as it is running.

Event-Driven Some programs run based on something that happens. This is the case in graphical programming. It might wait for a mouse-click, something to move, or something entered from the keyboard These are called “events” and if your program responds to these, it is called an “event-driven” program

Components Because of object-oriented programming, you can buy or download components (or objects) that will do things for you. You don’t even need to know how they work You just plug them into your program and use what they do. For example, maybe your program needs to make a graph, so you can get a graph component. This graph component might display a graph for you with the data that you give it (data independence!)

Programming Languages Overview Visual Basic and Basic – procedural programs that can be compiled. Easy to use. Visual Basic very easy to use to make graphical programs. C – procedural programming that gives access to hardware, but is still high-level. Smart people can use C to make their programs very fast, but its hard to learn C++ - like C, but with objects. Many people can’t understand this idea of objects, so they give up

Programming Languages Overview COBOL – language made in the 1960s for large business mainframes. It is procedural, easy to understand and has lasted for a long time Java – high level, object-oriented language that is good for internet programs (called applets) and can run on any computer without being re-compiled Pascal – high level, procedural language made for students to learn with, but nobody can make a real program out of it SQL – the standard, declarative language for using databases.

Programming Languages Overview Perl –It is a high-level scripting language that lets you programming with objects or treat it like a procedural program PHP – Another high level scripting language that is entered right into HTML. .NET Languages (C#, VB.NET) – A new set of languages made by Microsoft that extend older languages by adding object oriented programming and try standardize Windows programming. It doesn’t require types and lets you mix lots of things together. It is also easy to make simple programs. No compiling!

Summary Most of the information in this chapter should be familiar with you, after having been exposed to programming already We went over some new things, like different types of languages and different things you can do with objects We also looked at different programming languages and what makes them unique