20111003

20111003 - Office of Instructional and Research Week 5...

Info iconThis preview shows pages 1–9. 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
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 5 Object-Oriented Programming Taking a brief look back ITI 202 Office of Instructional and Research This week: Monday More about methods() Last weeks quiz Team Coding Wednesday Quiz #3! More Team Coding Office of Instructional and Research Announcements Week 5 Blog Object Oriented Living As we continue to look through objects, Classes, and methods this week, take a minute to try and relate the concept to the world around you. What are some things that you interact with on a day to day basis? Those are most likely "objects". Can you put those objects into a "Class"? What are some "methods" that you might expect them to follow? Would those methods be common to the Class? Or specific to the object in question? Pick at least three "objects" and discuss. Blogs should be submitted by 11:59pm, Sunday October 9. Office of Instructional and Research Take a Minute Open up Sakai Open Eclipse and create a project named week5 Open Sakai and copy week4quiz.java into your \src folder for the project you created (eg c:\users\mwhittak\quizzes\src\week4quiz.java) Refresh your project view and make sure that week4quiz.java will execute successfully. Office of Instructional and Research Last Weeks Quiz The key to good Object Oriented Programming (OOP): Think! What? first then How? Has this been done before? Reduce. Reuse. Recycle! If you can plan ahead for the What? then the How? takes much less time. Office of Instructional and Research Do You Remember? That the answers to questions 1-12 were in the week4quiz.java? Add one loop: for (int i = 0; i < answerKey.size(); i++) { int answerNum = i +1; printAnswer(answerNum,answerKey.get(i)); } before System.out.println("This completes today's exercise."); How about question 13? Was the default condition in the Switch ever used? Why? Office of Instructional and Research So lets take a closer look at what we used import java.util.*; public class week4quiz { //if you've made your own it will still need to be called week4quiz /* * * @param args */ . . . Scanner myInput = new Scanner(System.in); // Do I need this? Office of Instructional and Research So lets take a closer look at what we used static int loopOfMath (int x, int y) { // Interesting nested loop that performs a variety of mathematical functions. int b = y; . . . return b; } static void printAnswer( int questionNum, String answer ) { // A clever method to print the answers to supplied questions....
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 / 35

20111003 - Office of Instructional and Research Week 5...

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

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