The law provides a framework for people to live together in communities by defining specific rights. It also establishes consequences…