PROGRAMMING METHODOLOGY STYLISTIC GUI DELINES Meaningful Names for Identifiers. Guidelines followed while dealing with identifiers. 1. Assign meaningful.

Slides:



Advertisements
Similar presentations
P5, M1, D1.
Advertisements

Chapter 2: Modularization
Documentation 1 Comprehending the present – Investing in the future.
Slides prepared by Rose Williams, Binghamton University Chapter 1 Getting Started 1.1 Introduction to Java.
Chapter3: Language Translation issues
Outline Java program structure Basic program elements
CS 201 Functions Debzani Deb.
Chapter 1 Principles of Programming and Software Engineering.
Understanding the Mainline Logical Flow Through a Program (continued)
COBOL for the 21 st Century Stern, Stern, Ley Chapter 1 INTRODUCTION TO STRUCTURED PROGRAM DESIGN IN COBOL.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
BPC.1 Basic Programming Concepts
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Java Software Solutions Foundations of Program Design Sixth Edition by Lewis.
By: Mr. Baha Hanene Chapter 3. Learning Outcomes We will cover the learning outcome 02 in this chapter i.e. Use basic data-types and input / output in.
Structured COBOL Programming, Stern & Stern, 9th edition
1 Shawlands Academy Higher Computing Software Development Unit.
CHAPTER:14 Programming Methodology Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
UNIT 3 TEMPLATE AND EXCEPTION HANDLING. Introduction  Program errors are also referred to as program bugs.  A C program may have one or more of four.
Comp 245 Data Structures Software Engineering. What is Software Engineering? Most students obtain the problem and immediately start coding the solution.
Financial Statement Modeling & Spreadsheet Engineering “Training in spreadsheet modeling improves both the efficiency and effectiveness with which analysts.
สาขาวิชาเทคโนโลยี สารสนเทศ คณะเทคโนโลยีสารสนเทศ และการสื่อสาร.
Design-Making Projects Work (Chapter7) n Large Projects u Design often distinct from analysis or coding u Project takes weeks, months or years to create.
Programming. What is a Program ? Sets of instructions that get the computer to do something Instructions are translated, eventually, to machine language.
1 Computing Software. Programming Style Programs that are not documented internally, while they may do what is requested, can be difficult to understand.
ICAPRG301A Week 4Buggy Programming ICAPRG301A Apply introductory programming techniques Program Bugs US Navy Admiral Grace Hopper is often credited with.
INTRODUCTION TO ALGORITHMS PROGRAMMING. Objectives Give a definition of the term algorithm Describe the various parts of the pseudocode algorithm or algorithm.
Programming Lifecycle
1 The Software Development Process  Systems analysis  Systems design  Implementation  Testing  Documentation  Evaluation  Maintenance.
The Java Programming Language
Creating your first C++ program
The Software Development Life Cycle. Software Development SDLC The Software Development Life-Cycle Sometimes called the program development lifecycle.
School of Computer Science & Information Technology G6DICP - Lecture 9 Software Development Techniques.
CHAPTER:11 Programming Guidelines in JAVA Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
SE: CHAPTER 7 Writing The Program
© 2011 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Stewart Venit ~ Elizabeth Drake Developing a Program.
Software Development Process.  You should already know that any computer system is made up of hardware and software.  The term hardware is fairly easy.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Problem Solving Techniques. Compiler n Is a computer program whose purpose is to take a description of a desired program coded in a programming language.
Lecture 1 Introduction Figures from Lewis, “C# Software Solutions”, Addison Wesley Richard Gesick.
I Power Higher Computing Software Development The Software Development Process.
ADTs and C++ Classes Classes and Members Constructors The header file and the implementation file Classes and Parameters Operator Overloading.
C++ Basics C++ is a high-level, general purpose, object-oriented programming language.
1 Ch. 1: Software Development (Read) 5 Phases of Software Life Cycle: Problem Analysis and Specification Design Implementation (Coding) Testing, Execution.
The Software Development Process
PROGRAM DEVELOPMENT CYCLE. Problem Statement: Problem Statement help diagnose the situation so that your focus is on the problem, helpful tools at this.
Software Development Problem Analysis and Specification Design Implementation (Coding) Testing, Execution and Debugging Maintenance.
Chapter 3 Top-Down Design with Functions Part II J. H. Wang ( 王正豪 ), Ph. D. Assistant Professor Dept. Computer Science and Information Engineering National.
PROGRAMMING GUIDELINES. SYLISTIC GUIDELINES  Meaningful names for identifiers Identifiers identify different parts of C++ programs. Identifiers should.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Intermediate 2 Computing Unit 2 - Software Development.
The Hashemite University Computer Engineering Department
The single most important skill for a computer programmer is problem solving Problem solving means the ability to formulate problems, think creatively.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
Controlling Program Flow with Decision Structures.
GCSE ICT 3 rd Edition The system life cycle 18 The system life cycle is a series of stages that are worked through during the development of a new information.
Variables in C Topics  Naming Variables  Declaring Variables  Using Variables  The Assignment Statement Reading  Sections
CMSC 104, Version 8/061L09VariablesInC.ppt Variables in C Topics Naming Variables Declaring Variables Using Variables The Assignment Statement Reading.
Chapter 2: Input, Processing, and Output Starting Out with Programming Logic & Design by Tony Gaddis (with instructor modifications) 1-1.
Chapter 1 The Phases of Software Development. Software Development Phases ● Specification of the task ● Design of a solution ● Implementation of solution.
Principles of Programming. Achieving an Object-Oriented Design  Abstraction and Information Hiding  Object-Oriented Design  Functional Decomposition.
Intro. to Computer Programming Eng. Nehal A. Mohamed Spring Semester-2016.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Lecture 1 Introduction Richard Gesick.
Lecture 2 Introduction to Programming
Programming Problem steps must be able to be fully & unambiguously described Problem types; Can be clearly described Cannot be clearly described (e.g.
Designing and Debugging Batch and Interactive COBOL Programs
PROGRAMMING METHODOLOGY
Documentation for Developers
Unit 6 Assignment 2 Chris Boardley.
CHAPTER 6 Testing and Debugging.
Presentation transcript:

PROGRAMMING METHODOLOGY STYLISTIC GUI DELINES Meaningful Names for Identifiers. Guidelines followed while dealing with identifiers. 1. Assign meaningful names for all identifiers viz. Variables, function and procedures, etc. 2. Do not use similar looking names e.g., manage, manager. 3. Always assign names to scalar constants when it helps in clarity and readability

Ensure clarity of expressions Guidelines followed while dealing with clarity of expressions. 1. Avoid programming tricks whose intent will not be obvious to a reader. 2. Never sacrifice clarity of expressions even if changed (but unclear) expressions may get you minor gain in machine execution time. 3. Use standard functions in expressions to enhance readability

Use comments and Indentation 1. Always insert prologues: - the comment in the beginning of a program. 2. Insert explanatory comments whenever applicable since they explain the role and purpose of other identifiers and statements. 3. Use comments to help identify {...} pairs greatly and enhance program understanding 4. Always indent statements to highlight nesting of groups of control statements. Insert Blank Lines and Blank Spaces-The blank lines are inserted to separate declaration blocks, comment boxes, procedures and functions etc. Normally, blank lines are inserted to separate declaration block, comment boxes, procedures and function etc. Normally, blank lines are inserted before label, const, type, ver. declarations.

Statement formatting style - c++ is one of those languages which provides use of free formating style program to print odd number from 100 to1 with statement in free formatting style #include int main() {for (int i=99;i>0;i--) if(i%2) cout<<i<<' '; return 0 ; } Defination -- when programming formatting is done to make a program more redable,it is called prettyprinting. Program to print odd no from 100 to 1 #include int main() { for(int i=99;i>0;i--) cout<<i<<' '; return 0 ; }

characteristics of a good program 1) Effective and efficient - the program produces correct result and it is faster 2) User friendly – the program should be user friendly the user should not concerned about what is happening inside program 3) Self documenting code – a good programmer self – documenting code 4) Reliable -- the program should reliable i.e., it must be handle unexpected situation like wrong data or no data the programmer should display proper error message 5) Portable – the program should be portable i.e, it should be run on different platform

Stages of program development process 1) Crack the problem – in the first stage the program is cracked and an algorithm is formulated which gives the solution for the problem 2) code the algorithm – in this stage the program is translated into program using some programming language 3) Compile the program – after feeding the program next stage is to compile it 4) Execute the program – after compilation f an error free program, the program is executed ROBUSTNESS – The ability of a program, to recover following an error and to continue operating within its environment, is called robustness. The code which can handle exception data error and operational error is called guard code.

TYPE OF ERRORS Compile-time errors  Syntax error occur when rules of a programming language are misused i.e., when a grammatical rule of C++ is violated. Syntax refers to formal rules governing the construction of valid statements in a language.  Semantics error occurs when statements are not meaningful. Semantics refers to the set of rules which give the meaning of a statement.  Run-Time errors Errors that occur during the execution of a program are run-time errors. Logical Errors Something, even if you don’t encounter any error during compile-time and run-time, your program does not provide the correct result. This is because of the programmer’s mistaken analysis of the problem he or she is trying to solve. Such errors are logical errors.

DOCUMENTATION Documentation refers to written descriptions, specification, design, code and comment, internal to a program, which make a program more understandable, readable and more easily modifiable. MODULES OF DOCUMENTATION Modules make information easily accessible to the specific user for which they were prepared, and they reduce the costs of production and maintenance. The documentation modules are generally to as manuals. The aggregation of modules and their detail would depend upon:  Complexity of system  Technical sophistication of user  People involved in development and use  Expected life of documentation

USER DOCUMENTATION There are many types of user: the manager who supervises the operation of a computer application or receives its printed reports; the manager or end user who may directly use an application through a computer terminal; a clerk who prepares input for a computer and may even use its output. A user documentation (or manual) should provide the following information General descriptions Output specifications Run flow and description File disposal Logic flow Error messages Program testing's Special run instructions File descriptions (if any) Security considerations Record layouts Restart and Recovery procedures

General Description Run flow The program will prompt the user for inputting three numbers by flashing following message: Enter three numbers The user is supposed to enter three numbers in front of the message: Output Specifications The program gives the biggest of the three numbers by flashing the following message: The biggest of the three numbers is 9

Error Messages The program may display following errors shown in two categories: Category 1 Syntax errors Unknown identifier “;” Expected Mixed-up ifs and else's Category 2 Run-time errors Incompatible values Special Run Instructions To run this program, (1)Change to directory BC by typing following command: C > CD BC (2) Type the following command to open the program C > BC Max (3) Press ctrl + F9 to run the program.

Security Conditions Please do not work on the program on Sundays and other holidays. Restart and Recovery Procedure If an error of category 1 is flashing, please contact your programmer. If error of category 2 is displayed then restart the program and type numeric values between range 1.0E-38 to 1.0E+38.

Programmer’s Documentation (technical documentation) The technical documentation must always be provided so as to ensure smooth, easy and right maintenance for the systems. The technical documentation is of two types: 1.External documentation 2.Internal documentation The external documentation of a program consists of the written information that is outside the body of the source code. In addition to the detailed specifications the external documentation may include the history of the program’s development and subsequent modification, the top-down design,” diagram of the program’s structures, and user’s manuals. The internal documentation includes comments, self documenting code and program formatting (prettyprinting). The goal of all these features is to make the program readable, understandable, and easily modifiable. Self documenting code is the source code that uses meaningful names for constants, variables, and subprogram identifier to clarify their meaning in the program. Prettyprinting refers to program formatting to make a program more readable.

Uses of Documentation 1.Facilitates communication about an application between the technical development personal and non-technical users. 2.Useful for technical personnel not only during development, but also during operation and normal maintenance. 3.Essential during abnormal or urgent maintenance. 4.Very helpful in initiating and training. 5.Enables trouble shooting when the application system break down. 6.Helps corporate management understand the system sufficiently to make decisions and to appreciate its financial and resource implications. 7.Essential for both internal and external control. 8.Ensures that all commitments and expectations are on record. 9.Provides a package that will contain the information needed to change the system in case environment or management’s needs alter. 10.Prevents system dislocation and cost that might otherwise occur if knowledge of the system were centered in a few individuals who resigned, relocated, or were subsequently reassigned other duties.

PROGRAM MAINTENANCE Program maintenance refers to the modification of a program, after it has been completed, in order to meet changing requirement or to take care of error that show up. There could be four kinds of maintenance: Corrective Maintenance. When a program after completion, is put to operations, some error might show up because of some unexpected situation, untested areas. Such error are fixed up and this type of maintenance, which is done to correct the errors Adaptive Maintenance. Changes in the environment in which an information system operates may also lead to systems maintenance. Preventive Maintenance. If possible error could be anticipated before they actually occur, the maintenance could be done to avoid them and the system down time can be saved. Perfective Maintenance. In this rapidly changing world, information technology is the fastest growing area. In information technology world, no technology has proved permanent.