Documentation Dr. Andrew Wallace PhD BEng(hons) EurIng

Slides:



Advertisements
Similar presentations
User-Defined Functions Like short programs Can operate on their own data Can receive data from callers and return data to callers.
Advertisements

Algorithms, Lists and Pseudocode Dr. Andrew Wallace PhD BEng(hons) EurIng
Utilities (Part 3) Implementing static features 1.
Nov 10, Fall 2006IAT 8001 Debugging. Nov 10, Fall 2006IAT 8002 How do I know my program is broken?  Compiler Errors –easy to fix!  Runtime Exceptions.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Software Development Software Life Cycle UML Diagrams.
© The McGraw-Hill Companies, 2006 Chapter 9 Software quality.
Object-Oriented Enterprise Application Development Javadoc Last Updated: 06/30/2001.
26-Jun-15 Methods. About methods A method is a named group of declarations and statements If a method is in the same class, you execute those declarations.
1 More on Arrays Arrays of objects Command line arguments The ArrayList class Javadoc Review Lecture 8 notes and L&L 7.1 – 7.2 Reading for this lecture:
CSC 395 – Software Engineering Lecture 21: Overview of the Term & What Goes in a Data Dictionary.
Lecturer: Dr. AJ Bieszczad Chapter 76-1 Software engineering standards Standards for you Standards for others Matching design with implementation.
Exceptions and IO Dr. Andrew Wallace PhD BEng(hons) EurIng
Testing Dr. Andrew Wallace PhD BEng(hons) EurIng
Concordia University Department of Computer Science and Software Engineering Click to edit Master title style ADVANCED PROGRAMING PRACTICES API documentation.
1 Documenting with Javadoc CS 3331 Fall 2009 How to Write Doc Comments for the Javadoc TM Tool available from java.sun.com.
CH07: Writing the Programs Does not teach you how to program, but point out some software engineering practices that you should should keep in mind as.
Unit Testing & Defensive Programming. F-22 Raptor Fighter.
1 Web Based Programming Section 6 James King 12 August 2003.
Classes, Objects, Arrays, Collections and Autoboxing Dr. Andrew Wallace PhD BEng(hons) EurIng
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.
Jun 16, 2014IAT 2651 Debugging. Dialectical Materialism  Dialectical materialism is a strand of Marxism, synthesizing Hegel's dialectics, which proposes.
Exceptions1 Syntax, semantics, and pragmatics. Exception create If (some error){ throw new SomeException(”some message”); } Exceptions2.
JavaDoc1 JavaDoc DEPARTMENT OF COMPUTER SCIENCE AND SOFTWARE ENGINEERING CONCORDIA UNIVERSITY July 24, 2006 by Emil Vassev & Joey Paquet revision 1.2 –
07 Coding Conventions. 2 Demonstrate Developing Local Variables Describe Separating Public and Private Members during Declaration Explore Using System.exit.
Writing JavaDocs Mimi Opkins CECS 274 Copyright (c) Pearson All rights reserved.
Introduction to Programming David Goldschmidt, Ph.D. Computer Science The College of Saint Rose Java Fundamentals (Comments, Variables, etc.)
GIT and JUnit Dr. Andrew Wallace PhD BEng(hons) EurIng
1 Documenting with Javadoc. 2 Motivation  Why document programs? To make it easy to understand, e.g., for reuse and maintenance  What to document? Interface:
Question of the Day  On a game show you’re given the choice of three doors: Behind one door is a car; behind the others, goats. After you pick a door,
Utilities (Part 2) Implementing static features 1.
Javadoc: Advanced Features & Limitations Presented By: Wes Toland.
INTERFACES More OO Concepts. Interface Topics Using an interface Interface details –syntax –restrictions Create your own interface Remember polymorphism.
Documentation and Programming Style Appendix A © 2015 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Javadoc Comments.  Java API has a documentation tool called javadoc  The javadoc tool is used on the source code embedded with javadoc-style comments.
Software Documentation Section 5.5 ALBING’s Section JIA’s Appendix B JIA’s.
Documentation javadoc. Documentation not a programmer's first love lives in a separate file somewhere usually a deliverable on the schedule often not.
Javadoc A very short tutorial. What is it A program that automatically generates documentation of your Java classes in a standard format For each X.java.
CSC 212 – Data Structures Prof. Matthew Hertz WTC 207D /
Javadoc Dwight Deugo Nesa Matic
JavaDoc and Contracts Spring Documenting Contracts with JavaDoc Contract model for methods Preconditions Postconditions JavaDoc Industry standard.
Programmeren 1 6 september 2010 HOORCOLLEGE 2: INTERACTIE EN CONDITIES PROGRAMMEREN 1 6 SEPTEMBER 2009 Software Systems - Programming1 Programming.
Javadoc. Purpose of javadoc javadoc is a program that reads your Java program and produces great-looking documentation in HTML format Without any help,
Georgia Institute of Technology Creating Classes part 4 Barb Ericson Georgia Institute of Technology May 2006.
CreatingClasses-SlideShow-part41 Creating Classes part 4 Barb Ericson Georgia Institute of Technology Dec 2009.
A brief introduction to javadoc and doxygen. What’s in a program file? 1. Comments 2. Code.
Page 1 – Autumn 2009Steffen Vissing Andersen SDJ I1, Autumn 2009 Agenda: Java API Documentation Code Documenting (in javadoc format) Debugging.
Exceptions in C++. Exceptions  Exceptions provide a way to handle the errors generated by our programs by transferring control to functions called handlers.
Java Doc Guideline R.SANTHANA GOPALAN. Java Doc Guideline Audience Internal Developers PQA - who write test plans PPT – who write the documentation Customers.
1 Documenting with Javadoc CS 3331 Section and Appendix B of [Jia03] How to Write Doc Comments for the Javadoc TM Tool available from
ICS3U_FileIO.ppt File Input/Output (I/O)‏ ICS3U_FileIO.ppt File I/O Declare a file object File myFile = new File("billy.txt"); a file object whose name.
Lecture 7 February 24, Javadoc version and author Tags These go in the comments before named classes. –Put your SS# on a separate line from the.
Winter 2006CISC121 - Prof. McLeod1 Stuff We had better discuss a midterm date… –27 Feb. to 3 March or –6 to 10 March.
Defensive Programming. Good programming practices that protect you from your own programming mistakes, as well as those of others – Assertions – Parameter.
1 Documenting with Javadoc How to Write Doc Comments for the Javadoc TM Tool available from java.sun.com.
Today Javadoc. Packages and static import. Viewing API source code. Upcoming Topics: –protected access modifier –Using the debugger in Eclipse –JUnit testing.
Introduction to Exceptions in Java CS201, SW Development Methods.
Variable Scope & Lifetime
Advanced Programing practices
More Sophisticated Behavior
Manipulating Pictures, Arrays, and Loops part 3
CMPE212 – Stuff… Assn 2 due next Friday. Winter 2018
Introduction to javadoc
Algorithm Efficiency, Big O Notation, and Javadoc
Fall 2018 CISC124 12/1/2018 CISC124 Note that the next assignment, on encapsulation, is due next Wednesday at 7pm – not Friday. The next Quiz is not until.
Manipulating Pictures, Arrays, and Loops part 3
CSE 143 Java Exceptions 1/18/2019.
JavaDoc and Contracts Fall 2008.
Manipulating Pictures, Arrays, and Loops
Advanced Programing practices
Introduction to javadoc
Presentation transcript:

Documentation Dr. Andrew Wallace PhD BEng(hons) EurIng

Overview Documentation Javadoc More documentation

Documentation Document your program For others For yourself Programs change over time Different people can work on it

Documentation What is this? What does it do? How does it fit in with everything else? How do I use it? What are the inputs and outputs? What assumptions are made?

Documentation Comments in the code // /* … */ Comments blocks of code Comments methods Comment class Comment package

Quiz Why should you document your code?

Javadoc Javadoc is a program for generating documentation form the code Saves having to view the code Uses special comments in the code Javadoc integrated into Eclipse You need JDK Project->generate javadoc Write the comments within the class file, as method declarations and for the class attributes Outputs HTML files

Javadoc Start a Javadoc comment with /** and end with */ Write a block describing the class etc. Use keywords that start to add specific details Can use HTML tags as well like

– add information on parameters passed to a – information on the return – throw by the method and why

Javadoc /** This method test IO by calling various IO methods. The method will loop until all test are completed or an error occurs. This method can be used to check a commination address – a reference to a class containing the address information need to create a connection. The method assumes this is not – 0 = all test ok, else a number indicates which test – IOException if there is a problem establishing a connection. The exception contains further information on the problem. */ Public int TestIO(Adress adress) thows IOException {

– the original person who wrote the code. At class or interface – version information in case various version of the software – information on where to find additional information or information on related code

Quiz What is Javadoc? How do you use it?

More documentation What to document? How to use the code System description Algorithm description Limits Testing

More documentation Using the code Give example Compilation Anything special needed? Some large projects can become complex

More documentation System description Internal, how it is built up How do the classes fit in? Context References to more information Javadoc documents Diagrams UML

More documentation Algorithm descriptions Write up how more complex algorithms works such as sorting Described independent of the code How was a complex problem solved?

More documentation Solution limitations Limits under test Limits that effect specification Nothing is perfect! How can the limits be avoided?

More documentation Test documentation How to test the code? Specifications What can go wrong? Comment each test case Why? Results? Test plan When to test?

More documentation Coding standards Indentations Layout of loops Brackets Line length

Quiz Name three other types of documents (other than source code)? What do you document in each?

Questions?