09-23 Class Notes CS 107

09-23 Class Notes CS 107 - 09-23 Class Notes CS 107 Friday,...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
See updated description posted for program #3 Announcements: Questions? Program swap.java used to swap the value of two variables Last Time: Parameter scope, overloading, classes intuition Today: A for True, B for False T/F You have to "catch" the same number of parameters that you "throw" 1. T/F The types of parameters must be exactly the same 2. T/F To share one variable and any changes to it between two methods, you could pass it as a parameter and return any new value using the method return type. 3. T/F To share two variables and any changes to them between two methods, you could pass them as a parameters and return any new values using the method return type. 4. T/F To share multiple variables among methods in a class they must be declared at the top of the class, outside of any methods, but still inside the class. 5. int x = 3; x,y = addOne( x); x = addTwo( x); int addOne( int y) Quiz: 09-23 Class Notes CS 107 Friday, September 23, 2011 2:47 PM CS 107 Fall 2011 Page 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
{ return y+1; }
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/10/2012 for the course COP 2273 taught by Professor Lin during the Fall '11 term at University of Central Florida.

Page1 / 3

09-23 Class Notes CS 107 - 09-23 Class Notes CS 107 Friday,...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online