Lab 18 :: Bee Critter - DUE: MEOM Thu. 4/2

This is just a formal declaration of the due date for Bee Critter. The assignment is given as the last exercise in the GridWorld intro in the previous post.

Here is the assignment (copied for your convenience):

A Bee is an actor that acts as follows. First the Bee makes all the Flowers in the neighboring locations brighten their color. After that, the Bee moves to a randomly picked neighboring location that contains a Flower or, if no adjacent Flowers have been found, to a randomly picked empty neighboring location. If there is nowhere to move, the Bee stays in its current Location. If the Bee moves onto a Flower, it saves that Flower and restores the same Flower when it moves away from that location.

You should implement the Bee by extending Critter.

Please submit a blueJ project with Test class that has a main method that demonstrates your Bee working properly.

Grid World Immersion - Mar. 4, 6

This essentially comprises an actual laboratory exercise. You will not have to turn most of this in, but you will need to show evidence that you did it.  If you don’t do this then you will be totally lost when we do more advanced work with the Grid World which you will have to turn in.

There is ONE exercise you must do, and you will have to turn in called “Bee Critter” which is the last problem listed in this post.

With that introduction, here you go….

1. Here is the Grid World Student Manual.
Please don’t print it out - it’s not worth it.

2. Notice that I’ve added the Grid World API documentation to the sidebar on the right.

3. Download the Grid World Code and unzip it.
This is a slightly modified version of the code that comes from the College Board. I modified it so that the sample projects are actually BlueJ projects that will work without modifying your blueJ setup. We’ll talk more about what’s in here at a later time - feel free to explore on your own though.

4. Open the blueJ project called “firstproejct” which can be found in GridWorldCode->projects->firstproject. Compile it and …

STUFF YOU HAVE TO DO:
(Note: when I say “read” below I mean read what you need to. I would recommend first looking at what you have to do and then looking through the reading to find answers to your questions. If you’re the kind of person who likes to read from front to back, then by all means, do that.)

1. You’re now ready to begin READING (YEA!) Part I of the student manual. Do take the time to mess around with the stuff that’s introduced in Part 1.

2. Read part 2 - it refers to “BoxBug” project which can be found in the same folder as the firstproject. As you read at least think about the “Do you know?” questions as you go through it.
DO EXERCISES: 2, 4

3. Read Part 3 and DO the “group activity” - writing the Jumper class and JumperRunner - on your own. There is no example project for this one. You can either make a new project (make sure to include a +Libs folder with gridworld.jar file in it) or just write it into the last project your had working.

Read the “What makes it run?” section at the end of part 3.

4. Read Part 4 CAREFULLY.  Critters are sophisticated little buggers and the AP folks love to use them to test your proficiency and facility with Polymorphism.

Many of the examples and exercises in part 4 refer to code that’s written in the text or in an appendix.  You should be able to copy/paste this code into a project without too much difficulty.  You can write the code for these exercises into a new project or an existing one — you just have to import the right stuff to get it to work.

4.1 In part 4 they give the code for CrabCritter, but it would be a good exercise to try to produce it yourself - or even re-produce after looking at the code in the PDF.

DO: Exercises 1 or 2, and exercise 6.

Also DO this problem (this one you will have to turn in):

A Bee is an actor that acts as follows.  First the Bee makes all the Flowers in the neighboring locations brighten their color.  After that, the Bee moves to a randomly picked neighboring location that contains a Flower or, if no adjacent Flowers have been found, to a randomly picked empty neighboring location.  If there is nowhere to move, the Bee stays in its current Location.  If the Bee moves onto a Flower, it saves that Flower and restores the same Flower when it moves away from that location.

You should implment the Bee by extending Critter.

Lab 17 :: BST Map - Due: MEOM Mar. 6 (modified)

Implement the AP Map interface. Assignment is given in the README of the starting project.

Starting Project: Lab17_BSTMap_studistro.zip

Quiz 4 :: Big-Oh Basics Posted — Due MEOM -5, Wed. Feb. 25

Quiz 4 has been posted on the moodle site.

Enjoy!

Lab 16 :: BST Set - Due: MEOM Thursday, Feb. 26

Assignment Sheet: is contained in the README in the starting project.

Starting Project: Lab16_BSTSet_StuDistro.zip

Homework :: Tree Terms - Due in class, Fri. Feb. 20

The worksheet on Tree terminology is to be handed in at the beginning of class on Friday.

Lab 15 :: Searching and Sorting - Due: MEOM Feb. 19

Assignment Sheet: There isn’t one!  The assignment is written into the README and comments of the starting project.

Starting Project: Lab15_SearchingSorting_stuDistro.zip

HW :: Reading from Green Book

Please read the following from the green Lewis, Chase, Sudol book.

Read:

Review: Binary Search: pp. 168-170

New: Sorting Algorithms (insertion-, selection-, bubble-sort): pp. 170-178

Do:

1. Know the differences and similarities between the three different sorts: Selection Sort, Insertion Sort, Bubble Sort.  These should be familiar to you from our first days of school.

2. Be prepared to act out the algorithms with playing cards on the chalk board - seriously, I’m going to put the cards up on the board and call on someone to act it out.

3. What are the Big-Oh running times of each of the sorts?

4. In the long term, you should be able to hack out some generic code for these sorts.  Try your hand at it by just thinking about the algorithms and how they work.

Quiz 2::ArrayList, Iterator, ADTs - closes Friday, 10:40am

A new quiz has been posted on the moodle site.  You must take it by Friday, 10:40am.

Lab 14 :: Linked List Implementation - Due. MEOM Tue. Feb. 3

Assignment Sheet: Lab14_LinkedList.pdf

Starting Project: Lab14_LL_StuDistro.zip