assignment4-fall11-specification - CSc335 (OO Design and...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Assignment 4 Fall 2011 1 Assignment 4: JavaBoy, p art 2 Objective: Inheritance Assigned: 09/15/2011 in class Due: 09/25/2011, 23:59 PM Overview: In this assignment you will use sub-classing to explore inheritance. It will be based on the battle system that you started in assignment 3. This will put everything together to create a self-sufficient working system. The UML class and sequence diagrams are available in separate files. Design: This assignment will build off of the previous assignment, so you'll need to use your previously written classes. If you feel that you did poorly on the previous assignment, you are welcome to use a base code that will be provided to you on d2l (available only after Sept. 18). Non-trivial Method Details: In the class Shockwave : Shockwave( Integer ) Sets this Shockwave 's team to the passed value, its location to null, and delay to 17. getDamage() Returns 10. getMove( SafeBattleField ) Red Shockwave s return a Point that is one space to left of the Shockwave 's current location , while blue Shockwave s return a Point that is one space to the right. In the class Bullet : Bullet( Integer ) Sets the team to the passed value, location to null, hasAttacked to false, and delay to 1. getDamage() Returns 2. getMove( SafeBattleField ) Red Bullet s look for the closest blue Obstacle on the same row, and return a Point that matches the Obstacle' s coordinates. Blue Bullet s do the same for red Obstacle s. If no opposing Obstacle s were found on the same row, null is returned. If the Bullet has attacked, null is returned. In the class
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/28/2012 for the course CSC 337 taught by Professor Johnson during the Fall '11 term at University of Arizona- Tucson.

Page1 / 4

assignment4-fall11-specification - CSc335 (OO Design and...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online