ECE 341 Coding Standard

Size: px
Start display at page:

Download "ECE 341 Coding Standard"

Transcription

1 Page1 ECE 341 Coding Standard Professor Richard Wall University of Idaho Moscow, ID August 27, Motivation for Coding Standards The purpose of implementing a coding standard is to generate compute programs that are easily comprehendible and reduce the chances for errors through consistency and expectancy. Quality code is written for readability by other humans, not computers. Quality computer code is never cleaver or obscure. The complexity of a computer program should only be to the degree as required to implement the design functionality and performance. All software submitted for assignments for ECE 443 will conform to the following format. 2. General Rules 1 We will follow the ANSI C standards unless not supported by the Microchip MPLAB environment or the Microchip C32 compiler. a. Comments Comments can add immensely to the readability of a program, but used heavily or poorly placed they can render good code completely incomprehensible. It is far better to err on the side of too few comments rather than too many - at least then people can find the code! Also, if your code needs a comment to be understood, then you should look for ways to rewrite the code to be clearer. And comments that aren't there won't get out of date. (An inaccurate or misleading comment hurts more than a good comment helps! Be sure that your comments stay right.) That being said, good places to put comments are: a broad overview at the beginning of a module data structure definitions global variable definition at the beginning of a function tricky steps within a function b. Source File Organization includes of system headers includes of local headers type and constant definitions global variables 1

2 Page2 static function prototypes functions c. Naming Conventions Names should be meaningful in the application domain, not the implementation domain. This makes your code clearer to a reader who is familiar with the problem you're trying to solve, but is not familiar with your particular way of solving it. Also, you may want the implementation to change some day. Note that well-structured code is layered internally, so your implementation domain is also the application domain for lower levels. Names should be chosen to make sense when your program is read. Thus, all names should be parts of speech which will make sense when used with the language's syntactic keywords. Variables should be noun clauses. Longer names contain more information than short names, but extract a price in readability The letters in named constants should all be in upper case. For example #define MAX_LOOP_COUNT 100. Seeing a named value if all upper case letters indicates that this value can never be on the left side of an assignment statement. The letters in named variables can be all lower case or a mix of upper and lower case if doing so aids in comprehending the code. For example, int dog, cat, rabbit; or int MyPets;. Under score marks can also be used to make both named constant and variables more readable. Boolean variables should be named for the meaning of their "true" value. For example if(error), the variable error indicates that something is incorrect. Procedures (functions called for their side-effects) should be named for what they do, not how they do it. Function names should reflect what they return, and Boolean-valued functions of an object should be named for the property their true value implies about the object. Functions are used in expressions, often in things like if's, so they need to read appropriately. d. Functions Functions should be short and sweet. If a function won't fit on a single screen, it's probably too long. Don't be afraid to break functions down into smaller helper functions. If they are static to the module an optimizing compiler can inline them again, if necessary. Helper functions can also be reused by other functions. However, sometimes it is hard to break things down. Since functions don't nest, variables have to be communicated through function arguments or global variables. Don't create huge interfaces to enable a decomposition that is just not meant to be. e. Indentation and Layout The MPLAB editor implements a tab as equivalent to 4 space characters. When copying code from one text editor environment to another, be certain the tab settings are consistent. Henry Spencer's Ten Commandments for C Programmers says:

3 Page3 Thou shalt make thy program's purpose and structure clear to thy fellow man by using the One Brace Style, even if thou likest it not, for thy creativity is better used in solving problems than in creating beautiful new impediments to understanding.- The Eighth Commandment 2 The style that we will use in ECE 340 / ECE 341 is: Return_Type Function_Name(argument_list) { int x; // scalar declarations WORD y=100; // Initialization at declaration allowed char *p; // pointer declaration float data[10]; // array declaration } x = 17; /* code */ f. Expressions, Statements and Assignments In the programming language C, assignments are expressions, not statements. C allows multiple assignments such as a = b = c = 0;. Also, C allows assignments within an expression such as the expression, for(i=0; i<max, i++). This expression has one assignment, i=0;, and two operators, i<max and i All expression will execute a single purpose. Compound expressions are forbidden except in the sense of common usage. Permitted compound instructions: for(i=0; i<max, i++) while((a<b) && (c<7)) Forbidden compound instructions: a = b*7 +16, c = 0; 2. Precedence of operation: When in doubt encapsulate with parenthesis! 3. ECE 443 Course Program Format a. Program Header i. File name ii. Author, date iii. Description of purpose iv. Example: /* ************************************************************* * File Name: Example_1.c * Author: Richard W. Wall * Date: September 2, 2011 * Revised: August 27, 2013 * This program is designed to allow you to explore the software 2

4 Page4 * instrumentation and debugging tools available with the MPLAB * Integrated Development Environment (IDE). This program is written * using the style expected for all programs submitted for ECE 443 * Examples for passing data by value and by reference between * two functions are provided. ***************************************************************** */ b. Include files i. System header files are bracketed between < >. ii. Local project header files are written between " ". iii. Example: #include <plib.h> // Microchip MX32 processor definitions #include <math.h> // Compiler transcendental math functions #include <stdlib.h> // Standard library #include "CerebotMX7cK.h" // Processor configuration definitions #include "example_1.h" // Contains definitions and function prototypes c. System Definitions i. Defined constant names are to be written in using upper case only. ii. Example: #define INT_SIZE 4 d. Global variable i. Variable names are to use lower case. ii. Only variables that are required to pass data to or from interrupt service routines are permitted to be declared global. iii. Special function register registers are declared global by the system. iv. Example: const int int_size = 4; float Xavg; int Xmax; int B_array[MAX_ARRAY] = {0}; e. Functions prototypes i. All function prototypes are declared in a project header file ii. Example: /* ************************************************************** * File name: example_1.h * * Author: Richard W. Wall * Date: September 2, 2011 * Revised: August 27, 2013 * * This contains configuration for programming and operation with

5 Page5 * the MX7cK as well as defines and function prototypes **************************************************************** */ /* Example_1 definitions */ #ifndef EXAMPLE_1_H #define EXAMPLE_1_H #define ARRAY_MAX (int) 256 #define MAX_ARRAY 10 #endif /* Function prototypes */ void statistics(int n, int *, float *avg, float *mean, int *max, int *min); float arithmetric_mean(int n, int *array); float geometric_mean(int n, int *array); int minimum(int n, int *array); int maximum(int n, int *array); void function_run_counter(void); void random_array(int n, int *array); /* End of example_1.h */ Note: The indentation rules for #if / #endif constructs follow the same rules as for open and close braces. f. Function declarations i. All functions (except possibly main) must have a description block using this following format: /* statistics FUNCTION DESCRIPTION *********************************** * SYNTAX: void statistics(int n, int *array, float *avg, float *mean, int *max, int *min); * KEYWORDS: statistics, mean, average, minimum, maximum * PARAMETER1: int - The input array size * PARAMETER2: int pointer -Address of integer array of data on which * the statistics will be computed. * * PARAMETER3: float - Address of the statistical average * PARAMETER4: float - Address of the point statistical geometric mean * PARAMETER5: int - Maximum element value in the array * PARAMETER6: int - Minimum element value in the array * DESCRIPTION: Computes the statistical parameters for the data array. * RETURN VALUE: None. * NOTES: None * END DESCRIPTION ****************************************************/ g. Function instantiation i. Comments for individual lines of code are on an as needed basis ii. All opening and closing braces must be on their own line and in the same columns

6 Page6 iii. All statements following an opening brace must be indented one tab space as per this example: void statistics(int n, int *array, float *xavg, float *xmean, int *xmax, int *xmin) { function_run_counter(); // Count function executed 1 *xavg = arithmetric_mean(n, array); function_run_counter(); // Count function executed 2 *xmean = geometric_mean(n, array); function_run_counter(); // Count function executed 3 *xmin = minimum(n, array); function_run_counter(); // Count function executed 4 *xmax = maximum(n, array); function_run_counter(); // Count function executed 5 } /* End of statistics */ h. Function termination: The program line containing the last brace in a function will contain the comment: /* End of Function_Name */ i. Program termination: The last line of a program file will contain the line: /* End of File_Name.c */ j. Comments: i. Block Comments: /***************************************************************** * text * text * text *****************************************************************/ ii. Line comments: 1. // text 2. /* text */

Moving from CS 61A Scheme to CS 61B Java

Moving from CS 61A Scheme to CS 61B Java Moving from CS 61A Scheme to CS 61B Java Introduction Java is an object-oriented language. This document describes some of the differences between object-oriented programming in Scheme (which we hope you

More information

Install Java Development Kit (JDK) 1.8 http://www.oracle.com/technetwork/java/javase/downloads/index.html

Install Java Development Kit (JDK) 1.8 http://www.oracle.com/technetwork/java/javase/downloads/index.html CS 259: Data Structures with Java Hello World with the IntelliJ IDE Instructor: Joel Castellanos e-mail: joel.unm.edu Web: http://cs.unm.edu/~joel/ Office: Farris Engineering Center 319 8/19/2015 Install

More information

Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C

Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C Embedded Systems A Review of ANSI C and Considerations for Embedded C Programming Dr. Jeff Jackson Lecture 2-1 Review of ANSI C Topics Basic features of C C fundamentals Basic data types Expressions Selection

More information

Chapter 13 Storage classes

Chapter 13 Storage classes Chapter 13 Storage classes 1. Storage classes 2. Storage Class auto 3. Storage Class extern 4. Storage Class static 5. Storage Class register 6. Global and Local Variables 7. Nested Blocks with the Same

More information

Coding Rules. Encoding the type of a function into the name (so-called Hungarian notation) is forbidden - it only confuses the programmer.

Coding Rules. Encoding the type of a function into the name (so-called Hungarian notation) is forbidden - it only confuses the programmer. Coding Rules Section A: Linux kernel style based coding for C programs Coding style for C is based on Linux Kernel coding style. The following excerpts in this section are mostly taken as is from articles

More information

Some Scanner Class Methods

Some Scanner Class Methods Keyboard Input Scanner, Documentation, Style Java 5.0 has reasonable facilities for handling keyboard input. These facilities are provided by the Scanner class in the java.util package. A package is a

More information

An Incomplete C++ Primer. University of Wyoming MA 5310

An Incomplete C++ Primer. University of Wyoming MA 5310 An Incomplete C++ Primer University of Wyoming MA 5310 Professor Craig C. Douglas http://www.mgnet.org/~douglas/classes/na-sc/notes/c++primer.pdf C++ is a legacy programming language, as is other languages

More information

Top 10 Bug-Killing Coding Standard Rules

Top 10 Bug-Killing Coding Standard Rules Top 10 Bug-Killing Coding Standard Rules Michael Barr & Dan Smith Webinar: June 3, 2014 MICHAEL BARR, CTO Electrical Engineer (BSEE/MSEE) Experienced Embedded Software Developer Consultant & Trainer (1999-present)

More information

FEEG6002 - Applied Programming 5 - Tutorial Session

FEEG6002 - Applied Programming 5 - Tutorial Session FEEG6002 - Applied Programming 5 - Tutorial Session Sam Sinayoko 2015-10-30 1 / 38 Outline Objectives Two common bugs General comments on style String formatting Questions? Summary 2 / 38 Objectives Revise

More information

Module 10. Coding and Testing. Version 2 CSE IIT, Kharagpur

Module 10. Coding and Testing. Version 2 CSE IIT, Kharagpur Module 10 Coding and Testing Lesson 23 Code Review Specific Instructional Objectives At the end of this lesson the student would be able to: Identify the necessity of coding standards. Differentiate between

More information

General Software Development Standards and Guidelines Version 3.5

General Software Development Standards and Guidelines Version 3.5 NATIONAL WEATHER SERVICE OFFICE of HYDROLOGIC DEVELOPMENT Science Infusion Software Engineering Process Group (SISEPG) General Software Development Standards and Guidelines 7/30/2007 Revision History Date

More information

Topics. Parts of a Java Program. Topics (2) CS 146. Introduction To Computers And Java Chapter Objectives To understand:

Topics. Parts of a Java Program. Topics (2) CS 146. Introduction To Computers And Java Chapter Objectives To understand: Introduction to Programming and Algorithms Module 2 CS 146 Sam Houston State University Dr. Tim McGuire Introduction To Computers And Java Chapter Objectives To understand: the meaning and placement of

More information

Computer Programming I & II*

Computer Programming I & II* Computer Programming I & II* Career Cluster Information Technology Course Code 10152 Prerequisite(s) Computer Applications, Introduction to Information Technology Careers (recommended), Computer Hardware

More information

The C Programming Language course syllabus associate level

The C Programming Language course syllabus associate level TECHNOLOGIES The C Programming Language course syllabus associate level Course description The course fully covers the basics of programming in the C programming language and demonstrates fundamental programming

More information

Coding conventions and C++-style

Coding conventions and C++-style Chapter 1 Coding conventions and C++-style This document provides an overview of the general coding conventions that are used throughout oomph-lib. Knowledge of these conventions will greatly facilitate

More information

How To Port A Program To Dynamic C (C) (C-Based) (Program) (For A Non Portable Program) (Un Portable) (Permanent) (Non Portable) C-Based (Programs) (Powerpoint)

How To Port A Program To Dynamic C (C) (C-Based) (Program) (For A Non Portable Program) (Un Portable) (Permanent) (Non Portable) C-Based (Programs) (Powerpoint) TN203 Porting a Program to Dynamic C Introduction Dynamic C has a number of improvements and differences compared to many other C compiler systems. This application note gives instructions and suggestions

More information

PRI-(BASIC2) Preliminary Reference Information Mod date 3. Jun. 2015

PRI-(BASIC2) Preliminary Reference Information Mod date 3. Jun. 2015 PRI-(BASIC2) Table of content Introduction...2 New Comment...2 Long variable...2 Function definition...3 Function declaration...3 Function return value...3 Keyword return inside functions...4 Function

More information

MPLAB TM C30 Managed PSV Pointers. Beta support included with MPLAB C30 V3.00

MPLAB TM C30 Managed PSV Pointers. Beta support included with MPLAB C30 V3.00 MPLAB TM C30 Managed PSV Pointers Beta support included with MPLAB C30 V3.00 Contents 1 Overview 2 1.1 Why Beta?.............................. 2 1.2 Other Sources of Reference..................... 2 2

More information

Chapter 1 Java Program Design and Development

Chapter 1 Java Program Design and Development presentation slides for JAVA, JAVA, JAVA Object-Oriented Problem Solving Third Edition Ralph Morelli Ralph Walde Trinity College Hartford, CT published by Prentice Hall Java, Java, Java Object Oriented

More information

C Coding Style Guide. Technotes, HowTo Series. 1 About the C# Coding Style Guide. 2 File Organization. Version 0.3. Contents

C Coding Style Guide. Technotes, HowTo Series. 1 About the C# Coding Style Guide. 2 File Organization. Version 0.3. Contents Technotes, HowTo Series C Coding Style Guide Version 0.3 by Mike Krüger, mike@icsharpcode.net Contents 1 About the C# Coding Style Guide. 1 2 File Organization 1 3 Indentation 2 4 Comments. 3 5 Declarations.

More information

CSE 308. Coding Conventions. Reference

CSE 308. Coding Conventions. Reference CSE 308 Coding Conventions Reference Java Coding Conventions googlestyleguide.googlecode.com/svn/trunk/javaguide.html Java Naming Conventions www.ibm.com/developerworks/library/ws-tipnamingconv.html 2

More information

Computer Programming I

Computer Programming I Computer Programming I Levels: 10-12 Units of Credit: 1.0 CIP Code: 11.0201 Core Code: 35-02-00-00-030 Prerequisites: Secondary Math I, Keyboarding Proficiency, Computer Literacy requirement (e.g. Exploring

More information

Taxi Service Coding Policy. Version 1.2

Taxi Service Coding Policy. Version 1.2 Taxi Service Coding Policy Version 1.2 Revision History Date Version Description Author 2012-10-31 1.0 Initial version Karlo Zanki 2012-11-18 1.1 Added a section relative to Java/Android Fabio Kruger 2013-01-02

More information

Software Development (CS2500)

Software Development (CS2500) (CS2500) Lecture 15: JavaDoc and November 6, 2009 Outline Today we study: The documentation mechanism. Some important Java coding conventions. From now on you should use and make your code comply to the

More information

PROBLEM SOLVING SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON

PROBLEM SOLVING SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON PROBLEM SOLVING WITH SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON Addison Wesley Boston San Francisco New York London

More information

VB.NET Programming Fundamentals

VB.NET Programming Fundamentals Chapter 3 Objectives Programming Fundamentals In this chapter, you will: Learn about the programming language Write a module definition Use variables and data types Compute with Write decision-making statements

More information

National Database System (NDS-32) Macro Programming Standards For Microsoft Word Annex - 8

National Database System (NDS-32) Macro Programming Standards For Microsoft Word Annex - 8 National Database System () Macro Programming Standards For Microsoft Word Annex - 8 02/28/2000 /10:23 AM ver.1.0.0 Doc. Id: RNMSWS softcopy : word page : 1/6 Objectives A well-defined system needs to

More information

Course Title: Software Development

Course Title: Software Development Course Title: Software Development Unit: Customer Service Content Standard(s) and Depth of 1. Analyze customer software needs and system requirements to design an information technology-based project plan.

More information

AppendixA1A1. Java Language Coding Guidelines. A1.1 Introduction

AppendixA1A1. Java Language Coding Guidelines. A1.1 Introduction AppendixA1A1 Java Language Coding Guidelines A1.1 Introduction This coding style guide is a simplified version of one that has been used with good success both in industrial practice and for college courses.

More information

Variable Base Interface

Variable Base Interface Chapter 6 Variable Base Interface 6.1 Introduction Finite element codes has been changed a lot during the evolution of the Finite Element Method, In its early times, finite element applications were developed

More information

Java Program Coding Standards 4002-217-9 Programming for Information Technology

Java Program Coding Standards 4002-217-9 Programming for Information Technology Java Program Coding Standards 4002-217-9 Programming for Information Technology Coding Standards: You are expected to follow the standards listed in this document when producing code for this class. Whether

More information

CS 241 Data Organization Coding Standards

CS 241 Data Organization Coding Standards CS 241 Data Organization Coding Standards Brooke Chenoweth University of New Mexico Spring 2016 CS-241 Coding Standards All projects and labs must follow the great and hallowed CS-241 coding standards.

More information

El Dorado Union High School District Educational Services

El Dorado Union High School District Educational Services El Dorado Union High School District Course of Study Information Page Course Title: ACE Computer Programming II (#495) Rationale: A continuum of courses, including advanced classes in technology is needed.

More information

Example of a Java program

Example of a Java program Example of a Java program class SomeNumbers static int square (int x) return x*x; public static void main (String[] args) int n=20; if (args.length > 0) // change default n = Integer.parseInt(args[0]);

More information

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program. Name: Class: Date: Exam #1 - Prep True/False Indicate whether the statement is true or false. 1. Programming is the process of writing a computer program in a language that the computer can respond to

More information

Storage Classes CS 110B - Rule Storage Classes Page 18-1 \handouts\storclas

Storage Classes CS 110B - Rule Storage Classes Page 18-1 \handouts\storclas CS 110B - Rule Storage Classes Page 18-1 Attributes are distinctive features of a variable. Data type, int or double for example, is an attribute. Storage class is another attribute. There are four storage

More information

MPLAB Harmony System Service Libraries Help

MPLAB Harmony System Service Libraries Help MPLAB Harmony System Service Libraries Help MPLAB Harmony Integrated Software Framework v1.08 All rights reserved. This section provides descriptions of the System Service libraries that are available

More information

#820 Computer Programming 1A

#820 Computer Programming 1A Computer Programming I Levels: 10-12 Units of Credit: 1.0 CIP Code: 11.0201 Core Code: 35-02-00-00-030 Prerequisites: Secondary Math I, Keyboarding Proficiency, Computer Literacy requirement Semester 1

More information

VIRTUAL LABORATORY: MULTI-STYLE CODE EDITOR

VIRTUAL LABORATORY: MULTI-STYLE CODE EDITOR VIRTUAL LABORATORY: MULTI-STYLE CODE EDITOR Andrey V.Lyamin, State University of IT, Mechanics and Optics St. Petersburg, Russia Oleg E.Vashenkov, State University of IT, Mechanics and Optics, St.Petersburg,

More information

Java Crash Course Part I

Java Crash Course Part I Java Crash Course Part I School of Business and Economics Institute of Information Systems HU-Berlin WS 2005 Sebastian Kolbe skolbe@wiwi.hu-berlin.de Overview (Short) introduction to the environment Linux

More information

Java Classes. GEEN163 Introduction to Computer Programming

Java Classes. GEEN163 Introduction to Computer Programming Java Classes GEEN163 Introduction to Computer Programming Never interrupt someone doing what you said couldn't be done. Amelia Earhart Classes, Objects, & Methods Object-oriented programming uses classes,

More information

Introduction to Java Applications. 2005 Pearson Education, Inc. All rights reserved.

Introduction to Java Applications. 2005 Pearson Education, Inc. All rights reserved. 1 2 Introduction to Java Applications 2.2 First Program in Java: Printing a Line of Text 2 Application Executes when you use the java command to launch the Java Virtual Machine (JVM) Sample program Displays

More information

Embedded Software Development with MPS

Embedded Software Development with MPS Embedded Software Development with MPS Markus Voelter independent/itemis The Limitations of C and Modeling Tools Embedded software is usually implemented in C. The language is relatively close to the hardware,

More information

Oracle SQL. Course Summary. Duration. Objectives

Oracle SQL. Course Summary. Duration. Objectives Oracle SQL Course Summary Identify the major structural components of the Oracle Database 11g Create reports of aggregated data Write SELECT statements that include queries Retrieve row and column data

More information

Keil C51 Cross Compiler

Keil C51 Cross Compiler Keil C51 Cross Compiler ANSI C Compiler Generates fast compact code for the 8051 and it s derivatives Advantages of C over Assembler Do not need to know the microcontroller instruction set Register allocation

More information

1 Using CWEB with Microsoft Visual C++ CWEB INTRODUCTION 1

1 Using CWEB with Microsoft Visual C++ CWEB INTRODUCTION 1 1 Using CWEB with Microsoft Visual C++ CWEB INTRODUCTION 1 1. CWEB Introduction. The literate programming technique is described by Donald Knuth in Literate Programming and The CWEB System for Structured

More information

NEON. Support in Compilation Tools. Development Article. Copyright 2009 ARM Limited. All rights reserved. DHT 0004A (ID081609)

NEON. Support in Compilation Tools. Development Article. Copyright 2009 ARM Limited. All rights reserved. DHT 0004A (ID081609) NEON Support in Compilation Tools Development Article Copyright 2009 ARM Limited. All rights reserved. DHT 0004A () NEON Support in Compilation Tools Development Article Copyright 2009 ARM Limited. All

More information

13 Classes & Objects with Constructors/Destructors

13 Classes & Objects with Constructors/Destructors 13 Classes & Objects with Constructors/Destructors 13.1 Introduction In object oriented programming, the emphasis is on data rather than function. Class is a way that binds the data & function together.

More information

CSE 1223: Introduction to Computer Programming in Java Chapter 2 Java Fundamentals

CSE 1223: Introduction to Computer Programming in Java Chapter 2 Java Fundamentals CSE 1223: Introduction to Computer Programming in Java Chapter 2 Java Fundamentals 1 Recall From Last Time: Java Program import java.util.scanner; public class EggBasket { public static void main(string[]

More information

El Dorado Union High School District Educational Services

El Dorado Union High School District Educational Services El Dorado Union High School District Course of Study Information Page Course Title: ACE Computer Programming I (#494) Rationale: A continuum of courses, including advanced classes in technology is needed.

More information

Inline Variables. Document Number: N4424 Date: 2015 04 07 Hal Finkel (hfinkel@anl.gov) and Richard Smith (richard@metafoo.co.

Inline Variables. Document Number: N4424 Date: 2015 04 07 Hal Finkel (hfinkel@anl.gov) and Richard Smith (richard@metafoo.co. Document Number: N4424 Date: 2015 04 07 Hal Finkel (hfinkel@anl.gov) and Richard Smith (richard@metafoo.co.uk) Inline Variables Introduction C++ generally requires all extern functions and variables to

More information

CS 111 Classes I 1. Software Organization View to this point:

CS 111 Classes I 1. Software Organization View to this point: CS 111 Classes I 1 Software Organization View to this point: Data Objects and primitive types Primitive types operators (+, /,,*, %). int, float, double, char, boolean Memory location holds the data Objects

More information

Computer Programming C++ Classes and Objects 15 th Lecture

Computer Programming C++ Classes and Objects 15 th Lecture Computer Programming C++ Classes and Objects 15 th Lecture 엄현상 (Eom, Hyeonsang) School of Computer Science and Engineering Seoul National University Copyrights 2013 Eom, Hyeonsang All Rights Reserved Outline

More information

Lecture 22: C Programming 4 Embedded Systems

Lecture 22: C Programming 4 Embedded Systems Lecture 22: C Programming 4 Embedded Systems Today s Goals Basic C programming process Variables and constants in C Pointers to access addresses Using a High Level Language High-level languages More human

More information

CP Lab 2: Writing programs for simple arithmetic problems

CP Lab 2: Writing programs for simple arithmetic problems Computer Programming (CP) Lab 2, 2015/16 1 CP Lab 2: Writing programs for simple arithmetic problems Instructions The purpose of this Lab is to guide you through a series of simple programming problems,

More information

Oracle Database: SQL and PL/SQL Fundamentals

Oracle Database: SQL and PL/SQL Fundamentals Oracle University Contact Us: 1.800.529.0165 Oracle Database: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn This course is designed to deliver the fundamentals of SQL and PL/SQL along

More information

Javadoc like technical documentation for CAPRI

Javadoc like technical documentation for CAPRI Javadoc like technical documentation for CAPRI Introduction and background - by Wolfgang Britz, July 2008 - Since 1996, CAPRI has grown to a rather complex (bio-)economic modelling system. Its code based

More information

Introduction to Python

Introduction to Python Introduction to Python Sophia Bethany Coban Problem Solving By Computer March 26, 2014 Introduction to Python Python is a general-purpose, high-level programming language. It offers readable codes, and

More information

Applied Informatics C++ Coding Style Guide

Applied Informatics C++ Coding Style Guide C++ Coding Style Guide Rules and Recommendations Version 1.4 Purpose of This Document This document describes the C++ coding style employed by Applied Informatics. The document is targeted at developers

More information

Embedded Software development Process and Tools: Lesson-1

Embedded Software development Process and Tools: Lesson-1 Embedded Software development Process and Tools: Lesson-1 Introduction to Embedded Software Development Process and Tools 1 1. Development Process and Hardware Software 2 Development Process Consists of

More information

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. Exam Name MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. 1) The JDK command to compile a class in the file Test.java is A) java Test.java B) java

More information

Programming and Software Development CTAG Alignments

Programming and Software Development CTAG Alignments Programming and Software Development CTAG Alignments This document contains information about four Career-Technical Articulation Numbers (CTANs) for Programming and Software Development Career-Technical

More information

Decision Logic: if, if else, switch, Boolean conditions and variables

Decision Logic: if, if else, switch, Boolean conditions and variables CS 1044 roject 3 Fall 2009 Decision Logic: if, if else, switch, Boolean conditions and variables This programming assignment uses many of the ideas presented in sections 3 through 5 of the Dale/Weems text

More information

www.sahajsolns.com Chapter 4 OOPS WITH C++ Sahaj Computer Solutions

www.sahajsolns.com Chapter 4 OOPS WITH C++ Sahaj Computer Solutions Chapter 4 OOPS WITH C++ Sahaj Computer Solutions 1 Session Objectives Classes and Objects Class Declaration Class Members Data Constructors Destructors Member Functions Class Member Visibility Private,

More information

ADVANCED SCHOOL OF SYSTEMS AND DATA STUDIES (ASSDAS) PROGRAM: CTech in Computer Science

ADVANCED SCHOOL OF SYSTEMS AND DATA STUDIES (ASSDAS) PROGRAM: CTech in Computer Science ADVANCED SCHOOL OF SYSTEMS AND DATA STUDIES (ASSDAS) PROGRAM: CTech in Computer Science Program Schedule CTech Computer Science Credits CS101 Computer Science I 3 MATH100 Foundations of Mathematics and

More information

Generalizing Overloading for C++2000

Generalizing Overloading for C++2000 Generalizing Overloading for C++2000 Bjarne Stroustrup AT&T Labs, Florham Park, NJ, USA Abstract This paper outlines the proposal for generalizing the overloading rules for Standard C++ that is expected

More information

Input Output. 9.1 Why an IO Module is Needed? Chapter 9

Input Output. 9.1 Why an IO Module is Needed? Chapter 9 Chapter 9 Input Output In general most of the finite element applications have to communicate with pre and post processors,except in some special cases in which the application generates its own input.

More information

TECHNOLOGY Computer Programming II Grade: 9-12 Standard 2: Technology and Society Interaction

TECHNOLOGY Computer Programming II Grade: 9-12 Standard 2: Technology and Society Interaction Standard 2: Technology and Society Interaction Technology and Ethics Analyze legal technology issues and formulate solutions and strategies that foster responsible technology usage. 1. Practice responsible

More information

CS 141: Introduction to (Java) Programming: Exam 1 Jenny Orr Willamette University Fall 2013

CS 141: Introduction to (Java) Programming: Exam 1 Jenny Orr Willamette University Fall 2013 Oct 4, 2013, p 1 Name: CS 141: Introduction to (Java) Programming: Exam 1 Jenny Orr Willamette University Fall 2013 1. (max 18) 4. (max 16) 2. (max 12) 5. (max 12) 3. (max 24) 6. (max 18) Total: (max 100)

More information

INTEL PARALLEL STUDIO EVALUATION GUIDE. Intel Cilk Plus: A Simple Path to Parallelism

INTEL PARALLEL STUDIO EVALUATION GUIDE. Intel Cilk Plus: A Simple Path to Parallelism Intel Cilk Plus: A Simple Path to Parallelism Compiler extensions to simplify task and data parallelism Intel Cilk Plus adds simple language extensions to express data and task parallelism to the C and

More information

G563 Quantitative Paleontology. SQL databases. An introduction. Department of Geological Sciences Indiana University. (c) 2012, P.

G563 Quantitative Paleontology. SQL databases. An introduction. Department of Geological Sciences Indiana University. (c) 2012, P. SQL databases An introduction AMP: Apache, mysql, PHP This installations installs the Apache webserver, the PHP scripting language, and the mysql database on your computer: Apache: runs in the background

More information

Technical Writing - Definition of Bad and Good Code

Technical Writing - Definition of Bad and Good Code 1 Workshop on Distributed Software Management for e-science Day 2 - Software Design Lecture 4 Code Design Basics Geoff Cawood Consultant, EPCC Telephone: +44 131 650 5120 Email: geoffc@epcc.ed.ac.uk 4Low

More information

Mobile App Design Project #1 Java Boot Camp: Design Model for Chutes and Ladders Board Game

Mobile App Design Project #1 Java Boot Camp: Design Model for Chutes and Ladders Board Game Mobile App Design Project #1 Java Boot Camp: Design Model for Chutes and Ladders Board Game Directions: In mobile Applications the Control Model View model works to divide the work within an application.

More information

Glossary of Object Oriented Terms

Glossary of Object Oriented Terms Appendix E Glossary of Object Oriented Terms abstract class: A class primarily intended to define an instance, but can not be instantiated without additional methods. abstract data type: An abstraction

More information

csce4313 Programming Languages Scanner (pass/fail)

csce4313 Programming Languages Scanner (pass/fail) csce4313 Programming Languages Scanner (pass/fail) John C. Lusth Revision Date: January 18, 2005 This is your first pass/fail assignment. You may develop your code using any procedural language, but you

More information

1 External Model Access

1 External Model Access 1 External Model Access Function List The EMA package contains the following functions. Ema_Init() on page MFA-1-110 Ema_Model_Attr_Add() on page MFA-1-114 Ema_Model_Attr_Get() on page MFA-1-115 Ema_Model_Attr_Nth()

More information

Automation of Library (Codes) Development for Content Management System (CMS)

Automation of Library (Codes) Development for Content Management System (CMS) Automation of Library (Codes) Development for Content Management System (CMS) Mustapha Mutairu Omotosho Department of Computer Science, University Of Ilorin, Ilorin Nigeria Balogun Abdullateef Oluwagbemiga

More information

The design recipe. Programs as communication. Some goals for software design. Readings: HtDP, sections 1-5

The design recipe. Programs as communication. Some goals for software design. Readings: HtDP, sections 1-5 The design recipe Readings: HtDP, sections 1-5 (ordering of topics is different in lectures, different examples will be used) Survival and Style Guides CS 135 Winter 2016 02: The design recipe 1 Programs

More information

VISUAL GUIDE to. RX Scripting. for Roulette Xtreme - System Designer 2.0

VISUAL GUIDE to. RX Scripting. for Roulette Xtreme - System Designer 2.0 VISUAL GUIDE to RX Scripting for Roulette Xtreme - System Designer 2.0 UX Software - 2009 TABLE OF CONTENTS INTRODUCTION... ii What is this book about?... iii How to use this book... iii Time to start...

More information

Oracle Database: SQL and PL/SQL Fundamentals NEW

Oracle Database: SQL and PL/SQL Fundamentals NEW Oracle University Contact Us: + 38516306373 Oracle Database: SQL and PL/SQL Fundamentals NEW Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training delivers the

More information

Computer Science 1 CSci 1100 Lecture 3 Python Functions

Computer Science 1 CSci 1100 Lecture 3 Python Functions Reading Computer Science 1 CSci 1100 Lecture 3 Python Functions Most of this is covered late Chapter 2 in Practical Programming and Chapter 3 of Think Python. Chapter 6 of Think Python goes into more detail,

More information

This documentation is made available before final release and is subject to change without notice and comes with no warranty express or implied.

This documentation is made available before final release and is subject to change without notice and comes with no warranty express or implied. Hyperloop for ios Programming Guide This documentation is made available before final release and is subject to change without notice and comes with no warranty express or implied. Requirements You ll

More information

Introduction to Python

Introduction to Python Caltech/LEAD Summer 2012 Computer Science Lecture 2: July 10, 2012 Introduction to Python The Python shell Outline Python as a calculator Arithmetic expressions Operator precedence Variables and assignment

More information

Lecture 5: Java Fundamentals III

Lecture 5: Java Fundamentals III Lecture 5: Java Fundamentals III School of Science and Technology The University of New England Trimester 2 2015 Lecture 5: Java Fundamentals III - Operators Reading: Finish reading Chapter 2 of the 2nd

More information

Object Oriented Software Design II

Object Oriented Software Design II Object Oriented Software Design II Introduction to C++ Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa February 20, 2012 G. Lipari (Scuola Superiore Sant Anna) C++ Intro February

More information

EDITING YOUR THESIS Some useful pointers. Editing is all about making it easy for the reader to read your work.

EDITING YOUR THESIS Some useful pointers. Editing is all about making it easy for the reader to read your work. EDITING YOUR THESIS Some useful pointers What is involved? Editing is all about making it easy for the reader to read your work. The editing process involves looking at the work in three distinct ways:

More information

Introduction to Python

Introduction to Python WEEK ONE Introduction to Python Python is such a simple language to learn that we can throw away the manual and start with an example. Traditionally, the first program to write in any programming language

More information

CEC225 COURSE COMPACT

CEC225 COURSE COMPACT CEC225 COURSE COMPACT Course GEC 225 Applied Computer Programming II(2 Units) Compulsory Course Duration Two hours per week for 15 weeks (30 hours) Lecturer Data Name of the lecturer: Dr. Oyelami Olufemi

More information

Xcode User Default Reference. (Legacy)

Xcode User Default Reference. (Legacy) Xcode User Default Reference (Legacy) Contents Introduction 5 Organization of This Document 5 Software Version 5 See Also 5 Xcode User Defaults 7 Xcode User Default Overview 7 General User Defaults 8 NSDragAndDropTextDelay

More information

Informatica e Sistemi in Tempo Reale

Informatica e Sistemi in Tempo Reale Informatica e Sistemi in Tempo Reale Introduction to C programming Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa October 25, 2010 G. Lipari (Scuola Superiore Sant Anna)

More information

Code Refactoring and Defects

Code Refactoring and Defects Code Refactoring and Defects Reusing this material This work is licensed under a Creative Commons Attribution- NonCommercial-ShareAlike 4.0 International License. http://creativecommons.org/licenses/by-nc-sa/4.0/deed.en_us

More information

Chapter 1: Key Concepts of Programming and Software Engineering

Chapter 1: Key Concepts of Programming and Software Engineering Chapter 1: Key Concepts of Programming and Software Engineering Software Engineering Coding without a solution design increases debugging time - known fact! A team of programmers for a large software development

More information

Course Name: ADVANCE COURSE IN SOFTWARE DEVELOPMENT (Specialization:.Net Technologies)

Course Name: ADVANCE COURSE IN SOFTWARE DEVELOPMENT (Specialization:.Net Technologies) Course Name: ADVANCE COURSE IN SOFTWARE DEVELOPMENT (Specialization:.Net Technologies) Duration of Course: 6 Months Fees: Rs. 25,000/- (including Service Tax) Eligibility: B.E./B.Tech., M.Sc.(IT/ computer

More information

Chapter 5 Names, Bindings, Type Checking, and Scopes

Chapter 5 Names, Bindings, Type Checking, and Scopes Chapter 5 Names, Bindings, Type Checking, and Scopes Chapter 5 Topics Introduction Names Variables The Concept of Binding Type Checking Strong Typing Scope Scope and Lifetime Referencing Environments Named

More information

PL / SQL Basics. Chapter 3

PL / SQL Basics. Chapter 3 PL / SQL Basics Chapter 3 PL / SQL Basics PL / SQL block Lexical units Variable declarations PL / SQL types Expressions and operators PL / SQL control structures PL / SQL style guide 2 PL / SQL Block Basic

More information

Data Tool Platform SQL Development Tools

Data Tool Platform SQL Development Tools Data Tool Platform SQL Development Tools ekapner Contents Setting SQL Development Preferences...5 Execution Plan View Options Preferences...5 General Preferences...5 Label Decorations Preferences...6

More information

Third AP Edition. Object-Oriented Programming and Data Structures. Maria Litvin. Gary Litvin. Phillips Academy, Andover, Massachusetts

Third AP Edition. Object-Oriented Programming and Data Structures. Maria Litvin. Gary Litvin. Phillips Academy, Andover, Massachusetts Third AP Edition Object-Oriented Programming and Data Structures Maria Litvin Phillips Academy, Andover, Massachusetts Gary Litvin Skylight Software, Inc. Skylight Publishing Andover, Massachusetts Skylight

More information

Volume I, Section 4 Table of Contents

Volume I, Section 4 Table of Contents Volume I, Section 4 Table of Contents 4 Software Standards...4-1 4.1 Scope...4-1 4.1.1 Software Sources...4-2 4.1.2 Location and Control of Software and Hardware on Which it Operates...4-2 4.1.3 Exclusions...4-3

More information

Embedded Programming in C/C++: Lesson-1: Programming Elements and Programming in C

Embedded Programming in C/C++: Lesson-1: Programming Elements and Programming in C Embedded Programming in C/C++: Lesson-1: Programming Elements and Programming in C 1 An essential part of any embedded system design Programming 2 Programming in Assembly or HLL Processor and memory-sensitive

More information

WESTMORELAND COUNTY PUBLIC SCHOOLS 2011 2012 Integrated Instructional Pacing Guide and Checklist Computer Math

WESTMORELAND COUNTY PUBLIC SCHOOLS 2011 2012 Integrated Instructional Pacing Guide and Checklist Computer Math Textbook Correlation WESTMORELAND COUNTY PUBLIC SCHOOLS 2011 2012 Integrated Instructional Pacing Guide and Checklist Computer Math Following Directions Unit FIRST QUARTER AND SECOND QUARTER Logic Unit

More information