Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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

ID: 3902673 • Letter: W

Question

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.


Explanation / Answer

#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;

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote