Premium Essay

Unit 16 Procedural Programming

Submitted By
Words 1243
Pages 5
Unit 16: Procedural Programming
Procedures
Procedures are a collection of instructions which might be ordered into many unique steps, this could allow programmes to observe the needs of the developer. Procedures consist only in little sections of the source code and in python before you use a procedure, you'll want to offer it a fixed name. Procedures are useful as it can assist to reduce the amount of times a programmer writes the same source code. Procedures can even use their very own variables, and those cannot be used inside the code. For instance, the procedure of an car no longer starting would be:
Car won’t start Try again check fuel Did it start Yes end
Functions
A …show more content…
The function is not always being a class therefore it is a standalone function. One pre-defined function is set instructions that are already built within the system. One example of a programming language that uses pre-defined capabilities is Java.
A pre-defined function that Java uses in “username = username. To Lowercase” – This line of code will tell the programme to make the all characters that are stored in the variable “username” will be lowercase. Another predefined function in Java would be “username = username. To Uppercase” – This line of code will tell the system to change all the characters that are stored in the variable username to be modified into uppercase.
Local …show more content…
In programming the whole area of code will be split into different sections, this will make it easier for the developer to follow, understand and locate different parts of the code. Modularity will separate the code by using a mix of functions and procedures. Sectioning of the code into different parts and moving them into different places will improve how the code will run. Modularity Is key for large projects, this is because it makes it easier to debug and maintain different parts of the code. If the programs were to be created without the use of modular elements, then it would be very hard for the programmers to understand the code therefore it will waste more time. One distinctive advantage of using modularity is that the whole source code is separated and moved into different sections. This means that when a developer is testing the code, he will do it in sections. Testing the code in sections can make it easier for the developer to locate any errors in the code, this will save the developer time as he wouldn’t need to check the whole source code for one problem. Another advantage of modularity is that it allows modules to be called upon over and over again. This is an advantage as you don’t have to create any new modules but instead use the same one over and over again. Another advantage of modular elements is that it allows a group of developers to work together as a team. This is an

Similar Documents

Premium Essay

Bout This

...Pasig campus pangilinan DSITI-AI Oct 27 15 Java Programming java programming Introduction in java programming Objectives * Object-Oriented Programming Language * Object-Oriented Programming Principle * Benefits Of Object-Oriented Programming * Introduction To Java Programming * Resources Used To Create a Java Programming *Structures Of a Java Programming * Result Of Executing The Java Programing Object Oriented Programming Language (OOPL) OOPL Is An Extension Of Procedural Language. Involves Creating Program Components as Object Related To The Real Word. Writing Object-Oriented Programs Involves Creating Object And Application That Uses Those Objects. An Object Contains Both Data Procedures Can be packaged Into a Single Unit. Based On Three Concepts Encapsulation Ability To Bind Data And Procedures Into an Object. Inheritance Ability Of Objects To Acquire The Attributes Or Behavior Of Other Objects Or Classes. Polymorphism Ability of An Object To Take Many Forms Or Identities. Benefits Of Object-Oriented Programming *Reusability -Able To Reuse The Defined Objects. *Adaptability –Able to fit in different environment. *maintainability –Able to change easily. *reliability –Able to operate...

Words: 1445 - Pages: 6

Premium Essay

Object Oriente

...d1.1 Object-oriented programming (OOP) is a programming language model organized around "objects" rather than "actions" and data rather than logic. Historically, a program has been viewed as a logical procedure that takes input data, processes it, and produces output data. Object-oriented programming is a programming paradigm that uses abstraction (in the form of classes and objects) to create models based on the real world environment.   An object-oriented application uses a collection of objects, which communicate by passing messages to request services. Objects are capable of passing messages, receiving messages, and processing data. The aim of object-oriented programming is to try to increase the flexibility and maintainability of programs. Because programs created using an OO language are modular, they can be easier to develop, and are simpler to understand after development. The characteristics of object oriented programming are as follows: 1. Class A class is a blueprint, or prototype, that defines the variables (data) and the methods (operations) common to all objects of a certain kind. 2. Object Objects are the basic run time entities in an object oriented system. They may represent a person, a, place, a bank account, a table of data or any item that the program has to handle. Objects take up space in memory and have an associated address like record in Pascal, or a structure in C. 3. Encapsulation The act of placing data and the operations that performs...

Words: 2483 - Pages: 10

Free Essay

Php for Social Solutions

...Object-Oriented Programming with PHP5 Learn to leverage PHP5's OOP features to write manageable applications with ease Hasin Hayder BIRMINGHAM - MUMBAI Object-Oriented Programming with PHP5 Copyright © 2007 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, Packt Publishing, nor its dealers or distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: December 2007 Production Reference: 1031207 Published by Packt Publishing Ltd. 32 Lincoln Road Olton Birmingham, B27 6PA, UK. ISBN 978-1-847192-56-1 www.packtpub.com Cover Image by Karl Moore (karl.moore@ukonline.co.uk) Credits Author Hasin Hayder Reviewers Kalpesh Barot Murshed Ahmed Khan Proofreader Development Editor Nanda Padmanabhan...

Words: 10232 - Pages: 41

Premium Essay

Comp Intro

...or drop by in my office during office hours. Since there are so many spams around the email system, please make sure that you put your course number in the subject heading (eg. COMP 150 AB2) and send it from your UFV email account. Otherwise, your email may be accidentally filtered/deleted. If I don’t respond in two days, please re-send the email or talk to me directly after class or during my office hours. Course Description This course is an introduction to structured computer programming. Students will study algorithms and top-down design, and will implement algorithms in a procedural programming language. Please refer to http://www.ufv.ca/calendar/CourseOutlines/PDFs/COMP/COMP150-20100423.pdf for further information. NOTE: COMP 150 or 152 (respectively) cannot be taken for further credit. Prerequisite B.C. Principles of Math 11 with a grade of C or better or MATH 085 with a C or better. Competent in computer skills. Course Text & Material Reference: Schaums’ Outline: Programming with C++ John Hubbard McGraw-Hill ISBN: 0-07-135346-1 Text: C++ for Everyone Cay Horstmann Wiley ISBN-13: 978-0-470-92713-7 Note: You may need a flash drive if you want to keep your own copy and transfer files. Other Course Resources Q:\cis\Jon Quah\comp150 It is your responsibility to check the website often as files may be added or updated at any time. Course Objectives/Outcomes On completion of this course, the student will be able to: * design a structured...

Words: 832 - Pages: 4

Premium Essay

Unit 6 Assignment 1 Questions

...Unit 6 Assignment 1: Homework Learning Objectives and Outcomes Name the main events in the development of SQL statements. Run SELECT queries with wild cards, DISTINCT key word, calculations, sorting and aliasing. Run queries with the WHERE clause to filter the result sets. Use the Aggregate functions COUNT, AVG, SUM, MIN, and MAX. Assignment Requirements Answer the true-or-false questions on the next page by filling out the answer sheet. Required Resources Textbook Submission Requirements Submit your completed answer sheet to your instructor at the beginning of Unit 7. Unit 6 True/False Questions Indicate whether the following statements are true or false on the student answer sheet. 1) SQL is the programming language used to manipulate data and data objects in a relational database management system. 2) SQL is a procedural language. 3) A declarative language is a language in which you tell the computer what to do not how. 4) DML, or Data Manipulation Language, contains all the commands for selecting and modifying data. 5) DDL, or Data Definition Language, contains all the commands for selecting and modifying data. 6) The * in SELECT * clause of an SQL statement is a wildcard for returning all columns in a table. 7) The DISTINCT keyword in a SELECT statement returns only unique rows. 8) The FROM keyword is used in a SELECT clause to determine which columns are included in the query. 9) An alias in SQL is a substitute...

Words: 363 - Pages: 2

Free Essay

Programming

...TeamLRN Robert Lafore Teach Yourself Data Structures and Algorithms in 24 Hours 201 West 103rd St., Indianapolis, Indiana, 46290 USA Sams Teach Yourself Data Structures and Algorithms in 24 Hours Copyright © 1999 by Sams Publishing All rights reserved. No part of this book shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without written permission from the publisher. No patent liability is assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained herein. International Standard Book Number: 0-672-31633-1 Library of Congress Catalog Card Number: 98-83221 Printed in the United States of America First Printing: May 1999 01 00 99 4 3 2 1 EXECUTIVE EDITOR Brian Gill DEVELOPMENT EDITOR Jeff Durham MANAGING EDITOR Jodi Jensen PROJECT EDITOR Tonya Simpson COPY EDITOR Mike Henry INDEXER Larry Sweazy PROOFREADERS Mona Brown Jill Mazurczyk TECHNICAL EDITOR Richard Wright Trademarks All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Sams Publishing cannot attest to the accuracy of this information. Use of a term in this...

Words: 10065 - Pages: 41

Premium Essay

Java

...Naresh i Technologies Your tiny steps towards programming Programming Languages Arithmetic oriented Languages Assembly Language Machine Language Problem Oriented Languages Pascal ‘C’ WHY YOU SHOULD ADOPT ‘C’ LANGUAGE:  General Purpose Language.  Structured Programming Language  Flexibility towards Systems Programming.  Flexibility towards Application Programming.  Availability of large number of operators.  Has small instruction set.  Availability of extensive library function enhancing basic function.  Availability for computer of all types.  Program highly portable onto multiple platforms.  PROGRAM STUCTURE IN ‘C’     It is modular programming called function. Out of all function one should be main (). Components of each function Function Heading: Function Name. 1. List of Arguments. 2. List of Argument Declaration. 3. Compound statements. C programming 1 Fortran Naresh i Technologies SIMPLE REQUIREMENTS OF ‘C’ PROGRAM:  Each compound statement should be enclosed in a pair of Braces {}.  Braces can contain one or more elementary statements and other compound statements.  Compound statements can be nested or individual.  Each expression statement must end with a semicolon (;).  Comments should be used and can be used anywhere in the program /*…*/  APPROACHES OF LANGUAGES: *Procedural * logical * Artificial Intelligence * Object oriented. CHARACTERISTICS OF A PROGRAM  Should...

Words: 3176 - Pages: 13

Free Essay

Test

...Teach Yourself C++ in 21 Days, Second Edition Introduction Week 1 at a Glance: Day 1 Getting Started Day 2 The Parts of a C++ Program Day 3 Variables and Constants Day 4 Expressions and Statements Day 5 Functions Day 6 Basic Classes Day 7 More Program Flow Week 1 in Review Week 2 at a Glance: Day 8 Pointers Day 9 References Day 10 Advanced Functions Day 11 Arrays Day 12 Inheritance Day 13 Polymorphism Day 14 Special Classes and Functions Week 2 in Review Week 3 at a Glance: Day 15 Advanced Inheritance Day 16 Streams Day 17 The Preprocessor Day 18 Object-Oriented Analysis and Design Day 19 Templates Day 20 Exceptions and Error Handling Day 21 Whats Next Week 3 in Review Appendixes A Operator Precedence B C++ Keywords C Binary and Hexadecimal D Answers Index Teach Yourself C++ in 21 Days, Second Edition Dedication This book is dedicated to the living memory of David Levine. Acknowledgments A second edition is a second chance to acknowledge and to thank those folks without whose support and help this book literally would have been impossible. First among them are Stacey, Robin, and Rachel Liberty. I must also thank everyone associated with my books, both at Sams and at Wrox press, for being professionals of the highest quality. The editors at Sams did a fantastic job, and I must especially acknowledge and thank Fran Hatton, Mary Ann Abramson, Greg Guntle, and Chris Denny. I have taught an online course based on this book for a couple years, and many folks there...

Words: 4907 - Pages: 20

Free Essay

C Language

...Teach Yourself C++ in 21 Days, Second Edition Introduction Week 1 at a Glance: Day 1 Getting Started Day 2 The Parts of a C++ Program Day 3 Variables and Constants Day 4 Expressions and Statements Day 5 Functions Day 6 Basic Classes Day 7 More Program Flow Week 1 in Review Week 2 at a Glance: Day 8 Pointers Day 9 References Day 10 Advanced Functions Day 11 Arrays Day 12 Inheritance Day 13 Polymorphism Day 14 Special Classes and Functions Week 2 in Review Week 3 at a Glance: Day 15 Advanced Inheritance Day 16 Streams Day 17 The Preprocessor Day 18 Object-Oriented Analysis and Design Day 19 Templates Day 20 Exceptions and Error Handling Day 21 Whats Next Week 3 in Review Appendixes A Operator Precedence B C++ Keywords C Binary and Hexadecimal D Answers Index Teach Yourself C++ in 21 Days, Second Edition Dedication This book is dedicated to the living memory of David Levine. Acknowledgments A second edition is a second chance to acknowledge and to thank those folks without whose support and help this book literally would have been impossible. First among them are Stacey, Robin, and Rachel Liberty. I must also thank everyone associated with my books, both at Sams and at Wrox press, for being professionals of the highest quality. The editors at Sams did a fantastic job, and I must especially acknowledge and thank Fran Hatton, Mary Ann Abramson, Greg Guntle, and Chris Denny. I have taught an online course based on this book for a couple years, and many folks there...

Words: 4907 - Pages: 20

Premium Essay

Sql Lab 4

...MET CS 669 Database Design and Implementation for Business SQL Lab 4 Instructions: Procedural SQL Objective  The objective of this lab is to teach you how to develop and use basic stored  procedures and triggers the procedural language of your chosen DBMS.  Prerequisites  Before attempting this lab, it is best to read the textbook and lecture material  covering the objectives listed above. While this lab shows you how to create and use  these constructs in SQL, the lab does not explain in full the theory behind the  constructs, as does the lecture and textbook.    The second section in this lab builds on Lab 3. It is best to complete Lab 3 first before  completing the second section in this lab.  Required Software  The examples in this lab will execute in modern versions of Oracle and Microsoft SQL  Server as is. Note that the first section in this lab has syntax specific to each DBMS,  and you will need to complete the version for the DBMS you are using. If you are  using a different RDBMS, you may need to modify the SQL for successful execution.  Saving Your Data  If you choose to perform portions of the assignment in different sittings, it is  important to commit your data at the end of each session. This way, you will be sure  to make permanent any data changes you have made in your curent session, so that  you can resume working without issue in your next session. To do so, simply issue  this command:    COMMIT; Data changes in one session will only be visible only in that session...

Words: 6758 - Pages: 28

Premium Essay

Doc, Pdf

...BASIC LINEAR PROGRAMMING 18.0 LEARNING OBJECTIVES After studying this chapter, readers should be able to: Understand the concept and meaning of linear programming; Know the underlying basic assumptions; Formulate the linear programming problem; Solve linear programming problem using graphical and Simplex methods; and make appropriate and correct interpretations; and Understand the concepts of duality and shadow cost in linear programming. 18.1 INTRODUCTION This is an Operations Research technique that is popular and frequently used in industry, business and other areas of human endeavour. The major focus of Linear Programming (L.P) technique, in decisionmaking, is to optimize the use of limited available resources. That is, it is an economic allocation of scarce resources by means of mathematical modeling. The history of Operations Research tells us that George B. Dantzing developed Linear Programming technique during Second World War. His primary aim of developing the technique then was to solve some military logistics problems. But now, it is being used extensively in wide areas of human endeavours. 18.2 CONCEPT AND MEANING OF LINEAR PROGRAMMING. The term “Linear Programming” consists of two words Linear and Programming. The word “Linear” implies linear relationship among the variables in a model while the word “Programming” implies modeling and solving a problem mathematically. By the combination of these two words, it is obvious that the Linear Programming technique...

Words: 8318 - Pages: 34

Premium Essay

Computers

...1. The instructions that tell a computer how to carry out the processing tasks are referred to as computer ......... 1) programs 2) processors 3) input devices 4) memory modules 5) None of these 2. An area of a computer that temporarily holds data waiting to be processed is .......... 1) CPU 2) Memory 3) Storage 4) File 5) None of these 3. To select or unselect one word to the right 1) CTRL + SHIFT 2) CTRL + SHIFT + UP Arrow 3) CTRL + SHIFT + Down Arrow 4) CTRL + SHIFT + Right Arrow 5) None of these 4. To maximize or restore a selected window 1) CTRL + F7 2) CTRL + F10 3) CTRL + F8 4) CTRL + F9 5) None of these 5. To Copy a picture of the selected window to the clipboard 1) ALT + TAB 2) Ctrl + TAB 3) ALT + Print Screen 4) Both (1) and (2) 5) None of these 6. .......... is the key to close a selected drop - down list; cancel a comm-and and close a dialog box. 1) TAB 2) SHIFT 3) ESC 4) F10 5) None of these 7. ......... is the key we use to run the selected command. 1) SHIFT 2) TAB 3) ENTER 4) CTRL 5) None of these 8. ............ is the functional key to display save-as box. 1) F5 2) F6 3) F9 4) F12 5) None of these 9. ............ is the combination of keys to switch between the last four places that you have edited 1) ALT + CTRL + Z 2) ALT + CTRL + Y 3) ALT + TAB + Z 4) ALT + SHIFT + Z 5) None of these 10. ............ is the Keyboard shortcut key to insert auto sum 1) ALT 2) ALT= 3) ALT+ 4) ALT– 5) ALT+CTRL 11. Data becomes ................ when it is presented in a format...

Words: 4753 - Pages: 20

Premium Essay

Cosc 1301 Final

...• Question 1 1 out of 1 points When a Web page author includes meta keywords, like sex, that have little to do with the information on the page, the author is engaging in ____. Answer Selected Answer: d. keyword stuffing Correct Answer: d. keyword stuffing • Question 2 1 out of 1 points ____ is the most frequently used HTTP method. Answer Selected Answer: b. GET Correct Answer: b. GET • Question 3 1 out of 1 points Researchers estimate that the most extensive search engines cover less than 20% of the Web. Answer Selected Answer: True Correct Answer: True • Question 4 1 out of 1 points The ____ wildcard character allows a search engine to find pages with any derivation of a basic word. Answer Selected Answer: c. * Correct Answer: c. * • Question 5 1 out of 1 points HTML ____ are typically used to collect shipping and payment information during checkout at an e-commerce Web site. Answer Selected Answer: d. forms Correct Answer: d. forms • Question 6 1 out of 1 points PayPal is a pioneering example of a(n) ____ payment system. Answer Selected Answer: c. P2P (person-to-person) Correct Answer: c. P2P (person-to-person) • Question 7 1 out of 1 points Which of the following Web-based applications is NOT sometimes characterized as Web 2.0? Answer Selected Answer: d. cloud computing Correct Answer:...

Words: 4931 - Pages: 20

Premium Essay

Computer Literacy

...takes input (data) through input devices process it into CPU, stores it and also displays the result through output devices. A computer is a programmable machine. The two principal characteristics of a computer are; it responds to a specific set of instructions in a well-defined manner and it can execute a prerecorded list of instructions (a program). Modern computers are electronic and digital. CPU The actual machinery; wires, transistors, and circuits are called hardware while the instructions and Data are called software. All the general-purpose computers require the following hardware components: Central processing unit (CPU) The “heart” or “Brain” of the computer, the component that actually executes instructions is known as CPU or Central Processing Unit. Memory It is also known as main memory, primary memory or simply RAM (random access memory). It is volatile type of memory. It enables a computer to store data and programs temporarily. Input devices Devices used to input the data and instructions into the computer system. Usually a keyboard and mouse are used as input devices. Output devices Devices used to display the are known as output devices. A display screen, printer, or speakers and other such type of devices that lets you see what the computer has accomplished. Mass storage devices Such types of devices allow a computer to permanently retain large amounts of data...

Words: 10903 - Pages: 44

Free Essay

Snapshot

...Pomona 3801 West Temple Avenue Pomona, CA 91768 Abstract Integrated Development Environments are excellent production tools for intermediate and advanced programming students and even beginners after they have learned the core concepts (stored data, stored programs, computer instructions, and the anatomy of the computer). Most authors of introduction to programming books recognize this by their inclusion of one to twenty pages on this topic. This paper presents how using a simulated assembler (a tool for learning) with a simple assembly language can introduce the beginning student to the core concepts without having to be concerned with all the exceptions and rigor of a full assembler language. The Simulated Assembler with a full viewable Computer Machine (Glass Bottom Computer) and the easy procedures for using it in a first programming course are illustrated. Using the assembler tool described here should provide an increase in learning via a polytechnic (learn by doing) approach. A comparative analysis of using the assembler in an introduction to object programming course is provided. Keywords: assembler, simple machine, software tools, language, programming, object oriented, machine language 1. INTRODUCTION The growth in hardware technology has allowed the theories of modern programming languages to become a reality. In the beginning, developers of computer languages were hindered by the lack of processing speed and memory to implement their vision...

Words: 3467 - Pages: 14