Question

Write an application using an appropriate language, such as C++ or C#. The application will simulate...

Write an application using an appropriate language, such as C++ or C#. The application will simulate a scenario in which objects interact in a virtual environment, while also recording data for later analysis. The scenario is somewhat silly, but the important aspects to focus on are that it works and that data is recorded.


Imagine a world, 20 units wide by 20 units tall, where sentient creatures called splurbills sprout from the ground, one inch tall, and grow to enormous sizes at the rate of one inch per unit of time, never moving from their initial location. Splurbills grow best when they’re not being observed, so their natural enemies in this environment are flying beasts called tablioks. Tablioks have dozens of eyes, and move in linear paths at the rate of one world unit per unit of time. When tablioks encounter a boundary, they adjust their course, essentially bouncing around the 20x20 environment. A tabliok has a visual radius that extends a distance of five units in every direction. When a splurbill is visible to a tabliok, it grows at 50% its normal rate.


Given this scenario, develop an application that places six splurbills at random locations in the world, as well as one tabliok to observe them. Please note that your application does not need to represent these elements visually – they can be “observed” entirely in your computer’s memory! Each simulation should run for one thousand units of time. During the simulation, record the amount of time that each splurbill has spent under observation by a tabliok.


When a simulation ends, the height of each splurbill should be displayed, along with its position (X and Y coordinates) as well as the amount of time it spent under observation.


If it helps, the Linear Path can be diagonal.


0 0
Add a comment Improve this question Transcribed image text
Answer #1

#include<iostream.h>

void main(){

int a[100];

int splurbills=1;

int tablioks;

while((tabiloks!=20*20)&&(splurbills<20)){

tabiloks=3.14*(5^2);

if(tabiloks==splurbills){

splurbills=splurbills+0.5*splurbills;

}

}

//height of splurbills//

cout<<splurbills;

return 0;

}

Add a comment
Know the answer?
Add Answer to:
Write an application using an appropriate language, such as C++ or C#. The application will simulate...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • QUESTION: Please write a one paragraph lab report introduction based on the following experiment below: Organisms...

    QUESTION: Please write a one paragraph lab report introduction based on the following experiment below: Organisms must forage for food and other resources that are scattered around a heterogeneous environment. Food availability varies from site to site, but so do environmental conditions that foragers experience (e.g., temperature and wind) and the risks to which they are exposed. Foraging by any organism involves trading off the gains to be made by collecting food against the costs of doing so, including costs...

  • The following guidelines outline the basic template for a robot vacuum cleaner game. The game must be implemented in c programming language. It mimics a robotic vacuum cleaner. The code must only use...

    The following guidelines outline the basic template for a robot vacuum cleaner game. The game must be implemented in c programming language. It mimics a robotic vacuum cleaner. The code must only use the following libraries: #include <math.h> #include <stdlib.h> #include <string.h> #include <limits.h> and any .graphics and .timers libraries. The guidelines are outlined as follows: Terminal Set-up: you may assume that the terminal will be quite large, for example, on the order of 150×50, or more. Status Display: The...

  • Using the book, write another paragraph or two: write 170 words: Q: Compare the assumptions of...

    Using the book, write another paragraph or two: write 170 words: Q: Compare the assumptions of physician-centered and collaborative communication. How is the caregiver’s role different in each model? How is the patient’s role different? Answer: Physical-centered communication involves the specialists taking control of the conversation. They decide on the topics of discussion and when to end the process. The patient responds to the issues raised by the caregiver and acts accordingly. On the other hand, Collaborative communication involves a...

  • 1.- Based on the below reading, using Critical Analysis, based on the concepts of text, comment,...

    1.- Based on the below reading, using Critical Analysis, based on the concepts of text, comment, and answer What can we learn from the great business leaders? WHAT CAN WE LEARN FROM GREAT BUSINESS LEADERS? 2.- Depending on the below reading assigned, using Critical Analysis, based on the concepts of reading, comment on your optics regarding the last three paragraphs of the reading conclusions. WHAT CAN WE LEARN FROM THE BIG BUSINESS LEADERS? William Henry “Bill” Gates III was born...

  • Using the CNA Insurance company Knowledge Management scenario (below), carry out the following knowledge management assignment...

    Using the CNA Insurance company Knowledge Management scenario (below), carry out the following knowledge management assignment Questions after reading the scenario/essay: =============================================================================================================== For Gordon Larson, telling stories is all in a day's work at his job as chief knowledge officer at CNA, and that's just fine with executives at the Chicago-based insurance giant. Larson owes his job to a shift in corporate direction. Three years ago, under the direction of a new chairman, CNA set off on a new mission....

  • Q.3\ How could IT/e-banking assist an organization/ a bank to achieve a competitive advantage in the...

    Q.3\ How could IT/e-banking assist an organization/ a bank to achieve a competitive advantage in the marketplace? Explain through the case of Citibank. please make sure you give a unique answer (not copied one) ,Please no hand writing, and need references. This question is from ECOM 421 e-Business Strategies and Business Models course e-Business Strategy and Models in Banks : Case of Citibank E-business strategy in Citibank: Banks today are up-to-date with both the pros and cons of the internet....

  • e-Business Strategy and Models in Banks : Case of Citibank E-business strategy in Citibank: Banks today...

    e-Business Strategy and Models in Banks : Case of Citibank E-business strategy in Citibank: Banks today are up-to-date with both the pros and cons of the internet. They are aware of the opportunities and threats that are associated with the Web. Not a single traditional bank is brave enough to face investment analysts without an Internet strategy. But even a very thoughtful approach to the Web may do no good to the company/ organization. The main purpose behind launching online...

  • Team Conflict In a rare moment alone in her office, Jennifer Ames reflected on the past...

    Team Conflict In a rare moment alone in her office, Jennifer Ames reflected on the past 10 years of her career at BabyProduct Corporation (BPC). She could easily chart her successes: She had taken on challenges and produced results where her colleagues had failed; she had increased the diversity of the work force in every unit she had led; she had successfully launched new products and developed several new markets. In fact, just a few months before, Ames had been...

  • 10. Write a one-page summary of the attached paper? INTRODUCTION Many problems can develop in activated...

    10. Write a one-page summary of the attached paper? INTRODUCTION Many problems can develop in activated sludge operation that adversely affect effluent quality with origins in the engineering, hydraulic and microbiological components of the process. The real "heart" of the activated sludge system is the development and maintenance of a mixed microbial culture (activated sludge) that treats wastewater and which can be managed. One definition of a wastewater treatment plant operator is a "bug farmer", one who controls the aeration...

  • I need Summary of this Paper i dont need long summary i need What methodology they used , what is the purpose of this p...

    I need Summary of this Paper i dont need long summary i need What methodology they used , what is the purpose of this paper and some conclusions and contributes of this paper. I need this for my Finishing Project so i need this ASAP please ( IN 1-2-3 HOURS PLEASE !!!) Budgetary Policy and Economic Growth Errol D'Souza The share of capital expenditures in government expenditures has been slipping and the tax reforms have not yet improved the income...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT