CSCI 1060U Programming Workshop

Size: px
Start display at page:

Download "CSCI 1060U Programming Workshop"

Transcription

1 CSCI 1060U Programming Workshop Professor: Dr. Jeremy S. Bradbury Phone: ext E- mail: Office hour: To be announced (UA4016), otherwise by appointment Teaching Assistants: Michael Miljanovic E- mail: Office hour: during labs (J123A), otherwise by appointment J.S. Bradbury CSCI 1060U Lecture 1 Slide 1

2 Lectures: CSCI 1060U Programming Workshop Tues. 12:40pm 2:00pm (UA1220) Thur. 11:10am 12:30pm (UA1220) Laboratories: Wed. 11:10am 2:00am (J123A) Thurs. 12:40pm 3:30pm (J123A) Note: labs start next week. J.S. Bradbury CSCI 1060U Lecture 1 Slide 2

3 Aims of the Course: CSCI 1060U Programming Workshop The primary purpose of this course is to provide a strong foundation for programming practices and theory. This course will focus on object-oriented programming in C++. J.S. Bradbury CSCI 1060U Lecture 1 Slide 3

4 CSCI 1060U Programming Workshop Textbook: Bjarne Stroustrup, A Tour of C++ This book will be the primary course reference and is a good general C++ reference. J.S. Bradbury CSCI 1060U Lecture 1 Slide 4

5 Textbook: CSCI 1060U Programming Workshop Online Resources. Online articles and websites will be used to supplement the textbooks. Links to all online resources will be posted in the course website on WebCT. J.S. Bradbury CSCI 1060U Lecture 1 Slide 5

6 CSCI 1060U Programming Workshop Topics (include but are not limited to): Program Documentation Code Style & Program Refactoring Program Debugging Techniques & Assertions Advanced C++ (recursion, pointers and more ) Object-Oriented Design (inheritance, polymorphism, and more ) Templates & the Standard Template Library J.S. Bradbury CSCI 1060U Lecture 1 Slide 6

7 CSCI 1060U Programming Workshop Marking: Laboratories (weekly) 40% Term Tests (2) 20% Final Exam 40% Note: The schedule for tests is as follows: Test #1 Thursday, Feb. 26, 2015 Test #2 Tuesday, Apr. 7, 2015 J.S. Bradbury CSCI 1060U Lecture 1 Slide 7

8 CSCI 1060U Programming Workshop Laboratories This course will have weekly laboratories. Laboratories will allow students to practice the programming concepts and techniques that are covered in the lectures. All labs will be done individually Each lab may include in-lab and take-home problems. Laboratory Submissions Unless otherwise specified in the instructions, all laboratory work should be submitted using Blackboard. J.S. Bradbury CSCI 1060U Lecture 1 Slide 8

9 Code Style & Documentation I Overview The style of your code and the program documentation both have a significant affect on the readability, maintainability and testability of your programs Today we will look at: appropriate code style for C++ (and Java) program documentation guidelines for C++ (and Java) J.S. Bradbury CSCI 1060U Lecture 1 Slide 9

10 In Class Activity: Using C++ write a commented program that can take an array of characters and identify the first character that appears only once in the array. The input for the program should be a: abdrfgfrdag The output for the program should be: b If there is no character that appears only once the output should be: no instance found J.S. Bradbury CSCI 1060U Lecture 1 Slide 10

11 Program Style Indentation & White Space Can be used to help group lines of code Some general rules include: 1. Insert a blank line between distinct sections of statements 2. Indent statements that are within another statement (e.g., inside an if statement or a while statement) 3. Place closing braces on a distinct line. Place opening braces on a distinct line or at the end of the preceding line. J.S. Bradbury CSCI 1060U Lecture 1 Slide 11

12 Program Style Line Length In C++ it is usually advised to avoid lines that are longer than 80 characters. Why? Improved readability in terminals Typically avoids bad wrapping by printers What happens if our line is more than 80 characters? Need to wrap text! J.S. Bradbury CSCI 1060U Lecture 1 Slide 12

13 Program Style Line Length The following Java wrapping guidelines also work for C++: Break after a comma. Break before an operator. Prefer higher-level breaks to lower-level breaks. Align the new line with the beginning of the expression at the same level on the previous line. If the above rules lead to confusing code or to code that's squished up against the right margin, just indent 8 spaces instead. 1 1 Source of guidelines is J.S. Bradbury CSCI 1060U Lecture 1 Slide 13

14 Program Style Comments Comments are used in a program to increase the readability of the code Reasons for using comments include: Explanations of statements Description of usage of statements Etc. (We will learn more about comments when we talk about documentation) J.S. Bradbury CSCI 1060U Lecture 1 Slide 14

15 Program Style Comments In C++ comments can occur in two ways: // everything from start symbol to the end of line // is a comment or /* Everything between the start and end symbols is a comment. */ J.S. Bradbury CSCI 1060U Lecture 1 Slide 15

16 Program Style Naming Conventions In C++ there are general naming conventions for variables, constants and functions also for namespaces, etc. A company or a project may also have specific naming conventions J.S. Bradbury CSCI 1060U Lecture 1 Slide 16

17 Program Style C++ Naming Conventions Identifier Type File Names Type Names Variable Names Constant Names Function Names Rules for Naming should be all lowercase and can include underscores (_) or dashes (-) start with a capital letter and have a capital letter for each new word, with no underscores Types should be nouns. all lowercase, with underscores between words. Class member variables have trailing underscores. Variables should be nouns. Use a k followed by mixed case Regular functions have mixed case Examples a_file.cpp MyClass local_variable member_variable_ kmyconstant MyFunction(); Source: This table is based on the website J.S. Bradbury CSCI 1060U Lecture 1 Slide 17

18 Program Style Java Naming Conventions Identifier Type Packages Classes, Interfaces Methods Rules for Naming The prefix of a unique package name is always written in all-lowercase ASCII letters and should be one of the top-level domain names, currently com, edu, gov, mil, net, org, or one of the English two-letter codes identifying countries Subsequent components of the package name vary should be nouns, in mixed case with the first letter of each internal word capitalized. Try to keep your class names simple and descriptive." Methods should be verbs, in mixed case with the first letter lowercase, with the first letter of each internal word capitalized. Examples com.blah Class MyClass; Interface MyInterface; mymethod(); Method(); mylongmethod(); Source: This table is modified from the table at: J.S. Bradbury CSCI 1060U Lecture 1 Slide 18

19 Program Style Java Naming Conventions Identifier Type Variables Constants Rules for Naming Except for variables, all instance, class, and class constants are in mixed case with a lowercase first letter. Internal words start with capital letters. Variable names should not start with underscore _ or dollar sign $ characters Variable names should be short yet meaningful. The choice of a variable name should be mnemonic- that is, designed to indicate to the casual observer the intent of its use. One-character variable names should be avoided except for temporary "throwaway" variables. Common names for temporary variables are i, j, k, m, and n for integers; c, d, and e for characters. should be all uppercase with words separated by underscores ("_") Examples int I; int size; int mysize; static final int A_CNST=1; Source: This table is modified from the table at: J.S. Bradbury CSCI 1060U Lecture 1 Slide 19

20 Program Style File Structure Most programs will have many source files The organization of these files is also part of the program style In Java, the use of packages defines directory structure. In C++, the programmer has to decide on the appropriate directory structure (usually based on the conventions of the company or project) J.S. Bradbury CSCI 1060U Lecture 1 Slide 20

21 Documentation Comments are a form of in-program documentation When to comment and when not to comment comes with experience but there are some general rules! J.S. Bradbury CSCI 1060U Lecture 1 Slide 21

22 Documentation Rule 1: Comment at the beginning of the source file with the main method/function. These comments should include: the purpose of the program, how it should be executed, the expected input/output, the version number Any additional information that would be appropriate J.S. Bradbury CSCI 1060U Lecture 1 Slide 22

23 Documentation Rule 2: At the beginning of all files/classes provide comment about The copyright notice the author, revision history and a description of the class. Rule 2A: If functions or methods within a class have dependencies regarding their usage you should document these as well. Example: a stack class should include comments such as a push has to occur before a pop. J.S. Bradbury CSCI 1060U Lecture 1 Slide 23

24 Documentation Rule 3 (C++): For the function declaration include comments regarding the usage of the function. For the function definition include comments such as an explanation of how the function works, any parameters and return values. Rule 3 (Java): For each method include comments detailing the purpose of the method, how it works, any parameters and return values. J.S. Bradbury CSCI 1060U Lecture 1 Slide 24

25 Documentation Rule 4: Comment groups of statements the require explanation. These comments should be: Non-obvious Provide insight into subtleties in the algorithm Explain why the statements do what they do J.S. Bradbury CSCI 1060U Lecture 1 Slide 25

26 Documentation In-program documentation contained in the comments can also be used to generate other forms of documentation Often documentation generation tools are used Why? Example: API documentation Rewriting the document could lead to inconsistency between external and in-program documents Rewriting documents takes more time and resources J.S. Bradbury CSCI 1060U Lecture 1 Slide 26

27 Code Style & Documentation I Summary We ve discussed guidelines for appropriate code style and documentation Next time We will continue to talk about documentation by discussing Javadoc and Doxygen We will also continue to talk about program style in particular bad programming practices and how to fix them using code refactoring J.S. Bradbury CSCI 1060U Lecture 1 Slide 27

28 Code Style & Documentation I References Mozilla Developer Network Coding Style Google C++ Style Guide Code Conventions for the Java Programming Language codeconvtoc html J.S. Bradbury CSCI 1060U Lecture 1 Slide 28

QueueBlock, ReversalADT, LinkedList,CustomerAccount, not MaintainCustomerData

QueueBlock, ReversalADT, LinkedList,CustomerAccount, not MaintainCustomerData Naming Conventions Rules Classes Use nouns Use whole words-avoid acronyms and abbreviations (unless the abbreviation is much more widely used than the long form, such as URL or HTML) Begin with upper case

More information

CS 251 Intermediate Programming Coding Standards

CS 251 Intermediate Programming Coding Standards CS 251 Intermediate Programming Coding Standards Brooke Chenoweth University of New Mexico Fall 2018 CS-251 Coding Standards All projects and labs must follow the great and hallowed CS-251 coding standards.

More information

Data Types, Literals, Operators

Data Types, Literals, Operators Data Types, Literals, Operators Sisoft Technologies Pvt Ltd SRC E7, Shipra Riviera Bazar, Gyan Khand-3, Indirapuram, Ghaziabad Website: www.sisoft.in Email:info@sisoft.in Phone: +91-9999-283-283 Learning

More information

Documentation Requirements Computer Science 2334 Spring 2016

Documentation Requirements Computer Science 2334 Spring 2016 Overview: Documentation Requirements Computer Science 2334 Spring 2016 These requirements are based on official Java coding conventions but have been adapted to be more appropriate to an academic environment.

More information

Quality of the Source Code Lexicon

Quality of the Source Code Lexicon Quality of the Source Code Lexicon Venera Arnaoudova Mining & Modeling Unstructured Data in Software Challenges for the Future NII Shonan Meeting, March 206 Psychological Complexity meaningless or incorrect

More information

CS 351 Design of Large Programs Coding Standards

CS 351 Design of Large Programs Coding Standards CS 351 Design of Large Programs Coding Standards Brooke Chenoweth University of New Mexico Spring 2018 CS-351 Coding Standards All projects and labs must follow the great and hallowed CS-351 coding standards.

More information

Expanded Guidelines on Programming Style and Documentation

Expanded Guidelines on Programming Style and Documentation Page 1 of 5 Expanded Guidelines on Programming Style and Documentation Introduction Introduction to Java Programming, 5E Y. Daniel Liang liang@armstrong.edu Programming style deals with the appearance

More information

CS313T ADVANCED PROGRAMMING LANGUAGE

CS313T ADVANCED PROGRAMMING LANGUAGE CS313T ADVANCED PROGRAMMING LANGUAGE Computer Science department Lecture 1 : Introduction Lecture Contents 2 Course Info. Course objectives Course plan Books and references Assessment methods and grading

More information

CS 152 Computer Programming Fundamentals Coding Standards

CS 152 Computer Programming Fundamentals Coding Standards CS 152 Computer Programming Fundamentals Coding Standards Brooke Chenoweth University of New Mexico Fall 2018 CS-152 Coding Standards All projects and labs must follow the great and hallowed CS-152 coding

More information

Supplement D: Expanded Guidelines on Programming Style and Documentation

Supplement D: Expanded Guidelines on Programming Style and Documentation Page 1 of 5 Introduction Supplement D: Expanded Guidelines on Programming Style and Documentation For Introduction to Java Programming Y. Daniel Liang mailto:liang@armstrong.edu Programming style deals

More information

CSE 11 Style Guidelines

CSE 11 Style Guidelines CSE 11 Style Guidelines These style guidelines are based off of Google s Java Style Guide and Oracle s Javadoc Guide. Overview: Your style will be graded on the following items: File Headers Class Headers

More information

Chapter 2 Basic Elements of C++

Chapter 2 Basic Elements of C++ C++ Programming: From Problem Analysis to Program Design, Fifth Edition 2-1 Chapter 2 Basic Elements of C++ At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class Discussion

More information

Java Style Guide. 1.0 General. 2.0 Visual Layout. Dr Caffeine

Java Style Guide. 1.0 General. 2.0 Visual Layout. Dr Caffeine September 25, 2002 Java Style Guide Dr Caffeine This document defines the style convention the students must follow in submitting their programs. This document is a modified version of the document originally

More information

Assignment Marking Criteria

Assignment Marking Criteria Assignment Marking Criteria Analysis Your analysis documentation must meet the following criteria: All program inputs, processing, and outputs. Each input and output must be given a name and description

More information

Syllabus COSC-051-x - Computer Science I Fall Office Hours: Daily hours will be entered on Course calendar (or by appointment)

Syllabus COSC-051-x - Computer Science I Fall Office Hours: Daily hours will be entered on Course calendar (or by appointment) Syllabus COSC-051-x - Computer Science I Fall 2018 Instructor: Jeremy Bolton, Ph.D. Asst Teaching Professor Department of Computer Science Office: TBD (see Course calendar for office hours) Email: jeremy.bolton@georgetown.edu

More information

JOSE LUIS JUAREZ VIVEROS com) has a. non-transferable license to use this Student Guide

JOSE LUIS JUAREZ VIVEROS com) has a. non-transferable license to use this Student Guide Module 3 Identifiers, Keywords, and Types Objectives Upon completion of this module, you should be able to: Use comments in a source program Distinguish between valid and invalid identifiers Recognize

More information

Full file at

Full file at Java Programming: From Problem Analysis to Program Design, 3 rd Edition 2-1 Chapter 2 Basic Elements of Java At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class

More information

Objectives. Coding Standards. Why coding standards? Elements of Java Style. Understand motivation for coding standards

Objectives. Coding Standards. Why coding standards? Elements of Java Style. Understand motivation for coding standards Objectives Coding Standards Understand motivation for coding standards Be able to write code that conforms to JOSSE coding standards. Philip Johnson Collaborative Software Development Laboratory Information

More information

CSC 111 Introduction to Computer Science (Section C)

CSC 111 Introduction to Computer Science (Section C) CSC 111 Introduction to Computer Science (Section C) Course Description: (4h) Lecture and laboratory. Rigorous introduction to the process of algorithmic problem solving and programming in a modern programming

More information

CS120 Computer Science I. Instructor: Jia Song

CS120 Computer Science I. Instructor: Jia Song CS120 Computer Science I Instructor: Jia Song Instructor Contact Information Instructor: Dr. Jia Song Email: jsong@uidaho.edu (Preferred) Phone: (208) 885-1710 Office: JEB 240 (CSDS Security Lab) JEB 340

More information

CIT 590 Homework 5 HTML Resumes

CIT 590 Homework 5 HTML Resumes CIT 590 Homework 5 HTML Resumes Purposes of this assignment Reading from and writing to files Scraping information from a text file Basic HTML usage General problem specification A website is made up of

More information

12/22/11. Java How to Program, 9/e. Help you get started with Eclipse and NetBeans integrated development environments.

12/22/11. Java How to Program, 9/e. Help you get started with Eclipse and NetBeans integrated development environments. Java How to Program, 9/e Education, Inc. All Rights Reserved. } Java application programming } Use tools from the JDK to compile and run programs. } Videos at www.deitel.com/books/jhtp9/ Help you get started

More information

EE 382 Style Guide. March 2, 2018

EE 382 Style Guide. March 2, 2018 EE 382 Style Guide March 2, 2018 This is a short document describing the coding style for this class. All code written in this class is assumed to follow this coding style. 1 Indentation Indentations should

More information

Java Programming Style Guide

Java Programming Style Guide Java Programming Style Guide Computer Science Program Cedarville University Goal: Our goal is to produce well-written code that can be easily understood and will facilitate life-cycle maintenance. These

More information

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 3: SEP. 13TH INSTRUCTOR: JIAYIN WANG

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 3: SEP. 13TH INSTRUCTOR: JIAYIN WANG CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 3: SEP. 13TH INSTRUCTOR: JIAYIN WANG 1 Notice Reading Assignment Chapter 1: Introduction to Java Programming Homework 1 It is due this coming Sunday

More information

CSCI 262 C++ Style Guide

CSCI 262 C++ Style Guide CSCI 262 C++ Style Guide Christopher Painter-Wakefield and Mark Baldwin and Alex Anderson Last updated: 1/18/2018 Modified from: C++ Student Coding Standards Mark Baldwin Version 1.02 5/21/2013 2012 Mark

More information

Chapter 2 Author Notes

Chapter 2 Author Notes Chapter 2 Author Notes Good Programming Practice 2.1 Every program should begin with a comment that explains the purpose of the program, the author and the date and time the program was last modified.

More information

Oklahoma State University Institute of Technology Face-to-Face Common Syllabus Fall 2017

Oklahoma State University Institute of Technology Face-to-Face Common Syllabus Fall 2017 Oklahoma State University Institute of Technology Face-to-Face Common Syllabus Fall 2017 ITD 1253 Object-Oriented Programming Using C# Students learn how to design, code, and test applications in C# using

More information

CSCI 136 Data Structures & Advanced Programming. Fall 2018 Instructors Bill Lenhart & Bill Jannen

CSCI 136 Data Structures & Advanced Programming. Fall 2018 Instructors Bill Lenhart & Bill Jannen CSCI 136 Data Structures & Advanced Programming Fall 2018 Instructors Bill Lenhart & Bill Jannen Administrative Details Class roster: Who s here? And who s trying to get in? Handout: Class syllabus Lecture

More information

ACORN.COM CS 1110 SPRING 2012: ASSIGNMENT A1

ACORN.COM CS 1110 SPRING 2012: ASSIGNMENT A1 ACORN.COM CS 1110 SPRING 2012: ASSIGNMENT A1 Due to CMS by Tuesday, February 14. Social networking has caused a return of the dot-com madness. You want in on the easy money, so you have decided to make

More information

PROGRAMMING STYLE. Fundamentals of Computer Science I

PROGRAMMING STYLE. Fundamentals of Computer Science I PROGRAMMING STYLE Fundamentals of Computer Science I Documentation and Style: Outline Meaningful Names Comments Indentation Named Constants Whitespace Compound Statements Documentation and Style Most programs

More information

CS 240 Fall 2015 Section 004. Alvin Chao, Professor

CS 240 Fall 2015 Section 004. Alvin Chao, Professor CS 240 Fall 2015 Section 004 Alvin Chao, Professor Today Course overview Data Structures / Algorithms Course policies The C language Motivation Computers are digital Data is stored in binary format (1's

More information

Assoc. Prof. Dr. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved.

Assoc. Prof. Dr. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved. Assoc. Prof. Dr. Marenglen Biba (C) 2010 Pearson Education, Inc. All rights reserved. Java application A computer program that executes when you use the java command to launch the Java Virtual Machine

More information

11 Coding Standards CERTIFICATION OBJECTIVES. Use Sun Java Coding Standards

11 Coding Standards CERTIFICATION OBJECTIVES. Use Sun Java Coding Standards 11 Coding Standards CERTIFICATION OBJECTIVES Use Sun Java Coding Standards 2 Chapter 11: Coding Standards CERTIFICATION OBJECTIVE Use Sun Java Coding Standards Spacing Standards The Developer exam is challenging.

More information

Al al-bayt University Prince Hussein Bin Abdullah College for Information Technology Computer Science Department

Al al-bayt University Prince Hussein Bin Abdullah College for Information Technology Computer Science Department Al al-bayt University Prince Hussein Bin Abdullah College for Information Technology Computer Science Department 0901212 Python Programming 1 st Semester 2014/2015 Course Catalog This course introduces

More information

Project 1. Java Control Structures 1/17/2014. Project 1 and Java Intro. Project 1 (2) To familiarize with

Project 1. Java Control Structures 1/17/2014. Project 1 and Java Intro. Project 1 (2) To familiarize with Project 1 and Java Intro Sharma Chakravarthy Information Technology Laboratory (IT Lab) Computer Science and Engineering Department The University of Texas at Arlington, Arlington, TX 76019 Email: sharma@cse.uta.edu

More information

6.096 Introduction to C++ January (IAP) 2009

6.096 Introduction to C++ January (IAP) 2009 MIT OpenCourseWare http://ocw.mit.edu 6.096 Introduction to C++ January (IAP) 2009 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. Welcome to 6.096 Lecture

More information

CSCI 131, Midterm Exam 1 Review Questions This sheet is intended to help you prepare for the first exam in this course. The following topics have

CSCI 131, Midterm Exam 1 Review Questions This sheet is intended to help you prepare for the first exam in this course. The following topics have CSCI 131, Midterm Exam 1 Review Questions This sheet is intended to help you prepare for the first exam in this course. The following topics have been covered in the first 5 weeks of the course. The exam

More information

C++ Programming Style Guide

C++ Programming Style Guide C++ Programming Style Guide Computer Science Program Cedarville University Goal: Our goal is to produce well-written code that can be easily understood and will facilitate life-cycle maintenance. These

More information

BLM2031 Structured Programming. Zeyneb KURT

BLM2031 Structured Programming. Zeyneb KURT BLM2031 Structured Programming Zeyneb KURT 1 Contact Contact info office : D-219 e-mail zeynebkurt@gmail.com, zeyneb@ce.yildiz.edu.tr When to contact e-mail first, take an appointment What to expect help

More information

Software and Programming 1

Software and Programming 1 Software and Programming 1 Lab 1: Introduction, HelloWorld Program and use of the Debugger 17 January 2019 SP1-Lab1-2018-19.pptx Tobi Brodie (tobi@dcs.bbk.ac.uk) 1 Module Information Lectures: Afternoon

More information

Datatypes, Variables, and Operations

Datatypes, Variables, and Operations Datatypes, Variables, and Operations 1 Primitive Type Classification 2 Numerical Data Types Name Range Storage Size byte 2 7 to 2 7 1 (-128 to 127) 8-bit signed short 2 15 to 2 15 1 (-32768 to 32767) 16-bit

More information

Overview : Table Of Content :

Overview : Table Of Content : Book Title:-A Workbook on C++ Author :-Sumit Mittu ISBN :-9788131520666 Price :-INR 499 Pages :-396 Edition :-2 Imprint :-Cengage Learning India Year :-2013 'A Workbook on C++ covers the topics required

More information

Coding Standards for Java

Coding Standards for Java Why have coding standards? Coding Standards for Java Version 1.3 It is a known fact that 80% of the lifetime cost of a piece of software goes to maintenance; therefore, it makes sense for all programs

More information

CS 211 Programming Practicum Spring 2017

CS 211 Programming Practicum Spring 2017 Due: Tuesday, 3/28/17 at 11:59 pm Infix Expression Evaluator Programming Project 5 For this lab, write a JAVA program that will evaluate an infix expression. The algorithm REQUIRED for this program will

More information

Cleveland State University

Cleveland State University Cleveland State University CIS 260/500 Introduction to Programming (4 credits). Spring 2015 Section 2/ 50 Class Nbr. 1810/1855 Tue, Thu 12:30 PM 2:20 PM Section 2/ 50 Class Nbr. 1813/1856. Tue, Thu 4:00

More information

LECTURE 02 INTRODUCTION TO C++

LECTURE 02 INTRODUCTION TO C++ PowerPoint Slides adapted from *Starting Out with C++: From Control Structures through Objects, 7/E* by *Tony Gaddis* Copyright 2012 Pearson Education Inc. COMPUTER PROGRAMMING LECTURE 02 INTRODUCTION

More information

Tutorials. Tutorial every Friday at 11:30 AM in Toldo 204 * discuss the next lab assignment

Tutorials. Tutorial every Friday at 11:30 AM in Toldo 204 * discuss the next lab assignment 60-212 subir@cs.uwindsor.ca Phone # 253-3000 Ext. 2999 web site for course www.cs.uwindsor.ca/60-212 Dr. Subir Bandyopadhayay Website has detailed rules and regulations All assignments and labs will be

More information

Basic Operations jgrasp debugger Writing Programs & Checkstyle

Basic Operations jgrasp debugger Writing Programs & Checkstyle Basic Operations jgrasp debugger Writing Programs & Checkstyle Suppose you wanted to write a computer game to play "Rock, Paper, Scissors". How many combinations are there? Is there a tricky way to represent

More information

Object-Oriented Programming CSCI-UA

Object-Oriented Programming CSCI-UA Object-Oriented Programming CSCI-UA 0470-001 Instructor: Thomas Wies Spring 2017 Class 1 - Introduction Object-oriented programming is an exceptionally bad idea which could only have originated in California.

More information

! A literal represents a constant value used in a. ! Numbers: 0, 34, , -1.8e12, etc. ! Characters: 'A', 'z', '!', '5', etc.

! A literal represents a constant value used in a. ! Numbers: 0, 34, , -1.8e12, etc. ! Characters: 'A', 'z', '!', '5', etc. Week 1: Introduction to C++ Gaddis: Chapter 2 (excluding 2.1, 2.11, 2.14) CS 1428 Fall 2014 Jill Seaman Literals A literal represents a constant value used in a program statement. Numbers: 0, 34, 3.14159,

More information

SAMS Programming A/B. Lecture #1 Introductions July 3, Mark Stehlik

SAMS Programming A/B. Lecture #1 Introductions July 3, Mark Stehlik SAMS Programming A/B Lecture #1 Introductions July 3, 2017 Mark Stehlik Outline for Today Overview of Course A Python intro to be continued in lab on Wednesday (group A) and Thursday (group B) 7/3/2017

More information

Web Programming Spring 2010

Web Programming Spring 2010 Web Programming Spring 2010 Course number: M&IS 24065 Section: 001/ 002 CRN: 11441/13343 Location: BSA 205/BSA 324 Meeting day: TR Meeting time: 2:15-3:30 PM/5:30-6:45 PM Instructor Name: Professor Janet

More information

Technical Questions. Q 1) What are the key features in C programming language?

Technical Questions. Q 1) What are the key features in C programming language? Technical Questions Q 1) What are the key features in C programming language? Portability Platform independent language. Modularity Possibility to break down large programs into small modules. Flexibility

More information

IT 374 C# and Applications/ IT695 C# Data Structures

IT 374 C# and Applications/ IT695 C# Data Structures IT 374 C# and Applications/ IT695 C# Data Structures Module 2.1: Introduction to C# App Programming Xianrong (Shawn) Zheng Spring 2017 1 Outline Introduction Creating a Simple App String Interpolation

More information

CS 211 Programming Practicum Fall 2018

CS 211 Programming Practicum Fall 2018 Due: Wednesday, 11/7/18 at 11:59 pm Infix Expression Evaluator Programming Project 5 For this lab, write a C++ program that will evaluate an infix expression. The algorithm REQUIRED for this program will

More information

CS 241 Data Organization using C

CS 241 Data Organization using C CS 241 Data Organization using C Fall 2018 Instructor Name: Dr. Marie Vasek Contact: Private message me on the course Piazza page. Office: Farris 2120 Office Hours: Tuesday 2-4pm and Thursday 9:30-11am

More information

CSCI 136 Data Structures & Advanced Programming. Spring 2018 Instructors Bill Jannen & Jon Park

CSCI 136 Data Structures & Advanced Programming. Spring 2018 Instructors Bill Jannen & Jon Park CSCI 136 Data Structures & Advanced Programming Spring 2018 Instructors Bill Jannen & Jon Park Today s Outline Course Preview Course Bureaucracy Crash Course in Java Part 1 2 Why Take CS136? To learn about:

More information

COLLEGE OF DUPAGE CIS 2542 Advanced C++ with Data Structure Applications Course Syllabus

COLLEGE OF DUPAGE CIS 2542 Advanced C++ with Data Structure Applications Course Syllabus Carolyn England COD Main #: 942-4125 Voicemail Ext. 4125 Office: BIC1544B (Division Office TEC1034) Mailbox: BIC1E01 Office Hours: M 12:05 pm 1:45 pm Tu 12:05 pm 1:45 pm W 12:05 pm 1:45 pm Th 9:00 am 10:40

More information

Formatting & Style Examples

Formatting & Style Examples Formatting & Style Examples The code in the box on the right side is a program that shows an example of the desired formatting that is expected in this class. The boxes on the left side show variations

More information

CSE 114, Computer Science 1 Course Information. Spring 2017 Stony Brook University Instructor: Dr. Paul Fodor

CSE 114, Computer Science 1 Course Information. Spring 2017 Stony Brook University Instructor: Dr. Paul Fodor CSE 114, Computer Science 1 Course Information Spring 2017 Stony Brook University Instructor: Dr. Paul Fodor http://www.cs.stonybrook.edu/~cse114 Course Description Procedural and object-oriented programming

More information

Università degli Studi di Bologna Facoltà di Ingegneria. Principles, Models, and Applications for Distributed Systems M

Università degli Studi di Bologna Facoltà di Ingegneria. Principles, Models, and Applications for Distributed Systems M Università degli Studi di Bologna Facoltà di Ingegneria Principles, Models, and Applications for Distributed Systems M tutor Isam M. Al Jawarneh, PhD student isam.aljawarneh3@unibo.it Mobile Middleware

More information

During the first 2 weeks of class, all students in the course will take an in-lab programming exam. This is the Exam in Programming Proficiency.

During the first 2 weeks of class, all students in the course will take an in-lab programming exam. This is the Exam in Programming Proficiency. Description of CPSC 301: This is a 2-unit credit/no credit course. It is a course taught entirely in lab, and has two required 2-hour 50-minute lab sessions per week. It will review, reinforce, and expand

More information

Scala Style Guide Spring 2018

Scala Style Guide Spring 2018 CS18 Integrated Introduction to Computer Science Fisler, Nelson Scala Style Guide Spring 2018 Contents 1 Introduction 1 2 Naming 1 3 Formatting 2 4 Class Declarations 3 5 Functional Paradigms 4 6 Comments

More information

Week 7 - More Java! this stands for the calling object:

Week 7 - More Java! this stands for the calling object: Week 7 - More Java! Variable Scoping, Revisited this Parameter Encapsulation & Principles of Information Hiding: Use of public and private within class API, ADT javadoc Variables of class Type Wrapper

More information

LESSON 1. A C program is constructed as a sequence of characters. Among the characters that can be used in a program are:

LESSON 1. A C program is constructed as a sequence of characters. Among the characters that can be used in a program are: LESSON 1 FUNDAMENTALS OF C The purpose of this lesson is to explain the fundamental elements of the C programming language. C like other languages has all alphabet and rules for putting together words

More information

CSCI 2101 Java Style Guide

CSCI 2101 Java Style Guide CSCI 2101 Java Style Guide Fall 2017 This document describes the required style guidelines for writing Java code in CSCI 2101. Guidelines are provided for four areas of style: identifiers, indentation,

More information

CS 241 Data Organization. August 21, 2018

CS 241 Data Organization. August 21, 2018 CS 241 Data Organization August 21, 2018 Contact Info Instructor: Dr. Marie Vasek Contact: Private message me on the course Piazza page. Office: Room 2120 of Farris Web site: www.cs.unm.edu/~vasek/cs241/

More information

Overloading Functions & Command Line Use in C++ CS 16: Solving Problems with Computers I Lecture #6

Overloading Functions & Command Line Use in C++ CS 16: Solving Problems with Computers I Lecture #6 Overloading Functions & Command Line Use in C++ CS 16: Solving Problems with Computers I Lecture #6 Ziad Matni Dept. of Computer Science, UCSB A reminder about Labs Announcements Please make sure you READ

More information

CSCI 528: OBJECT ORIENTED PROGRAMMING, Fall 2015

CSCI 528: OBJECT ORIENTED PROGRAMMING, Fall 2015 CSCI 528: OBJECT ORIENTED PROGRAMMING, Fall 2015 INSTRUCTOR: Dr. Ray Maleh Adjunct Professor, Department of Computer Science Office: TBD Email: Ray_Maleh@tamuc.edu Office Hours: Mondays 7:10 PM 8:10 PM,

More information

C++ Style Guide. 1.0 General. 2.0 Visual Layout. 3.0 Indentation and Whitespace

C++ Style Guide. 1.0 General. 2.0 Visual Layout. 3.0 Indentation and Whitespace C++ Style Guide 1.0 General The purpose of the style guide is not to restrict your programming, but rather to establish a consistent format for your programs. This will help you debug and maintain your

More information

San José State University Department of Computer Science CS-144, Advanced C++ Programming, Section 1, Spring 2018

San José State University Department of Computer Science CS-144, Advanced C++ Programming, Section 1, Spring 2018 San José State University Department of Computer Science CS-144, Advanced C++ Programming, Section 1, Spring 2018 Course and Contact Information Instructor: Office Location: Telephone: Email: Office Hours:

More information

Log4Delphi Coding Standards

Log4Delphi Coding Standards Table of contents 1 Coding Standards Used By Log4Delphi Developers...2 1.1 Introduction... 2 1.2 General Source Conventions... 2 1.3 Object Pascal Conventions... 3 1.4 File Conventions...4 1.5... 5 2 Other

More information

19. Bulleted and Numbered Lists

19. Bulleted and Numbered Lists Kennesaw State University DigitalCommons@Kennesaw State University Sexy Technical Communications Open Educational Resources 3-1-2016 19. Bulleted and Numbered Lists David McMurray Follow this and additional

More information

UCD School of Information and Library Studies. IS30020: Web Publishing

UCD School of Information and Library Studies. IS30020: Web Publishing UCD School of Information and Library Studies IS30020: Web Publishing Module Coordinator: Dr Judith Wusteman Office: SILS 110, Email: judith.wusteman@ucd.ie, Tel: 716 7612 Office hour Semester 1 (Sept

More information

Identifiers and Variables

Identifiers and Variables Identifiers and Variables Lecture 4 Based on Slides of Dr. Norazah Yusof 1 Identifiers All the Java components classes, variables, and methods need names. In Java these names are called identifiers, and,

More information

MPATE-GE 2618: C Programming for Music Technology. Syllabus

MPATE-GE 2618: C Programming for Music Technology. Syllabus MPATE-GE 2618: C Programming for Music Technology Instructor Dr. Schuyler Quackenbush schuyler.quackenbush@nyu.edu Lab Teaching Assistant TBD Description Syllabus MPATE-GE 2618: C Programming for Music

More information

CUT HERE

CUT HERE Template: ARIN-IPv6-NET-MOD-5.0 ** As of XXX 2010 ** Detailed instructions are located below the template. 00. API Key: 01. Registration Action (M or R): 02. IPv6 Address and Prefix: 03. Network Name:

More information

Introduction to Programming System Design CSCI 455x (4 Units)

Introduction to Programming System Design CSCI 455x (4 Units) Introduction to Programming System Design CSCI 455x (4 Units) Description This course covers programming in Java and C++. Topics include review of basic programming concepts such as control structures,

More information

Use C++, not C for all work in this course. The biggest difference is how one does input

Use C++, not C for all work in this course. The biggest difference is how one does input Chapter 1: Preamble 1.1 Commandments A nationally-known expert has said that C++ is a coding monster that forces us to use a disciplined style in order to tame it. This leads to a fundamental rule for

More information

Laboratory 2: Programming Basics and Variables. Lecture notes: 1. A quick review of hello_comment.c 2. Some useful information

Laboratory 2: Programming Basics and Variables. Lecture notes: 1. A quick review of hello_comment.c 2. Some useful information Laboratory 2: Programming Basics and Variables Lecture notes: 1. A quick review of hello_comment.c 2. Some useful information 3. Comment: a. name your program with extension.c b. use o option to specify

More information

CSSE2002/7023 The University of Queensland

CSSE2002/7023 The University of Queensland CSSE2002 / CSSE7023 Semester 1, 2016 Assignment 1 Goal: The goal of this assignment is to gain practical experience with data abstraction, unit testing and using the Java class libraries (the Java 8 SE

More information

CS261: HOMEWORK 2 Due 04/13/2012, at 2pm

CS261: HOMEWORK 2 Due 04/13/2012, at 2pm CS261: HOMEWORK 2 Due 04/13/2012, at 2pm Submit six *.c files via the TEACH website: https://secure.engr.oregonstate.edu:8000/teach.php?type=want_auth 1. Introduction The purpose of HW2 is to help you

More information

Murach's HTML and CSS3 3 rd Edition By Boehm, Anne Fresno, Calif Publisher: Mike Murach & Associates, 2015 ISBN-13:

Murach's HTML and CSS3 3 rd Edition By Boehm, Anne Fresno, Calif Publisher: Mike Murach & Associates, 2015 ISBN-13: Course Number: IS117 Course Title: Introduction to Website Development Section: 006 Semester: Spring 2018 Date & Time: Tuesday: 10:00 AM 12:50 PM Location: GITC 2400 Credits: 3 Contact Hours: 3 Hours Face-to-Face

More information

Microprocessors & Assembly Language Lab 1 (Introduction to 8086 Programming)

Microprocessors & Assembly Language Lab 1 (Introduction to 8086 Programming) Microprocessors & Assembly Language Lab 1 (Introduction to 8086 Programming) Learning any imperative programming language involves mastering a number of common concepts: Variables: declaration/definition

More information

Programmazione. Prof. Marco Bertini

Programmazione. Prof. Marco Bertini Programmazione Prof. Marco Bertini marco.bertini@unifi.it http://www.micc.unifi.it/bertini/ Coding style guidelines Good code is its own best documentation. - Steve McConnell Why using a coding standard?

More information

CS5000: Foundations of Programming. Mingon Kang, PhD Computer Science, Kennesaw State University

CS5000: Foundations of Programming. Mingon Kang, PhD Computer Science, Kennesaw State University CS5000: Foundations of Programming Mingon Kang, PhD Computer Science, Kennesaw State University Overview of Source Code Components Comments Library declaration Classes Functions Variables Comments Can

More information

Makefiles Makefiles should begin with a comment section of the following form and with the following information filled in:

Makefiles Makefiles should begin with a comment section of the following form and with the following information filled in: CS 215 Fundamentals of Programming II C++ Programming Style Guideline Most of a programmer's efforts are aimed at the development of correct and efficient programs. But the readability of programs is also

More information

Spring 2003 Instructor: Dr. Shahadat Hossain. Administrative Matters Course Information Introduction to Programming Techniques

Spring 2003 Instructor: Dr. Shahadat Hossain. Administrative Matters Course Information Introduction to Programming Techniques 1 CPSC2620 Advanced Programming Spring 2003 Instructor: Dr. Shahadat Hossain 2 Today s Agenda Administrative Matters Course Information Introduction to Programming Techniques 3 Course Assessment Lectures:

More information

Beginning Style. 16-Nov-15

Beginning Style. 16-Nov-15 Beginning Style 16-Nov-15 Be consistent! Most times, you will enter an ongoing project, with established style rules Follow them even if you don t like them In this course you will be working in teams

More information

CPS122 Lecture: Defining a Class

CPS122 Lecture: Defining a Class Objectives: CPS122 Lecture: Defining a Class last revised January 14, 2016 1. To introduce structure of a Java class 2. To introduce the different kinds of Java variables (instance, class, parameter, local)

More information

CS 4218 Software Testing and Debugging Ack: Tan Shin Hwei for project description formulation

CS 4218 Software Testing and Debugging Ack: Tan Shin Hwei for project description formulation CS 4218 Software Testing and Debugging Ack: Tan Shin Hwei for project description formulation The Project CS 4218 covers the concepts and practices of software testing and debugging. An important portion

More information

Software Implementation (Writing Quality Code)

Software Implementation (Writing Quality Code) Software Implementation (Writing Quality Code) void HandleStuff( CORP_DATA & inputrec, int crntqtr, EMP_DATA emprec, float & estimrevenue, float ytdrevenue, int screenx, int screeny, COLOR_TYPE & newcolor,

More information

EECE.2160: ECE Application Programming Spring 2017

EECE.2160: ECE Application Programming Spring 2017 Course Meetings Section 201: MWF 8-8:50, Ball 314 Section 202: MWF 12-12:50, Kitson 305 Course Website Main page: http://mjgeiger.github.io/eece2160/sp17/ Schedule: http://mjgeiger.github.io/eece2160/sp17/schedule.htm

More information

Coding Standards for C

Coding Standards for C Why have coding standards? Coding Standards for C Version 6.1 CS480s11 It is a known fact that 80% of the lifetime cost of a piece of software goes to maintenance. Therefore it makes sense for all programs

More information

EECE.2160: ECE Application Programming Spring 2019

EECE.2160: ECE Application Programming Spring 2019 Course Meetings Section 201: MWF 8-8:50, Kitson 305 Section 202: MWF 12-12:50, Kitson 305 Course Website Main page: http://mjgeiger.github.io/eece2160/sp19/ Schedule: http://mjgeiger.github.io/eece2160/sp19/schedule.htm

More information

Introduction. Instructor: Jia Xu CSCI-135

Introduction. Instructor: Jia Xu CSCI-135 Introduction Instructor: Jia Xu CSCI-135 about 135 prerequisite: CSCI-127 final score: 25% programming projects (3-5) late penalty on programming projects (see b.b.) 75% three tests (equally weighted)

More information

CSCI 2010 Principles of Computer Science. Data and Expressions 08/09/2013 CSCI

CSCI 2010 Principles of Computer Science. Data and Expressions 08/09/2013 CSCI CSCI 2010 Principles of Computer Science Data and Expressions 08/09/2013 CSCI 2010 1 Data Types, Variables and Expressions in Java We look at the primitive data types, strings and expressions that are

More information

Introduction to Web Design & Computer Principles

Introduction to Web Design & Computer Principles Introduction to Web Design & Computer Principles CSCI-UA.0004-007 Instructor: Adam Scher Tuesday/Thursday 8:00am - 9:15am Warren Weaver Hall Room 101 What s in store today... Who Am I? Course Overview

More information

Using C++, design an Abstract Data Type class named MyGrades. The class must have the following private members :

Using C++, design an Abstract Data Type class named MyGrades. The class must have the following private members : Programming Assignment - 3 Due Date : Section 2 - Monday October 1 st, 2018 - No Later than 12:45 pm Using C++, design an Abstract Data Type class named MyGrades. The class must have the following private

More information