Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Learning objectives: Gain practical understanding of interfaces and inheritance. Understand how to submit assignments to CodePost. Directions 1. Download and extract the folder sample_tenplate. zip.
Learning objectives: Gain practical understanding of interfaces and inheritance. Understand how to submit assignments to CodePost. Directions 1. Download and extract the folder sample_tenplate. zip. The folder is found under BeachBoard : Content s Module 1 Sample Project. The folder contains the following files: - MobileCritter.py - contains the MobileCritter interface. - Insect.py - contains a fully-implemented superclass called Insect. - Ant - py-contains an incomplete subclass of Insect that must implement the MobileCritter interface. - Spider.py - contains an incomplete subclass of Insect that must implement the MobileCritter interface. - Board.py - contains a fully-implemented class called Board. - main.py - contains the complete implementation of a game that uses Ant and Spider objects. 2. Implement the Ant and Spider classes so that they fulfill the operations described in the documentation of the listed methods. 3. Test your implementation by running nain.py and playing the game. Submit to CodePost Read the directions for submitting on CodePost that are found under BeachBoard s Content : Course Resources s Project Resources s Submitting Your Work to CodePost. Then, submit the following files to the appropriate CodePost folder: - Ant.py - Spider.py Edit Format Run Options Window Help rom MobileCritter import MobileCritter rom Insect import Insect lass Ant(Insect, MobileCritter): Spider.py - E:\Download \ sample_template \ Spider.py (3.10.6) File Edit Format Run Options Window Help from MobileCritter import MobileCritter from Insect import Insect class Spider(Insect, MobileCritter): def move_right (self): "" "moves this spider's position 1 unit right"" " \# todo raise NotImplementedError() def move_left(self) : "" moves this spider's position 2 units left"" \# todo raise NotImplementedError() def move_up(self): "" "moves this spider's position 1 unit up"" " \# todo raise NotImplementedError() def move_down(self): "" "moves this spider's position 2 units down"" \# todo raise NotImplementedError() def _str__(self): return u'\ulf577' Learning objectives: Gain practical understanding of interfaces and inheritance. Understand how to submit assignments to CodePost. Directions 1. Download and extract the folder sample_tenplate. zip. The folder is found under BeachBoard : Content s Module 1 Sample Project. The folder contains the following files: - MobileCritter.py - contains the MobileCritter interface. - Insect.py - contains a fully-implemented superclass called Insect. - Ant - py-contains an incomplete subclass of Insect that must implement the MobileCritter interface. - Spider.py - contains an incomplete subclass of Insect that must implement the MobileCritter interface. - Board.py - contains a fully-implemented class called Board. - main.py - contains the complete implementation of a game that uses Ant and Spider objects. 2. Implement the Ant and Spider classes so that they fulfill the operations described in the documentation of the listed methods. 3. Test your implementation by running nain.py and playing the game. Submit to CodePost Read the directions for submitting on CodePost that are found under BeachBoard s Content : Course Resources s Project Resources s Submitting Your Work to CodePost. Then, submit the following files to the appropriate CodePost folder: - Ant.py - Spider.py Edit Format Run Options Window Help rom MobileCritter import MobileCritter rom Insect import Insect lass Ant(Insect, MobileCritter): Spider.py - E:\Download \ sample_template \ Spider.py (3.10.6) File Edit Format Run Options Window Help from MobileCritter import MobileCritter from Insect import Insect class Spider(Insect, MobileCritter): def move_right (self): "" "moves this spider's position 1 unit right"" " \# todo raise NotImplementedError() def move_left(self) : "" moves this spider's position 2 units left"" \# todo raise NotImplementedError() def move_up(self): "" "moves this spider's position 1 unit up"" " \# todo raise NotImplementedError() def move_down(self): "" "moves this spider's position 2 units down"" \# todo raise NotImplementedError() def _str__(self): return u'\ulf577
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started