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

  Explaining multicategory case a set of samples

In multicategory case a set of samples is said to be linearly separable if there exists linear machine which can classify them all correctly.

  Elements corresponding to the inorder sequence

Suppose that you are given two sequences of elements corresponding to the inorder sequence and the preorder sequence. Prove that it is possible to reconstruct a unique binary tree .

  Compare performance-one-level split-two-level unified cache

Compare the performance (using AMAT) of a one-level split cache and a two-level unified cache system. For the one-level split cache, suppose a hit takes 2 clock cycles.

  Calculate total communication time required to retrieve rows

Calculate the total communication time required based on retrieving the 20 rows that satisfy the query conditions in a single message.

  Which service to select to achieve operational excellence

Consider not only costs but also such issues as delivery speed, pickup schedules, drop-off locations, tracking ability, and ease of use of the website. Which service did you select? Explain why.

  Explain findings-conducting internet search for for cde file

Network asminisrator mentions that other "CDE" files have been sent through the FTP server to another site. Explain your findings after conducting the internet search for "CDE" files.

  Explaining binary normalization shift-and-subtract

Convert input arguments to binary. Binary normalization shift-and-subtract.

  Representing information by predicate-calculus sentences

Represent this information by predicate-calculus sentences in such a way that you can represent the question Is there a member of the alpine club

  Explaining security risks for computing infrastructure

In your new position at XYZ Corporation, you have been asked to lead risk assessment team. As part of project to assess security risks for computing infrastructure.

  Hierarchy chart and then plan the logic

Draw the hierarchy chart and then plan the logic for a program needed by the sales manager of The Henry Used Car Dealership. The program will determine the profit on any car sold

  Explaining publication of material in foreign languages

Which of the given statements about publication of material in foreign languages is not right? it is competitive neccessity or it must be accurate.

  Task manager to recognize and troubleshoot problems

Which system resources are probable to be at root of problem? How can you use system tools, like the Task Manager, to help recognize and troubleshoot these problems?

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