CS计算机代考程序代写 Java import java.io.PrintWriter;

import java.io.PrintWriter;

/**
* SIR model.
*
* @author Jeffrey Chan, 2021.
*/
public class SIRModel
{

/**
* Default constructor, modify as needed.
*/
public SIRModel() {

} // end of SIRModel()

/**
* Run the SIR epidemic model to completion, i.e., until no more changes to the states of the vertices for a whole iteration.
*
* @param graph Input contracts graph.
* @param seedVertices Set of seed, infected vertices.
* @param infectionProb Probability of infection.
* @param recoverProb Probability that a vertex can become recovered.
* @param sirModelOutWriter PrintWriter to output the necessary information per iteration (see specs for details).
*/
public void runSimulation(ContactsGraph graph, String[] seedVertices,
float infectionProb, float recoverProb, PrintWriter sirModelOutWriter)
{
// IMPLEMENT ME!
} // end of runSimulation()
} // end of class SIRModel