subject
Computers and Technology, 04.04.2020 00:12 2077087

Objectives: The software testing process (i. e., the BBT) consumes large amounts of data. Creating the test data is a crucial part of the testing process especially for new systems which are not in use yet. This assignment will give you an opportunity to practice creating representative test data. After completing this assignment, students will be able to:Create random data from a given set of parametersCreate a large number of test cases to test all possibilitiesWrite a C++ program to process the data as though it were collected from a real situation. This assignment will be submitted into two parts (Part-A and Part-B) – a separate Code::Blocks project is required for each part. Problem Description: You are part of a team working with agent-based simulations involving three-dimensional particle collisions; each particle has x, y and z coordinates. In order to make sure that the simulation works correctly, thousands of executions must take place with various particle configurations. You have been tasked with creating a random particle configuration test file that contains 1000 entries. Furthermore, particle generation is expected to be buggy and thus we must purposely add bugs and methods to identify and fix them. This can be done by allowing the generated data to take values that slightly exceed their physical restrictions. Specifically, the maximum values that x, y, and z, can take are 70, 60, and 50 respectively. To emulate the bugs, when we generate x, y, and z, we will make the maximums 100, 75, and 60 respectively. To fix the bugs, whenever any of those coordinates happen to exceed the restrictions (x<=70, y<=60, z<=50), they must be readjusted to 70,60, and 50 accordingly. Part A: Write a C++ program to generate the "unfiltered. txt" which must contain randomly generated particles with the following attributes:integer for id. Range (0,2000)integer for rival_id. Range (0,2000)float for coordinate positions x. Range (0,100)float for coordinate positions y. Range (0,75)float for coordinate positions z. Range (0,60)float for size attributes x_size. Range (0,10)float for size attributes y_size. Range (0,10)float for size attributes z_size. Range(0,10)a random string for the source variable. Length 8.You must make sure that there are no duplicate IDs among the particles and that no Id is larger than 2000 or smaller than 0.The attribute "rival_id" represents a single guaranteed collision with another particle. Thus, every "rival_id" in the set, must correspond to a particle with that id. When randomly generating that attribute value, make sure that there exists exactly one particle with that corresponding id. Create a Particle struct that will contain the above attributes with functions to populate its attributes randomly. Part B: Create a new project in Code Blocks. Write a C++ program that reads the "unfiltered. txt" file created in Part A. After reading the particles, you must correct any improperly generated attributes. Any x coordinate > 70 must be set to 70. Similarly, for y>60, set to 60, and for z>50, set to 50. You must also sort the particles based on ID and output them on a file "filtered. txt". Finally output on screen the average coordinate and sizes for x, y, and z respectively.

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 09:50, brennarfa
17. implement the jvm dload instruction for the mic-2. it has a 1-byte index and pushes the local variable at this position onto the stack. then it pushes the next higher word onto the stack as well
Answers: 2
image
Computers and Technology, 22.06.2019 18:30, lizz1228
Kto rozmawia z clamentain przez krótkofalówke w the walking dead w 4 epizodzie
Answers: 1
image
Computers and Technology, 23.06.2019 18:00, fordkenae
Which is a possible benefit of having a good credit history? having a checking account low interest rate on a car loan high interest rate on a credit card offer bankruptcy
Answers: 1
image
Computers and Technology, 24.06.2019 15:50, GreatBaconGamer
Subscribe to j p g a m e t u b e on you tube ?
Answers: 2
You know the right answer?
Objectives: The software testing process (i. e., the BBT) consumes large amounts of data. Creating t...

Questions in other subjects:

Konu
History, 07.05.2021 16:00
Konu
Mathematics, 07.05.2021 16:00