

Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Esta página no es visible en la vista previa
¡No te pierdas las partes importantes!


This assignment is to be implemented using procedural programming. These are some general rules about what you should and shouldn’t do.
(a) A driver file containing your main() function. Meanwhile, the main() function should make it clear what is going on, and shouldn’t be too large. (b) A header file containing the prototypes for the functions you write. (c) An implementation file containing the implementations of your functions.
This program is used to simulate the process of the mechanical repairs, and we simplify some steps here. The “claims.txt” and “mechanics.txt” file saves the information from individual claim and mechanic, respectively. Each claim (one line record from the “claims.txt”) represents a (car) repairing requirement, while it attempts to go through mechanics ONLY in its own list. They will try from the first to the last one (one mechanic for one time) to see if this mechanic could fix the problem (as the trial process). The process stops if one trial gets successful, otherwise it will go to the next mechanic (for another trial). This claim fails if no trials (mechanics) are successful in the list, and it will consider as the (car) scrap.
We are using the below formula to decide the repair probability:
Here goes an example using the data listed in the next section. If the claim (claimId = 123) is taking John (mechanicId = 0), the Mean and Standard deviation should be as follows:
Next, to determine the outcome of the claim, we consider the following rules:
Inputs
Two data files will be provided (you CANNOT change their contents), with the colon and comma used to separate fields.
claimId,description,complexity,uncertainty,mechanics:a list
Example:
123,flat tire,10,5,mechanics:0,
mechanicId,name,ability,variability
Example:
0,John,50,-