Class OpinionPoll

java.lang.Object
org.episteme.social.sociology.OpinionPoll

public class OpinionPoll extends Object
A simulated Opinion Poll "device" for gauging public sentiment. Provides methods to simulate polling a population on various topics or options. * @version 1.1
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • OpinionPoll

      public OpinionPoll(String topic)
      Creates a new Opinion Poll on a specific topic.
      Parameters:
      topic - the subject of the poll
  • Method Details

    • conductPoll

      public Map<String,Double> conductPoll(int sampleSize, String... options)
      Conducts a poll with a specified sample size and options. Simulates responses using a uniform random distribution.
      Parameters:
      sampleSize - number of people polled
      options - available choices (e.g., "Yes", "No", "Undecided")
      Returns:
      Map of Option -> Percentage (0.0 to 100.0)
    • getTopic

      public String getTopic()
      Returns the topic of this poll.
      Returns:
      the topic string