{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

assignment4-fall11-specification

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

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

View Full Document Right Arrow Icon
CSc335 (OO Design and Programming) 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.
Image of page 1

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern