Wednesday, December 11, 2013

Bluster, Stockpile and Giraffe Critters Now Due Friday at the End of Class

Due to the assembly, the due date for the critters is being pushed out one more day to Friday at the end of class.

Tuesday, December 10, 2013

Some Additional Hints on Giraffe Critter

I "borrowed" the following from an internet article:

Overriding the correct methods is an important part of this problem. As with all creatures that extend Critter, you must not override act.
GiraffeCritter gets a different list of actors to process than Critter, so it must override getActors. Specifically, GiraffeCritter gets flowers within NECK_LENGTH rows and NECK_LENGTH columns. You cannot get the list of actors to process in processActors since you would violate the postcondition when removing an actor that is not in the parameter actors.
GiraffeCritter processes actors differently than Critter, so it must override processActors. Specifically, GiraffeCritter attempts to eat a certain number of flowers and keeps track of how many flowers have been eaten. The postcondition of processActors permits the state of GiraffeCritter to be changed, so you can update the instance field that tracks how many steps the GiraffeCritter has been hungry.
GiraffeCritter moves differently than Critter, so it must override at least one of the methods that control movement. Overriding selectMoveLocation results in code that does not violate the postconditions of any method. Since the postcondition of selectMoveLocation prohibits changing the state of any actor, the private instance field cannot be updated. You cannot call removeSelfFromGrid in selectMoveLocation. Doing so would violate the postcondition that prohibits changing the state of any actor.
It is not possible to achieve the desired behavior without violating any postconditions by overriding only makeMove. The postcondition of makeMove requires that a call to getLocation immediately after a call to makeMove return loc (the parameter to makeMove). You cannot make a decision about whether to move or not in makeMove. You must move to the parameter loc.

Monday, September 30, 2013

Wednesday, September 25, 2013

Mystery Solved: Why the Zero Quarter Solutions Are Not Printing

It looks like the console window only keeps track of the last 100 lines or so. That is why the solutions with zero quarters (which did initially print) run off the page and cannot be located by scrolling back on the console window. You can get around this issue by setting the option for "Infinite Buffering" to be ON when the console window appears after the first time you run the program.

Monday, September 23, 2013

Spacing Problems on Practice It

Sometimes Practice It has trouble recoginizing the proper spacing. If it complains about this, you can ignore these errors. (If it says "FAIL", that error you cannot ignore.) But if you comes back with a yellow warning/error saying your spacing is wrong, you can ignore that and still mark in Juno that you got it right.

Mr. Sarkar

Friday, September 13, 2013

Clarification on the Timing of When Homework is Due

Any time you have homework due on a specific date, it is due before class starts. If there is no class that day, it is due before midnight of that day. So when there is no class on that day, you have the entire day to do it. But if there is class, you have to submit before the start of class.

The reason you have to get it done before class starts is because class will often start with a quiz on the homework topic.

Wednesday, September 11, 2013

Upcoming Exam on Identifiers

We will have an exam on Wednesday, 9/18 on Identifiers. You will be given 50 True/False questions asking which words are valid identifiers in java and which are not.

Please make sure you complete the corresponding JunoED.com lesson on identifiers before taking the exam.

After School Help

Help for computer science students is available most Mondays after school from 2:10 to 3:00PM in the computer lab (Room 507). If no students show up by 2:20, I usually go home.

Sunday, September 1, 2013

This Coming Week, We Will Have Class in Room 506 Instead of the Lab

The strange start to the school year featured 3 straight lab days for our class. So we ended up doing the "House with Sunrise" lab before we did all the prep work for it. But you still need all the prep work because the material is covered on the AP exam.

So we will have class both Tuesday and Wednesday of the coming week in Room 506. I realize it is a bit backwards but that is OK.


Tuesday, June 25, 2013

Summer Assignment for 2013-2014 AP Computer Science

Here is  a list of four tasks you have to do over this summer to get ready for our AP Computer Science class in the fall:
  1. Register for this blog. Sign up to be alerted in your email each time a new posting is added. (Add your email at the bottom, where its says, "Follow by Email."
  2. Post a comment on this blog introducing yourself, letting your peers know you have successfully registered.
  3.   We will use Juno for most of our on-line homework assignments throughout the year. Log into your already-created JunoED.com account using the temporary login code found on the June 24, 2013 post titled:

    Temporary Sign-Up Codes for Juno for Fall 2013 AP Computer Science

    below. Update your login and password as required the first time you log into JunoED.com. Then do all the summer assignments listed on Juno.  Hint: Although Juno works with Internet Explorer, it works much better with Chrome, Firefox or Safari. I strongly suggest you use one of these browsers.
  4. You must also download and install Java and BlueJ (both free) on your home computer or laptop. Java is the programming language we will be using in the course. BlueJ is a set of development tools we will use to help you learn Java. Both pieces of software work on both Windows and Apple machines. Instructions for downloading the software may be found on the following YouTube videos.
The first two videos, below, demonstrate how to download Java and BlueJ, respectively, on Windows machines. The third video teaches you how to download BlueJ on a Mac (Java already comes preinstalled on Macs).

            This first video will show you how to download Java on to your Windows PC or laptop:



        
             Also follow these instructions to download BlueJ if you own a Windows PC or laptop:





            Follow the following instructions for downloading BlueJ if you own an Apple PC or laptop:




All of the above need to be done before the first day of class or you will already be behind. Feel free to email me at csarkar@ci.stamford.ct.us if you have any questions. (Do not use the yahoo email listed on the top of this blog).

I am excited about teaching this course again starting in the Fall of 2013. Looking forward to meeting all of you.

Mr. Sarkar
csarkar@ci.stamford.ct.us
Westhill High School

Welcome to AP Computer Science for the Fall of 2013

Welcome to AP Computer Science for the Fall of 2013. We will use this blog as one of many ways to communicate. Initially, the summer assignment will be posted here. You can always contact me by email at csarkar@ci.stamford.ct.us. (Please do not use the yahoo email address listed on this blog).

Monday, June 24, 2013

Temporary Sign-Up Codes for Juno for Fall 2013 AP Computer Science

Below are the temporary sign up codes for JunoED.com


Student




Temp Code


Username


Last Login

Meredith Addison
1001-677-9971  —
Dmytro Andriyenko
2625-32-6463Dima 12346/20/12
Ferris Armstrong
1001-678-1671  —
Souleyman Bane
1001-679-1362  —
Casey Benzaken
1001-680-7680  —
Ashley Berland
2625-31-7191akb2466/15/12
Paul Blum
2625-24-7799Paul Blum6/14/12
Daniel Brace
1001-681-1812  —
Omar Calderon
6210-73-6832omarc1544/23/13
Alex Canella
1001-682-7216  —
Martin Chobanyan
1001-683-3997  —
Rema Fazal
6210-79-8557remafazal4/23/13
T.J. Finn
1001-684-0446  —
Shichang Guo
6539-99-6826shichang4/12/13
Erick Gutierrez
1001-685-3117  —
Mac Ira
1001-686-8710  —
Rachel Katz
1001-687-6482  —
Edgar Paulino
1001-688-9610  —
Maxwell Sabel
1001-689-6755  —
Kepler Siguineau
2625-59-595910897204/17/13
Matthew Yang
1001-690-3119  —