Ladybug extends class critter

Assignment Help Basic Computer Science
Reference no: EM13165155

Creature: Ladybug

Project Specifications:
Ladybug extends class Critter. It changes to the color of another critter (and only critters) that it approaches. When encountering a flower, it will change all of the flower colors to the ladybug's current color - if ladybug changes to a critter's green color, the flowers it touches thereafter will be green. When ladybug approaches a rock or the edge of the grid, it will turn 180 degrees around and go straight back.

            Defaults:

  • Starts at (5,5) on grid
  • Color is RED

Test Cases:

Test Case 1 - Operates like Critter

Test to see if it will run and move like a critter

Test Case 2 - Changing color to neighboring critter

It should change to its color once approaching it and remain its color until encountering another critter

Test Case 3 - Changing flower colors to current color

Ladybug should change all flowers that it encounters to the current color of the ladybug. Therefore, if ladybug previously encounters a blue critter and changes to blue, all of the flowers thereafter will be blue.

Test Case 4 - Turning 180 degrees around

Once ladybug hits the edge of grid or a rock, it will turn 180 degrees around and head straight back.

Reference no: EM13165155

Questions Cloud

Whether each of these proposed : Determine whether each of these proposed definitions is a valid recursive definition of a function f from the set of nonnegative integers to the set of integers. if f is not well defined state reason; If f is well defined, find a formula for f(n) ..
Which reactant is the limiting reactant : How many liters of NO(g) are produced when 0.85L of 2.00M HNO3 solution is added to 216 of Ag according to the equation. Which reactant is the limiting reactant?
Calculate the mass of chloroform the student : A chemistry student needs of 40 ml chloroform for an experiment. By consulting the CRC Handbook of Chemistry and Physics, the student discovers that the density of chloroform is 1.48g x cm^-3 . Calculate the mass of chloroform the student should w..
Allow the user to display a work history report : The 'report screen' shall:Allow the user to display a work history report for an individual or for all employees for the two weeks prior to the report request.
Ladybug extends class critter : Ladybug extends class Critter. It changes to the color of another critter (and only critters) that it approaches. When encountering a flower, it will change all of the flower colors to the ladybug's current colo
What is the total amount of nh4cl that will precipitate : one hundred grams of water is saturated with NH4Cl at 50 degrees celcius. According to table G if the temperature is lowered to 10 degrees celcuis what is the total amount of NH4Cl that will precipitate.
How many grams of glucose of the final solution : How many grams of glucose are in 100. rm mL of the final solution?
Find the smallest positive integer y : Find the smallest positive integer Y such that integer K great than or equal to Y, a postage of K cents can be formed using only 3-cent and 4-cent stamps. And prove that the Y value you find is correct
True or false on computer science : True or False 1. If a computer uses hardwired control, the microprogram determines the instruction set for the machine.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Finding content of ac and memory word at specified address

What are the content of the AC and the memory word at address 103 when the computer halts.

  Explain throughput and capacity for effectiveness of system

Do you agree or disagree that throughput and capacity are finding factors for effectiveness of system more so than processor speed?

  Explaining use of information technologies to act ethically

When it comes to use of information technologies, it is frequently difficult to find out how to act ethically. Consider some of your own use of information technologies.

  Ways to avoid communication pitfalls

Based on the section on "Watch out for communication pitfalls" in the Bateman and Snell text, describe some ways that Lei could have avoided this situation.

  Floating point numbers in scientific notation

Floating point numbers in scientific notation represents numbers as a base number and an exponent. For examples: 2E3, 2.0E12, 3.14E+12, 3.14E-12. Give a grammar that generates floating point numbers. Use your grammar to derive 3.14E+12.

  Calculate access time when there is cache miss

Calculate the access time when there is cache miss? Suppose that cache waits until line has been fetched from main memory and then re-executes for a hit.

  Why is it important to educate users about risks

what is a primary security risk that users should acknowledge when using macros? Why is it important to educate users of these risks once their dilemma is resolved?

  Verify local police department-s findings on firm-s case

Tension over case is running high in city. What do you require to ask police investigator for, and what procedures must you follow?

  What is the goal of information systems planning?

What is the goal of information systems planning? What are the steps of the traditional systems development life cycle? What is prototyping? What is an RFP? What is typically included in one? How is it used?

  Function prototypes lack parameters

These function prototypes lack parameters; add whatever parameters you feel are necessary so that the program works without global variables. The program's output should reflect the bus's actions by reporting each change in state, along with the n..

  What your research aims to do

You need to describe what your research aims to do, the objectives that need to be meet to get to the final aim, the context and technical background of the work and also why it is important that this work is carried out.

  Why information security is not factor for organization

But would not require to give for information security on those systems. Explain that environment and desribe why information security is not factor for that organization.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd