The PoopleMedic - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

The PoopleMedic

Description:

... PoopRat and PoopSub before attempting to program the medic. ... An explanation in plain English, structured English or Java will not be given for the medic. ... – PowerPoint PPT presentation

Number of Views:36
Avg rating:3.0/5.0
Slides: 8
Provided by: FIN69
Category:

less

Transcript and Presenter's Notes

Title: The PoopleMedic


1
The PoopleMedic
The PoopleMedic will introduce you to some ideas
about Object Oriented Programming in Java. You
have to program the ambulance to reach the
patient before they die. The PoopleMedic is the
most complex of the pooples and you should be
familiar with the PoopRat and PoopSub before
attempting to program the medic.
2
The PoopleMedic main area
The ambulance is driving through a city with a
regular grid of roads. Avenues run east-west
(left-right) and are numbered from 1 to 18 from
north to south (top to bottom). Streets run
north-south (top-bottom) and are numbered from 1
to 18 from west to east (left to right). All
roads are one-way as shown by the arrows. If you
attempt to drive the wrong way down a road, you
will crash The ambulance in the picture is at
12th (avenue) and 4th (street).
3
The PoopleMedic status areas
This area is showing the current location of the
ambulance in blue. The location of the patient
does not change and is shown in red. Below this
the directions to the patient North, South or
equal and East, West or equal. The patients
vital signs are shown, if they reach 0 the
patient will die.
This area is showing a map of the city. The
current location of the ambulance is shown in
blue. The location of the patient, which does not
change, is shown in red.
4
The PoopleMedic command area
There buttons on the command area operate in
exactly the same way as the same buttons on the
poopRat and poopSub.
5
The PoopleMedic actions
There are two actions turnToFace( which
needs a direction and move( which needs a
number
When a direction is needed the direction
pull-down becomes available. A direction can be
chosen from the list.
When a number is needed the How far area becomes
available. A number can be typed in.
6
The PoopleMedic booleans
When a boolean is needed (as part of an if or a
while the booleans pull-down becomes available.
The booleans are isFacing( which needs a
direction and is true if the ambulance is facing
in that direction. canMove( is true if the
ambulance can move without crashing in its
current direction. isPatient( which needs a
direction and is true if the patient is located
in that direction. reachedPatient( is true if
the ambulance has reached the patient.
7
Programming the PoopleMedic
Programming is a problem solving activity. The
techniques and ideas that you were given when
working with the poopRat and the poopSub can be
adapted for use with the poopMedic. An
explanation in plain English, structured English
or Java will not be given for the medic. Good
luck and remember the patient might die if your
program does not work!
Write a Comment
User Comments (0)
About PowerShow.com