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

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
Determine which of the four levels of measurement (nominal, ordinal, interval, ratio) is most appropriate for the data below. internet speed levels of "fast comma " "medium comma " and "slow" choose the correct answer below. a. the ordinal level of measurement is most appropriate because the data can be ordered comma but differences left parenthesis obtained by subtraction right parenthesis cannot be found or are meaningless. nothing nothing nothing nothing nothing b. the interval level of measurement is most appropriate because the data can be ordered comma differences left parenthesis obtained by subtraction right parenthesis can be found and are meaningful comma and there is no natural starting point. c. the nominal level of measurement is most appropriate because the data cannot be ordered. nothing d. the ratio level of measurement is most appropriate because the data can be ordered comma differences left parenthesis obtained by subtraction right parenthesis can be found and are meaningful comma and there is a natural starting point.
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
Define a function printfeetinchshort, with int parameters numfeet and numinches, that prints using ' and " shorthand. ex: printfeetinchshort(5, 8) prints: 5' 8"
Answers: 1
question
Computers and Technology, 23.06.2019 23:30
Perform an online search about the booting process of a computer and list all the steps
Answers: 2
question
Computers and Technology, 24.06.2019 01:00
How can the temperature of a room be raised by 5degreesf?
Answers: 1
You know the right answer?
Objectives: The software testing process (i. e., the BBT) consumes large amounts of data. Creating t...
Questions
question
Advanced Placement (AP), 14.01.2020 05:31
question
Mathematics, 14.01.2020 05:31
question
Biology, 14.01.2020 05:31
Questions on the website: 13722360