Computers and Technology
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.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 02:00, ishmael9332
How are we able to create photographs differently than 100 years ago? explain your answer in relation to your photograph you selected.
Answers: 1
image
Computers and Technology, 24.06.2019 13:00, ddaaaeeee2960
Which one of the following functions is not available on the autosum tool? sum average if max
Answers: 3
image
Computers and Technology, 24.06.2019 21:40, justintintran
Assume you need to test a function named inorder. the function inorder receives three int arguments and returns true if and only if the arguments are in non-decreasing order: that is, the second argument is not < the first and the third is not < the second. write the definition of driver function testinorder whose job it is to determine whether inorder is correct. so testinorder returns true if inorder is correct and returns false otherwise. for the purposes of this exercise, assume inorder is an expensive function call, so call it as few times as possible!
Answers: 1
image
Computers and Technology, 25.06.2019 05:30, salllllllllll
In our new car, we were able to drive 30 miles in a half an hour. from this information, we can determine the car's a. acceleration. b. velocity. c. speed. d. direction.
Answers: 1
Do you know the correct answer?
Objectives: The software testing process (i. e., the BBT) consumes large amounts of data. Creating t...

Questions in other subjects:

Konu
Chemistry, 14.12.2020 03:50
Konu
Mathematics, 14.12.2020 03:50
Konu
Health, 14.12.2020 03:50