src/com/company/Server/CentralNode.java
public String testCovid(Socket clientSocket, Client client) {
        String result;
        int randNumber = new Random().nextInt(2);

        if (randNumber == 0) {
            result = "Dear "+ client.getName() + ", your covid-19 test result is negative";
        } else {
            result = "Dear "+ client.getName() + ", your covid-19 test result is positive";
            this.readWriteFiles.addInfectedCounty(client.getCounty());
        }

        return result;
    }
/**
     * Method responsible for determining the result of the covid-19 test when the client clicks "Take Test"
     * @param clientSocket client associated socket
     * @param client       client object (model)
     * @return a string to say whether the client's covid-19 test was positive or negative
     */
Method responsible for determining the result of the covid-19 test when the client clicks "Take Test"
@param clientSocket client associated socket
@param client       client object (model)
@return a string to say whether the client's covid-19 test was positive or negative
Method responsible for determining the result of the covid - 19 test when the client clicks " Take Test " @param clientSocket client associated socket @param client client object ( model ) @return a string to say whether the client ' s covid - 19 test was positive or negative
public String testCovid(Socket clientSocket, Client client) {
        String result;
        int randNumber = new Random().nextInt(2);
        if (randNumber == 0) {
            result = "Dear "+ client.getName() + ", your covid-19 test result is negative";
        } else {
            result = "Dear "+ client.getName() + ", your covid-19 test result is positive";
            this.readWriteFiles.addInfectedCounty(client.getCounty());
        }
        return result;
    }
public String testCovid ( Socket clientSocket , Client client ) { String result ; int randNumber = new Random ( ) . nextInt ( 2 ) ; if ( randNumber == 0 ) { result = "Dear " + client . getName ( ) + ", your covid-19 test result is negative" ; } else { result = "Dear " + client . getName ( ) + ", your covid-19 test result is positive" ; this . readWriteFiles . addInfectedCounty ( client . getCounty ( ) ) ; } return result ; }
Method responsible for determining the result of the covid-19 test when the client clicks "Take Test"
 @param clientSocket client associated socket
 @param client       client object (model)
 @return a string to say whether the client's covid-19 test was positive or negative
Method responsible for determining the result of the covid - 19 test when the client clicks " Take Test " @param clientSocket client associated socket @param client client object ( model ) @return a string to say whether the client ' s covid - 19 test was positive or negative