Write the code in particlesbasecode file it should be a s


Write the code in particlesBaseCode file. It should be a (.s) file, but I cannot upload a (.s) file.?

?Basely, you translated the C++ program into a MIPS assembly language. From particles.cpp to Baseparticle.s file.

There is a red particle and a green particle in a box.

The box has (x, y) coordinates 0 <= x <= 10, 0 <= y <= 10.

The user enters initial (x, y) coordinates for the two particles. The velocity of a particle is given as an (x,y) pair, where each coordinate is the distance the particle moves in that direction, in one cycle. Initially, the red particle starts with velocity (1, 1), and the green particle starts with velocity (-1, -1).

The program simulates the movement of the two particles. When a particle reaches a wall, it will bounce off the wall. When the two particles are too close together, they will collide and the simulation will end.

Each particle is represented by an array of four ints. Element 0 and 1 are the (x,y) coordinates of the particle. Element 2 and 3 are the (x,y) velocity components of the particle.

You must translate the update() function, Write the function exactly as described in this handout.

Do not implement the program using other algorithms or tricks.

Do not even switch the order of the arguments in function calls; you must follow the order specified in the C++ code.

Attachment:- Assignment Files.rar

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Write the code in particlesbasecode file it should be a s
Reference No:- TGS02301395

Expected delivery within 24 Hours