20111107

20111107 - Office of Instructional and Research Week 10...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Office of Instructional and Research Week 10 Object-Oriented Programming Inheritance Continues ITI 202 Office of Instructional and Research This week: • Monday – Quiz Review – The second fundamental idea of OOP (review) – Interfaces – The third fundamental idea of OOP - Polymorphism • Wednesday – Quiz (Inheritance & Polymorphism) – Team Assignment #3 Office of Instructional and Research Announcements • Week 10 Blog – Prepping for Team Assignment #3 Any concerns going into the final team assignment? What does your team need to do to succeed? Blogs should be submitted by 11:59pm, Sunday November 13th. Office of Instructional and Research Review – Week “9” Quiz Given that the following statement executes successfully, what type of value must the method displayResult return? if (displayResult(currentPlayer+1,playerComp)){ . . } A. boolean B. int C. float D. String An if(condition) must always evaluate to… True or False This type of variable is… A. boolean Office of Instructional and Research Review – Week “9” Quiz Given the method: public static boolean testPlayerGuess(String myString, int min, int max) the statement below is valid while (!testPlayerGuess) True False A while(condition) must always evaluate to… True or False testPlayerGuess returns a boolean. What’s up with the “!”. Is this legitimate? Office of Instructional and Research Methods – How Do We Use Them? Scope or Visibility • Public – global availability • Private – only available to this class • Protected – available to this class and inherited classes • (default) Friendly – available only within current package public static int loopOfMath (int x, int y) Office of Instructional and Research Methods – How Do We Use Them? Retention • Final – unchangeable through inheritance Usability • Static – can be referenced without creating the class • Abstract – must be redefined • Native – written in C, but accessible in Java public static int loopOfMath (int x, int y) Office of Instructional and Research Methods – How Do We Use Them? Return_data_type • Only primitive data types • Return varName; Parameter_list • May include zero or many datatype varName pairs • Primitive data types or objects (such as arrays) can be passed. public static int loopOfMath (int x, int y) Office of Instructional and Research Review – Week “9” Quiz The following method requires a return statement: public static boolean getPlayAgain() True False public static void getFizzOrBang( int x ) True False Office of Instructional and Research Review – Week “9” Quiz volatile while What type of value does the following method return ? public static int getRandomNum( int min, int max ) A. boolean B. float C. integer D. none What type of value does the following method return ?...
View Full Document

This note was uploaded on 02/20/2012 for the course 547 202 taught by Professor Crosbie,w during the Fall '08 term at Rutgers.

Page1 / 51

20111107 - Office of Instructional and Research Week 10...

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

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