Seems like minions make everyone smile, and this week they gave me an idea……writing pseudo code for polymorphism in APCS-A. My CS-A class has arrived at our Unit 14, OOP Polymorphism. This is not our first rodeo with OOP or polymorphism but is a revisit with more lab application. Because of some effective labs completed on class methods in the fall, I believe that my group has a nice understanding of using methods which will make this activity smooth. Here is how we worked with psuedo code and minions to plan a massive MORPH.
Step 1: Each student selects a color printed image of a minion. These are available in THIS PPT FILE minions.pptx or you may certainly make your own. Any topic would work but I chose minions — smurfs were my other idea but I like minions better than smurfs so the yellow guys won out.
Step 2: Discuss polymorphism as you would in context of your curriculum, text or resources. We use primarily the Exposure Java curriculum which utilizes graphics to teach many concepts. My class will review the idea of “morphing” squares in various colors on a graphics app by overloading the color and location of x, y placement. See below from the Unit 14 slides and program code — students would “play with this code” to morph more shapes in various colors and locations.
Step 3: Each student is given a printed copy of one minion. Using their minion the student will use a 2-page spread in his/her javaJournal to complete the following in psuedocode ~
a. Name the minion with a class
b. write pseudo code methods to create the minion as shown in the image
c. write pseudo code to “morph” the minion into 5 variations of himself with overloaded alternative outcomes
d. write a random method that will place the morphed minions in locations on the app viewer
Step 4: Take a photo of the completed pseudo code in javaJournal for submission of this activity.
Follow up to the activity: Students will complete 3 labs that involve polymorphism and will be able to refer to their squares and minion pseudocode for planning and execution of those lab projects.
Advanced Application Option: Students will be allowed a bonus option to create a morphed squares (or similar) adaption that uses random RGB numbers for color selection, random placement on the display and receives user input for the number of squares to display. This must be done outside of class and a few days will be given.
My objective for this class activity is to have student think through the usefulness of morphing with a more complex object than a square. Because our prior class methods work involved creating graphical items, I believe this will extend that prior knowledge. Student samples of our pseudo code morphing are provided below.
Happy Hump Day, Jill
Reflection & Student Samples:
This activity went really well with my students. The students were able to connect prior knowledge about using class methods in Java to this pseudo code activity on morphing. Thinking about how to morph and override allowed a low-stress application of OOP.
Here are their javaJournal samples of work in progress and completion.