Thursday, November 19, 2009

ICA-CP: 11/23/09 Internet Detective Agency

Hello from far away!

So, you have a sub today because I'm not teaching at ICA any more. But, I am here to haunt you (oh, it's Thanksgiving and not Halloween any more . . .) anyway. For today, do the Internet Detective Agency web quest at: http://imet.csus.edu/imet6/clingingsmith/html%20-%202nd%20tier/iMET6/WQ/IDA/IDA-Introduction.htm

ICA-CP: 11/19/2009 - Farewell!

Good morning!

This is our last class session together. So, it's your last chance to turn-in all of your missing assignments. I'm missing 3 parrot programs, 7 Thanksgiving gadget blogs, plus assorted other projects. CHECK YOUR POWERSCHOOL CLASS GRADE TODAY, PLEASE! It's your last chance to get a grade for a project from me.

Tuesday, November 17, 2009

Summary of Object Oriented Programming class 11/17/2009

Greetings!

This is a summary of what we covered in class today. The three major object oriented programming concepts are: inheritance, polymorphism, and encapsulation.

(1) Inheritance: ICA is a superclass (or parent) for Class2013, Class2012, Class2011, and Class2010 (which are subclasses or child classes). Each of the classes has attributes which describe the class. For example, the parent class of ICA has attributes of Teachers, Uniform, Mascot Sports, Classes, Colors, and Students. The child classes inherit those attributes.

(2) Polymorphism: However, the child classes may have attributes which override the inherited classes as well as additional attributes. For example, the seniors (Class2010) and juniors (Class2011) each have attributes of class sweater which override the regular burgundy sweater inherited as part of the uniform from the parent, ICA. They also have class ring attributes which do not exist in the parent, ICA.

(3) IS-A and HAS-A: The relationship between parent and child classes is called an IS-A relationship. For example, Class2010 IS-A ICA, and Class2011 IS-A ICA. The classes have attributes which describe the class. The relationship between a class and its attributes is a HAS-A relationship. For example, we would say that Class2010 HAS-A class sweater, and Class2011 HAS-A class ring. To summarize: HAS-A refers to attributes; IS-A refers to the relationship of subclass to superclass. Having an IS-A relationship implies that the subclass inherits attributes from the superclass. In our Java programs, attributes often become variable names. Attributes may also become names of methods.

(4) Instantiating: We can talk about next school year's incoming freshman, Class2013. We know they will inherit attributes from the parent class, ICA, such as Teachers, Uniform, Mascot, Sports, Students, Colors, and Cafeteria. We know that they will have additional attributes of Big Sisters, Orientation Day, Frosh Folly, Colors, Song, and Welcome Dinner. However, we don't yet have any students in the Class of 2014. We don't have "real" students yet. When we do, we instantiate an object in Class2014. Until that time when we have an actual person in Class2014, the Java class of Class2014 is just a template. Another example is a recipe for Brownies. The recipe is the template, the description of the brownie. Once we make and bake the brownies, we instantiate them. We make them "real." Just like you can't eat a brownie until you actually make the recipe, we cannot instantiate a class until we have a real object in the class created by using the new Java command. An example of using the new command to instantiate an object is the following line we used in our Parrot class:

KeyboardReader new rr;

The keyword new creates space in the memory of a computer. So, a brief survey of computer components:Memory - is like our memoryCentral Processor Unit or Microprocessor - is like our brainInput/Out Devices - are like our senses. Examples of Input devices are webcam, keyboard, mouse, and microphone. Examples of Output devices are speakers and monitors. Hard drives (which is extra storage in addition to Memory), touch screens, and flash disks are example of Input and Output devices. When Java programs run, space is created for them in memory. When we use the Java command new to instantiate an object, a spot in the space reserved for Java programs is created in the computer's memory.

(5) Encapsulating: Hiding the details. For example, we don't care about the electronics of how our cell phones are able to call other people. We just want to call home or our friends. Using our ICA example, moms who come to the Mother-Daughter tea just come to enjoy the event. All of the preparation details are hidden from them so they may relax and enjoy.

Monday, November 16, 2009

ICA-CP: 11/16/2009 - The Vote

Good morning!

So, you voted for completing the Karel the Robot assignments instead of working on the Eliza program. Given your vote, here are the due dates for the Karel assignments:

Karel #6 - due today by the end of class
Karel #7 - Due tomorrow, 11/17/2009
Karel #8 - Due Thursday, 11/19/2009

Everything needs to be turned into me by noon on Friday, 11/20/2009, in order to get credit.

Friday, November 13, 2009

ICA-CP: 11/13/2009

Happy Friday the 13th!



Here's the link to all of the Karel the Robot worlds: http://lesson.taskstream.com/lessonbuilder/v.asp?LID=ukzqhmz1hiz6cgzk

Sunday, November 08, 2009

ICA-CP: 11/9/2009

Greetings from San Antonio!

Ms. Cottrell will be substitute teaching for me today. Tui, please do check-in.

Please read Karel the Robot tutorials number 9 and 10. In tutorial number 9, there are instructions for completing assignment #5. The instructions for assignment #6 are in tutorial number 10. Today, finish assignment #5 and print out your source code and execution window to receive your 25 points. Be sure to put your name on your papers before giving them to Ms. Cottrell. After completing assignment #5, do assignment #6. In assignment #6, you make your own turnRight command (remember? Karel only knows how to turn left.).

Here's a link to our lesson plan for today which has the tutorials and Karel worlds for assignments #5 and #6 attached: http://lesson.taskstream.com/lessonbuilder/v.asp?LID=pshsh1cczgf2cvhf

See you all on Friday the 13th!!!

Tuesday, November 03, 2009

Question of the Week #7 - Thanksgiving kitchen gadgets

[This Question of the Week is due on Monday, 11/9/2009, by midnight. It must be at least 250 words in length.]

Background: There are new kitchen gadgets for cooking every Thanksgiving. Some of them replace existing kitchen gadgets like a frying pan with a built-in digital thermometer. Others are new like a spice gun.

Question of the Week:
What high tech kitchen gadgets are available for Thanksgiving AND what makes them high tech? Identify at least 5 gadgets and explain the electronic component that makes it high tech as well as better than the originals (if applicable). For example, a digital thermometer replaces a turkey popup -- what makes it better and what part is high tech (like the readout)?

ICA-CP: 11/2/09 - Add while loop and TerminalIO to Eliza

Good morning!

Today, please add the code from the Parrot program that would allow your Eliza program to accept keyboard input and to stop running when the user types the word, "Halt". Our next class, on Friday the 13th, we will add the "if" code to your println statements. On Monday, 11/9, when I'm not here, please do Karel the Robot assignment #5. Also, this week, we have a question of the week.

Thursday, October 22, 2009

ICA-CP: 10/22/09 - Test Re-take and continue with Parrot

Good morning!

Here's the link to our test re-take: http://www.quia.com/quiz/2002389.html

Today is our last class of the quarter. So, I need the Parrot program and Karel assignment #4 completed today. Also, any blogs which you might want to make-up are due by midnight tonight. If you need more time for blogs, you can arrange it with me.