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, 23.06.2019 00:30
Write the html code to make a link out of the text “all about puppies”. it should link to a pdf called “puppies.pdf” inside the “documents” folder. the pdf should open in a new window.
Answers: 2
question
Computers and Technology, 24.06.2019 00:40
Use a software program or a graphing utility with matrix capabilities to solve the system of linear equations using an inverse matrix. x1 + 2x2 − x3 + 3x4 − x5 = 6 x1 − 3x2 + x3 + 2x4 − x5 = −6 2x1 + x2 + x3 − 3x4 + x5 = 3 x1 − x2 + 2x3 + x4 − x5 = −3 2x1 + x2 − x3 + 2x4 + x5 = 5
Answers: 3
question
Computers and Technology, 24.06.2019 13:30
To move an excel worksheet tab, simply right-click on it drag and drop it double-click on it delete it
Answers: 1
question
Computers and Technology, 24.06.2019 13:30
What is the most important for you to choose before you build a network?
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
Computers and Technology, 12.09.2021 05:30
question
Mathematics, 12.09.2021 05:30
question
Social Studies, 12.09.2021 05:30
question
Mathematics, 12.09.2021 05:30
Questions on the website: 13722363