Programming Languages

Programming Languages

Lecture 19 / Chapter 13 COSC1300/ITSC 1401/BCIS 1405 12/5/2004 Lecture 19 / Chapter 13 COSC1300/ITSC 1401/BCIS 1405 12/5/2004 General Items: Computer Program • Lab? Ok? • Read the extra credits • A series of instructions that direct a computer to perform tasks • Need to come to class • Such as? Who is the programmer? • Have a quiz / no books / use notes -> What is the big idea • School is almost over • Programming language is a series of rules for writing the instructions • • There are hundreds of computer programs – need-based! Reading Materials: Programming language • - Two basic types: Low- and high-level programming languages Miscellaneous: o Low-level: Programming language that is machine-dependent ° Must be run on specific machines o High-level: Language that is machine-independent ° Can be run on different types of machines Programming Language Low Level High Level Machine Assembly Language Language Procedural Nonprocedural Remember: Ultimately, everything must be converted to the machine language! Object Oriented F.Farahmand 1 / 12 File: lec14chap13f04.doc F.Farahmand 2 / 12 File: lec14chap13f04.doc Lecture 19 / Chapter 13 COSC1300/ITSC 1401/BCIS 1405 12/5/2004 Lecture 19 / Chapter 13 COSC1300/ITSC 1401/BCIS 1405 12/5/2004 Categories of programming languages o Nonprocedural language -> Programmer specifies only what the - Machine language program should accomplish; it does not explain how o Only language computer understands directly - Forth-generation language - Assembly language o Syntax is closer to human language than that of a 3GL o Instructions made up of symbolic instruction codes o SQL and report generator are examples o Assembler converts the source code to the machine language - Fifth-generation language - Third-generation language o Provides visual or graphical interface for creating source code o Uses a series of English-like words to write instructions o Visual Basic.NET is an example - Procedural language -> Programming instructions to tell computer what - Common procedural programming languages to accomplish and how to do it o BASIC o Compiler: ° Designed for use as a simple, interactive problem-solving ° Separate program that generates programming list (consists of language errors) ° Beginner's All-purpose Symbolic Instruction Code ° Program that converts entire source program into machine o COBOL language before executing it o C (Changed B to C!) o Object program ° Used for execution later o Interpreter ° Program that translates and executes one program code statement at a time ° Does not produce an object Source Compiler Object Code: Program Assembly/3 ° F.Farahmand 3 / 12 File: lec14chap13f04.doc F.Farahmand 4 / 12 File: lec14chap13f04.doc Lecture 19 / Chapter 13 COSC1300/ITSC 1401/BCIS 1405 12/5/2004 Lecture 19 / Chapter 13 COSC1300/ITSC 1401/BCIS 1405 12/5/2004 Object-oriented (OO) approach o The structured programming does not explain how to keep the data and program together o Eliminates redundant programming o No more spaghetti code o Programmer can package data and program (or procedure) into a single unit, called an object (uses the OO approach) o OOP is event-driven o Checks for and responds to set of events o C++ is a complete object-oriented language OO Programming languages Hundreds of programming languages exist – They are different in flexibility, user interface, and functionality o C++ : Classes and events o Java and Java applets: Small Java program that runs inside another program such as a Web browser o Visual Programming Language ° Windows-based application that assists programmers in developing event-driven Windows-based applications ° Fifth – generation language • Allows drop and drag of objects • Easy to use ° Examples: • Visual Basic • Visual Studio/Visual C++/Visual C# .NET o Run over the Internet o Easier programming development o Suitable for large/small – scale applications F.Farahmand 5 / 12 File: lec14chap13f04.doc F.Farahmand 6 / 12 File: lec14chap13f04.doc Lecture 19 / Chapter 13 COSC1300/ITSC 1401/BCIS 1405 12/5/2004 Lecture 19 / Chapter 13 COSC1300/ITSC 1401/BCIS 1405 12/5/2004 Web page program development tools o Common Gateway Interface Program (CGI) o Tools used to create web pages ° Used for sending and receiving information over the web o Adding special effects and forms to a Web page ° Basic Idea: ° Examples: Cookies, Shopping cards, Games, and many other • Resides in the server multimedia effects • When a search is requested the it is sent to the CGI ° Script: Interpreted program that runs on client program ° Applet: Also usually runs on client, but is compiled – runs • The CGI contacts the database and requests the faster than script information ° Servlet: Applet that runs on server • The CGI receives the information from the database and ° ActiveX control: Small program that runs on client shows it in HTML format and it is sent to the web o HTML browser ° Hypertext Markup Language – set of special codes used to create web page- ° Not a programming language – Page formatting language ° Uses tags an must be kept as an ASCII file o Dynamic HTML: ° Allows you to include more graphics and interactivity on Web page (pointing to a text changes the shape) ° Animations, Interactions, Scroll bar, pop-up windows o XML: eXtensible Markup Language ° Allows Web page developers to create tags that describe data passed to a client so client, rather than server, can process data – different platforms can display the same XML o XHTML: eXtensible HTML Includes features of HTML and XML o WML Wireless Markup Language ° Allows Web page developers to design pages specifically for micro-browsers ° Uses the wireless application protocol (WAP) o Web page authoring: ° Dreamweaver MX, FrontPage, Flash F.Farahmand 7 / 12 File: lec14chap13f04.doc F.Farahmand 8 / 12 File: lec14chap13f04.doc Lecture 19 / Chapter 13 COSC1300/ITSC 1401/BCIS 1405 12/5/2004 Lecture 19 / Chapter 13 COSC1300/ITSC 1401/BCIS 1405 12/5/2004 System development life cycle Program development life cycle - A system is a set of components that interact to achieve a common goal - A computer program is a set of instructions that directs computer to - System development life cycle generally has 5 phases: perform tasks o Planning - A programming language is a set of words, symbols, and codes that o Analysis enables a programmer to communicate instructions to a computer o Design - PDLC is a steps followed to build computer programs o Implementation o Analyze problem o Support ° Review program specifications package ° Meet with systems analyst and users ° Identify each program’s input, output, and processing components o Design problems ° Grouping program activities to modules (top-down design) ° Providing a solution algorithm for each phase and testing it (structured design) ° Top-down design: Focuses on what program should do ° Structured design: Focuses on how to build program based on requirements (Creating a hierarchical chart) • Uses a technique that builds all program logic by combining three control structures: o Sequence control structure (Input, Process, Output) o Section control structure (if-then-else) o Repetition control structure (do-while) ° Writing proper programs: • No-dead codes • No infinite loops • One entry point • One exist point (no spaghetti code – not structured) ° Using design tools (graphical or written description of each module) F.Farahmand 9 / 12 File: lec14chap13f04.doc F.Farahmand 10 / 12 File: lec14chap13f04.doc Lecture 19 / Chapter 13 COSC1300/ITSC 1401/BCIS 1405 12/5/2004 Lecture 19 / Chapter 13 COSC1300/ITSC 1401/BCIS 1405 12/5/2004 • Flowchart (Graphically shows logic in a solution QUIZ algorithm) • Pseudocode (Uses condensed form of English to convey What is a computer program? program logic) o Code programs ° Translating solution algorithm into a programming language Why do we use Object-oriented programming language? ° Entering programming language code into the computer o Test programs ° Goal is to ensure program runs correctly and is error free - Three types of errors Name 3 programming languages. • Syntax • Logic • Run time ° Debugging: Process of locating and correcting syntax and logic Name 2 web page development techniques. errors in program o Formalize solution ° Programmer performs two activities What is HTML? • Reviews program code • Reviews documentation o Maintain program ° Identify errors ° Identify enhancements ° Involves modifying existing programs to improve their functionality F.Farahmand 11 / 12 File: lec14chap13f04.doc F.Farahmand 12 / 12 File: lec14chap13f04.doc .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    3 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us