The Bronx High School of Science, Mathematics …



The Bronx High School of Science, Mathematics Department

Valerie Reidy, Principal Rosemarie Jahoda, A.P. Mathematics

Computer Science Projects (MCS2)

MCS2 PROJECT LIST 3 – SPRING 2011

The following are the tasks that you will be expected to complete for this project:

1) DrawRectangleLEDThumbwheel:

a. Much like drawSquareLEDThumbwheel, this task will:

i. use the thumbwheel output to determine the measure of the length of the rectangle, and calculate the width of the rectangle to be ½ the measure of the length

ii. For the left motor:

1. If the power is greater than zero, turn the first user LED on, and the second off

2. If the power is less than zero, turn the second user LED on, and the first off

3. Otherwise, turn both the first and second LEDs off

iii. For the right motor:

1. If the power is greater than zero, turn the third user LED on, and the fourth off

2. If the power is less than zero, turn the fourth user LED on, and the third off

3. Otherwise, turn both the third and fourth LEDs off

iv. On a call to the stop() method, turn ALL LEDs off

2) FoxDraw or TurtleDraw:

a. Have the robot outline the letters “F-O-X”. The “O” must not be a square, but an oval. See me in class for further details.

OR

b. Have the robot draw the outline of a turtle. Again, see me in class for further details.

3) Additionally, you will implement code (using a conditional or switch block) that will allow the user to use the STOP button to cycle through a list of four tasks:

• The two new tasks stated above

• The two tasks that you utilized for Project List #2

The robot will display a very short description of each task on the first line of the LED screen, each time the STOP button is pressed. Upon pressing the START button, the robot will execute the task.

Your program should demonstrate knowledge of the following concepts through comments within the code:

1) Declaring and initializing primitive and object reference variables

2) The difference between primitive data types and object reference variables.

3) Control structures.

4) Polymorphism

5) Arithmetic operations

6) Generic methods

a. Note: All tasks should be formed using generic methods (at least one parameter).

You will also be expected to:

• Produce detailed pseudocode for your project. This pseuodcode must be submitted no later than Tuesday, May 17th at 11:59PM.

• Demonstrate on the robot that all project requirements have been satisfied in class or in SGI.

You will also be graded on your participation in the group’s effort to complete the project. This will be based upon my own observations. All group members are expected to take an equal role in completing the project. Keep in mind though that the comments within the code should be your own work. Copying your partner’s comments in considered plagiarism, and will be dealt with appropriately.

This demonstration and code is due no later than WEDNESDAY, MAY 25TH, at 11:59PM, via Dropbox.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download