1 Programming and Software Engineering. 2 Software Development We can define two main classes of software: User-written software solve a particular problem,

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

Programming Paradigms and languages
Computers Are Your Future
QT – Introduction C++ GUI Programming with Qt 4 Blanchette and Summerfield, Ch. 1 Miller, 2004.
MC697 Object-Oriented Programming Using Java. In this class, we will cover: How the class will be structured Difference between object-oriented programming.
Programming Creating programs that run on your PC
Introduction To System Analysis and Design
Computers: Tools for an Information Age
Java Programming, 3e Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
Your Interactive Guide to the Digital World Discovering Computers 2012 Chapter 13 Computer Programs and Programming Languages.
First Windows Program Hello Windows. 2 HELLOWIN.C #include LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ; int WINAPI WinMain (HINSTANCE hInstance,
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Chapter 4 - Software – Part 2 Dr. V.T. Raja Oregon State University.
CSE 1301 J Lecture 2 Intro to Java Programming Richard Gesick.
1 CS101 Introduction to Computing Lecture 19 Programming Languages.
Your Interactive Guide to the Digital World Discovering Computers 2012.
1.Database plan 2.Information systems plan 3.Technology plan 4.Business strategy plan 5.Enterprise analysis Which of the following serves as a road map.
Chapter 13 Programming Languages and Program Development 1.
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
Program development & programming languages Chapter 13.
Programming Languages: Telling the Computers What to Do Chapter 16.
Chapter Lead Black Slide Powered by DeSiaMore Powered by DeSiaMore.
Programming Languages
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
CC111 Lec#5: Program Development 1 Program Development and Programming Languages Lecture 4 Reference :Understanding Computers Chapter 13.
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.
Introduction to Programming Languages. Problem Solving in Programming.
11.10 Human Computer Interface www. ICT-Teacher.com.
Why Java? A brief introduction to Java and its features Prepared by Mithat Konar.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Overview of Previous Lesson(s) Over View  Visual C++ provides us with 3 basic ways of creating an interactive Windows application  Using the Windows.
CS101 Introduction to Computing Lecture Programming Languages.
Introduction To System Analysis and Design
Chapter 34 Java Technology for Active Web Documents methods used to provide continuous Web updates to browser – Server push – Active documents.
Chapter 1: Hello, MFC Windows Programming Model Department of Digital Contents Sang Il Park.
Chapter 1: Hello, MFC Your first MFC Application Department of Digital Contents Sang Il Park.
Java Programming, Second Edition Chapter One Creating Your First Java Program.
Visual C++ Programming: Concepts and Projects
Chapter 3: Computer Software. Stored Program Concept v The concept of preparing a precise list of exactly what the computer is to do (this list is called.
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.
BZUPAGES.COM Visual Programming Lecture – 2 Miss. SADAF MAJEED SIAL Computer Science Department Bahauddin Zakariya University Multan.
Direct3D Workshop November 17, 2005 Workshop by Geoff Cagle Presented by Players 2 Professionals.
1 Systems Analysis and Design in a Changing World, Thursday, January 18, 2007.
Lead Black Slide. © 2001 Business & Information Systems 2/e2 Chapter 5 Information System Software.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
10/8: Software What is software? –Types of software System software: Operating systems Applications Creating software –Evolution of software development.
I Power Higher Computing Software Development Development Languages and Environments.
Chapter 6 CASE Tools Software Engineering Chapter 6-- CASE TOOLS
CASE (Computer-Aided Software Engineering) Tools Software that is used to support software process activities. Provides software process support by:- –
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Chapter 13 A & B Programming Languages and the.
Welcome to OBJECT ORIENTED PROGRAMMING Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
Your Interactive Guide to the Digital World Discovering Computers 2012 Chapter 13 Computer Programs and Programming Languages.
Chapter Goals Describe the application development process and the role of methodologies, models, and tools Compare and contrast programming language generations.
CSCI-235 Micro-Computer Applications
Windows Programming Model
Introduction to Computers and Java
and Program Development
GUI Socket Application
Presentation transcript:

1 Programming and Software Engineering

2 Software Development We can define two main classes of software: User-written software solve a particular problem, access information, automate routine tasks this has been a traditional approach for engineers availability of powerful applications software has greatly reduced the need for users to write programs Commercial software software written for commercial distribution, or for the use of other people within an organization

3 Software Complexity and Software Engineering Comparing simple user-written programs to commercial applications is like comparing a birdhouse to the Skydome For example, software for the space shuttle consists of over 40 million lines of code!

4 The State of the Software Industry Software is one of the most important industries in the world Although the applications are high tech, software companies are still run like cottage industries Software is manufactured today the same way the first automobiles were manufactured 100 years ago!

5 Software Manufacturing Methods Each program is built from scratch by skilled craftspeople The components must be carefully adjusted for the whole thing to work Parts or components are not interchangeable between programs (or cars in 1900) There are few standards

6 Critical Problems Software takes too long to develop Productivity is low There are many bugs that are difficult to fix Much effort is directed to reinventing the wheel (e.g., creating user interfaces) Programmers must be highly skilled

7 Software Engineering Designing a software system is as complex as designing a rocket, a large building, or a car. Designing software systems requires a sound engineering methodology Currently, most programmers are not trained or certified as engineers Software engineering has become an important discipline

8 Critical Labour Shortage There is a critical shortage of programmers and other information technology professionals Very few engineering schools offer programs in software engineering PPKA will have one of the first software engineering programs in MALAYSIA

9 Software Life Cycle The software life cycle consists of several phases, starting with identification of a need, and ending only when the software is no longer in use The software life cycle is similar to the life cycle of any manufactured or engineered product

10 Software Life Cycle (summary) Identify and describe an application Analyse the application in detail Preliminary design Detailed design Coding Testing and debugging Documentation and maintenance

11 Software Life Cycle Identify and describe an application market and user surveys brainstorming conceptual design Analyse the application in detail identify the functional modules

12 Software Life Cycle Preliminary design describe the general software structure using flowcharts or pseudocode design alternatives can be explored at this stage Detailed design completely specify the program logic Coding implement the design using a programming language coding from a detailed design is like building a house from a blueprint

13 Software Life Cycle Test and debug errors can be due to syntax (ie, incorrect grammar), or logic logic errors are very difficult to detect Documentation and maintenance software may remain in use for years someone must continue to fix bugs, add features, and help users the cost of maintenance can be much higher than the cost of development

14 Programming Languages Assembly language High-level languages FORTRAN, C, Pascal Fourth-generation languages (4GLs) Very high-level languages application generators natural language

15 Assembly Language Much software is still written in assembly language Advantages speed, compactness, efficiency Disadvantages not portable difficult to implement and debug every function must be programmed at machine level Thousands of programs written in Intel 80x86 assembly language will not run on any other processor

16 High-level Languages Most software is written in high level languages Fortran, Pascal, Basic and C are popular C has become a de facto standard for several reasons standards exist, so the code is portable it has much of the power and flexibility of assembly language

17 Problems with these Languages Difficult to learn and use The only built-in I/O support is character- based read and write Not suitable for occasional “quick and dirty” programming Development of Graphical User Interface is difficult Much of the code is a reinvention of the wheel

18 Fourth Generation Languages (4GLs) 4GLs and Rapid Application Development (RAD) tools are used to develop applications with little or no programming Typically use a graphical, drag-and-drop approach Corresponding source code is generated automatically

19 Examples of RAD Tools Microsoft Visual Basic Borland Delphi Powersoft PowerBuilder Topspeed Clarion

20 Structured Programming An important methodology for dealing with complexity is structured programming Complex tasks need to be broken down into simpler subtasks Structured programming reduces complex problems to collections of simple, interconnected modules It is up to the programmer to implement structured programming

21 Programming for DOS DOS provides few system services to the programmer It is up to the programmer to implement the following modules for each application from scratch user interface printer drivers video drivers etc. As a result, every application looks and works differently

22 Programming for Windows Windows provides many standard services to the programmer It also specifies a common look and feel for all applications Now the programmer does not need to worry about low level drivers, GUI programming, etc. The programs call Windows Application Program Interface (API) functions Unfortunately, the programmer needs to be knowledgeable about hundreds of API functions

23 Graphical User Interfaces In most applications, the majority of code is associated with the user interface The Windows API provides hundreds of functions to create menus, dialog boxes, etc. Developing the GUI is difficult

24 Procedural Vs. Interactive, Event-driven Programs Traditional programs are procedural, with limited user interaction Most Windows applications are event- driven The program responds to user events, like menu selections, keyboard input and mouse clicks

25 Hello, World! A classical C programming example simply prints the message “Hello, world” on the screen. In standard C, the entire program is shown below. #include main() { printf(“Hello, world\n”); }

26 Hello, World! The equivalent program in Windows requires two pages of cryptic code The program creates a window, and writes “Hello, Windows” in the centre This is the simplest Windows program possible This example demonstrates the shift from text-based applications to event-driven graphical applications

27 Hellowin.c Page 1 /* HELLOWIN.C -- Displays "Hello, Windows" in client area (c) Charles Petzold, */ #include long FAR PASCAL _export WndProc (HWND, UINT, UINT, LONG) ; int PASCAL WinMain (HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpszCmdParam, int nCmdShow) { static char szAppName[] = "HelloWin" ; HWND hwnd ; MSG msg ; WNDCLASS wndclass ;

28 Hellowin.c Page 2 if (!hPrevInstance) { wndclass.style = CS_HREDRAW | CS_VREDRAW ; wndclass.lpfnWndProc = WndProc ; wndclass.cbClsExtra = 0 ; wndclass.cbWndExtra = 0 ; wndclass.hInstance = hInstance ; wndclass.hIcon = LoadIcon (NULL, IDI_APPLICATION) ; wndclass.hCursor = LoadCursor (NULL, IDC_ARROW) ; wndclass.hbrBackground = GetStockObject (WHITE_BRUSH) ; wndclass.lpszMenuName = NULL ; wndclass.lpszClassName = szAppName ; RegisterClass (&wndclass) ; }

29 Hellowin.c Page 3 hwnd = CreateWindow (szAppName, // window class name "The Hello Program", // window caption WS_OVERLAPPEDWINDOW, // window style CW_USEDEFAULT, // initial x position CW_USEDEFAULT, // initial y position CW_USEDEFAULT, // initial x size CW_USEDEFAULT, // initial y size NULL, // parent window handle NULL, // window menu handle hInstance, // program instance handle NULL) ; // creation parameters

30 Hellowin.c Page 4 ShowWindow (hwnd, nCmdShow) ; UpdateWindow (hwnd) ; while (GetMessage (&msg, NULL, 0, 0)) { TranslateMessage (&msg) ; DispatchMessage (&msg) ; } return msg.wParam ; } long FAR PASCAL _export WndProc (HWND hwnd, UINT message, UINT wParam, LONG lParam) { HDC hdc ; PAINTSTRUCT ps ; RECT rect ;

31 Hellowin.c Page 5 switch (message) { case WM_PAINT: hdc = BeginPaint (hwnd, &ps) ; GetClientRect (hwnd, &rect) ; DrawText (hdc, "Hello, Windows!", -1, &rect, DT_SINGLELINE | DT_CENTER | DT_VCENTER) ; EndPaint (hwnd, &ps) ; return 0 ; case WM_DESTROY: PostQuitMessage (0) ; return 0 ; } return DefWindowProc (hwnd, message, wParam, lParam) ; }

32 GUI Development Tools Interactive tools have appeared to allow the programmer to design and test the GUI graphically The code is automatically generated to implement the GUI This saves much time, especially for inexperienced programmers

33 Object-Oriented Programming (OOP) Traditional languages treat data and procedures as separate entities The programmer designs procedures (instructions) to manipulate data (variables, files, etc.)

34 Object-Oriented Programming (OOP) Object-Oriented languages treat programs as a collection of objects An object is a combination of data and procedures that are stored together as a reusable unit Objects communicate by sending messages to each other

35 Object-Oriented Programming (OOP) A powerful feature of OOP is inheritance New objects can be based on existing objects, with just minor changes Groups of similar objects can be grouped into classes

36 Object-Oriented Programming (OOP) Each member or instance of a class contains shared code, plus code specific to the instance For example, each open window in Windows is an instance of a class of window objects Methods for opening, closing, moving, resizing, etc. are shared by all instances

37 Advantages of OOP Generic objects can be reused in many applications This reuse of software encourages a building block approach to software development, using standardized parts Software development is much faster Software is easier to understand, debug and maintain

38 Disadvantages of OOP Difficult to learn for programmers used to procedural languages A new way of thinking is required Objects reduce portability of code

39 Object-Oriented Languages The major OOP language is C++ C++ is standard C with object-oriented extensions Another OOP language is Smalltalk A brand-new alternative is Java

40 Component Software Software reuse can be accomplished using component software Example: Microsoft Component Object Model (COM) and ActiveX Existing ActiveX components can be incorporated into new applications, saving much development time

41 Java Announced by Sun Microsystems in 1995 Greatly hyped! Seen as a way to compete with the Wintel duopoly Issues have been political, as well as technical

42 The Java Promise... Embedded applications like set-top boxes and cellular phones Internet applications Network computers Platform-independent software development

43 What is Java? A new language, similar to C++ but without the drawbacks built-in garbage collection no pointers bounds checking Object oriented from ground up The language improvements eliminate many sources of bugs

44 Write Once, Run Anywhere Java includes standard libraries for graphical interfaces, etc. Java programs run inside a Virtual Machine (VM) VM is an abstract computer that runs compiled Java programs. The JVM is "virtual" because it is generally implemented in software on top of a "real" hardware platform and operating system. They are independent of processor or operating system

45 Applets and Network Software Java can be used to write normal programs, or “applets” that run inside a Web browser Applets are downloaded from a server before running The Network Computers being promoted by Sun, Oracle and others will run Java

46 Java Applets Browser Server Virtual Machine Applet

47 The Hype and the Reality Sun is trying to enforce “100% Pure” Java that will run on any certified VM Microsoft and others are extending and modifying Java Visual J++ makes use of Windows capabilities not portable Microsoft, Netscape and others have developed their own flavours of the VM The Java specification continues to change

48 The Trade-offs Pure Java Runs on any platform Lowest common denominator Limited development tools Performance not optimized Proprietary Java May be platform- specific Makes use of features of underlying operating system Good development tools Optimized performance

49 User-Oriented Languages Easy to use programming applications have emerged to meet the need of end-user programming A good example is Microsoft Visual Basic Users with limited programming experience can quickly develop powerful, professional- looking applications with full graphical interfaces.

50 Macros and Application Customization Many useful applications can be created by building on existing software Word and Excel can be extensively programmed using Visual Basic for Applications For example, you could create a program to accept data using an input form, analyze the results, and plot a graph, all in Excel

51 Computer Aided Software Engineering (CASE) CASE is a set of productivity tools for programmers and software developers The tools are analogous to word processors and spreadsheets for business people CASE is still immature, but will become increasingly important in the future

52 Computer Aided Software Engineering (CASE) The CASE toolkit includes: Design tools flow diagrams, structure charts, etc. Prototype tools user interface, screen generators, report generators Information repository tools database for the software development project

53 Computer Aided Software Engineering (CASE) Program development tools organize, generate and test code Methodology tools support standard development methodology

54 THE END !