C155-110711-LectureNotes

C155-110711-LectureNotes - o Private helper method o...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CNIT 15500 Fall 2011 Lecture notes for 11/07/2011 Prof. Harriger Announcements Make sure that I have your picture file Assignments o Review today’s notes o Review Chapter 7 o Complete lab 8 – due tonight Quiz Course material from 8/22 through 11/2 Resources An Information Systems Approach to Object-Oriented Programming using Microsoft Visual C# Express, version 2.0 (Available from the Purdue Boiler Copy Maker center in Room 157 of the Purdue Memorial Union) Discussion topics Methods o What are they? o Why use them? o Two ways to return values Three types of methods
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: o Private helper method o Instance method o Shared or static method • Helper method o Why use them o Syntax private returnDataType methodName(paramList) { // method body } o paramList paramType paramName, paramType paramName, … • Syntax for calling a method o If method returns a value o If method has no return value • Example – a validation helper method: nbrIsValid (see example on course website) void if no return value int if returning int value precede with out if returning a value. E.g., out int distance...
View Full Document

This note was uploaded on 02/21/2012 for the course CIT 155 taught by Professor Lutes during the Fall '10 term at Purdue.

Ask a homework question - tutors are online