potatoHead objects put the O in OOP!

This week it was time to introduce the O in OOP, and O is for “objects” so that led me to think about the Mini-STARter lessons that Sandy, Crystal and I collaborated about last summer.  [Find the great ideas in Mini-STARter Lessons for CS-A HERE if you teach CS-A and want to inject a little flavor and fun.]    I wanted to do MarshmallowMan on Tuesday but realized that my students had not yet been introduced to the concept of objects plus we were out Monday thanks to big bad Irma sweeping through Alabama and had a delayed 10 a.m. school start Tuesday morning.  UGG!    Plan B for the week meant no time to make mallowMen (yet!) but perfect time to tweak the lesson and use my stockpile of Potato Heads.  If you don’t have Potato Heads in your cabinets, NO WORRIES because this lesson can easily be adapted to 3 of anything — football teams, super heroes, Matchbox cars, Barbie dolls, sports or soda drinks, candy bars.  Just 3 of some things that are of the same object.

Tuesday I tried a basic, guided introduction to objects, it went really well, and I felt you might benefit from my sharing what we are doing this week to master the O in OOP.  Let me say that objects introduction is not something I feel that I’ve executed well in past years.  It has been hard for me to figure a way to explain the need for and use of objects well along with providing examples that are clear.  Add to this is the concept and time in past years where students either “get it” or “glaze over” and I want everyone to accomplish the former.

This year I determined to regroup and use unplugged, focused basics to shore up my shortcomings and do better than I’ve done before.  My go-to lesson introduction is unplugged and engaged.   Unplugged lessons allow focus on the computer science concept and pay high yield in understanding — concept before coding is beneficial every single time for every single student IMHO.  Getting students to digest the concept before being busy on hammering out code is a teaching strategy that benefits the CS learner.  Now that you know the why, here is the what.  Please tweak, improve, make your own and be an OOP rock star!

Introducing Objects Lesson Activity

Before class (teacher preparation):

  1. Obtain 3 objects to display and use as guides in the syntax of foldable
  2. Download, review, revise the potatoHead Mini Lesson files
  3. Print each student a UML diagram and foldable for the lesson
  4. Label your foldable guide as directed in the lesson plan instructions — this makes it easier to help students label their foldable while analyzing the code segments
  5. Select another project that uses objects to distribute after completion of the activity so students can apply this new concept to other syntax and object construction.  I found one about Cars that has 3 different cars with types, miles per gallon, etc.  Look in your curriculum or text resources to have copies ready for distribution in order to connect the concepts

NOTE:  Goofy was my default potatoHead() first object; the second and third objects were other Potato Heads constructed by two students who arrived early to class

Say hello to potatoHead second and third!

During Class (student direction and engagement):

  1. Instruct student NOT to log on as this will be an unplugged CS-A day 🙂
  2. Instruct students to obtain one UML handout and 1 foldable handout then to get a pen or pencil
  3. Guide students to fill in the labels to each portion of their foldable as shown below and to notice the syntax behind each folded section; lead whole class discussion to discuss new terms, familiar and unfamiliar code
  5. Guide students to complete the UML diagram for the potatoHead class
  6. Have students add these items to their javaJournals for use later in the week and course
  7. Distribute sample code of another objects project for whole class analysis and discussion; lead students to identify the object names, types of instance variables, methods and output

Next 2 days suggested partner project:

Day 1:

  • Distribute to partner pairs >> Class-Methods Partner Objects Activity
  • Guide students to work collaboratively to design a class that has six (6) objects each with 5 data attributes
  • Have students write a handwritten UML diagram for their planned project

Day 2: 

  • Have students work in pair programming to code their project in Java submitting a UML diagram (via the editor), source code and output of their toString or results method

Assessment using marshmallowMan:

Assess each student’s individual understanding by having the student individually create in UML, code,  and marshmallowMan object.  Review the marshmallowMan lesson in the Mini STARter projects linked above and use it to develop a performance-based assessment.

My intention is to display and give the default marshmallowMan on the document camera while instructing students to use the provided food items (Twinkies, Rice Krispy Squares, Little Debbie cakes, M&Ms, icing, etc.) to construct then code their own second object.  They must submit their code in free response format along with a picture of their object before they can eat the snack and candy.

The format isn’t fully worked out in my mind yet but my thought is to provide partial code on paper by editing the foldable page and making the font larger leaving out sections while providing others.  I don’t expect full memory yet but do expect students to be able to create instance variables, objects, gets and sets, toString statements.   See what you believe reasonable and make it fun while holding them accountable for learning how to create and use objects.  You know your students 😉


I hope you have fun teaching and learning about OOP this year.  Use Potato Heads, candy, and whatever works to help students engage with this major concept in the CS-A course.

Take care and be blessed, Jill


Leave a Comment