Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Semester Programming Project This program should illustrate and simulate the ethical issue of the tragedy of the commons. In essence, it is a software toy

Semester Programming Project

This program should illustrate and simulate the ethical issue of the tragedy of the commons. In essence, it is a software toy that permits users to examine the balance between choices that benefit the individual but cost society versus those that benefit society at a cost to the individual.

The program can be written in either Java or C. Students have broad discretion with regards to implementation.

Quick overview.

Please consider creating an array (or linked list) of objects. Each object might have an integer ID, a Boolean switch (selfish or not-selfish), and a happiness score (integer). Then use the object in part A. Finally, implement part B representing the society.

Part A.

The first part of the program will create a series of individuals (objects) who make decision that are either selfish or altruistic. Each object will make its decisions independently. Some objects may choose to always be selfish. Others will always be altruistic. And some might be random. Each object will have an identity (an integer is sufficient), and can generate its choice. Each object will also have a score for happiness, which can change.

The program should be able to create from 1 to 20 (or more, if you prefer) individuals according to the users preference.

The program should be able to run multiple iterations (each with the same individuals), and be capable of up to 20 (or more, if you prefer) iterations, with output for each iteration.

When an individual is selfish, they gain 5 happiness points. When they are altruistic, they lose 2 happiness points.

When Part B is done, the government score will be added to the functionality of Part A.

Part B.

The second part will incorporate an entity called government, which will represent the aggregate effects of individual decisions by the individual objects.

If all individuals choose to be altruistic, society will benefit, but all of the individuals will be poor. If all individuals choose to be selfish, the individuals may do well, but society will be miserable. And if some number of individuals are altruistic and others are selfish, a balance might be achieved. The balance could be optimized, providing results for the number of objects with various characteristics.

If there are more selfish individuals than altruistic individuals, the government score is a negative number equal to the net number of selfish individuals (selfish altruistic).

If there are an equal number of selfish and altruistic individuals, the government score is a zero.

If there are more altruistic individuals than selfish individuals, the government score is a positive number equal to the net number of altruistic individuals. (Altruistic selfish).

These results are added to the individual happiness scores specified in Part A.

So if an individual is selfish, they would add 5 happiness points. If there are then 15 selfish people and 5 altruistic people, the government would subtract 10 points from each individual. Thus the selfish person would end up with -5 points. The altruistic person would end up with a -12 points for that round!

In contrast, suppose all 20 are altruistic. The government would add 20 points, the individuals would have negative scores as individuals, but the aggregate result is that each would add 18 points to their happiness score.

Punishment

The government can punish excessive selfishness. If an individual is selfish AND the government score is positive (more altruists than selfish), there is a 10% chance that a selfish individual will receive a punishment in this case, a penalty of 50 points. Think of it as time in jail.

If an individual is selfish and the government score is negative (more selfish than altruists), there is a 50% chance that a selfish individual will receive a punishment in this case, a penalty of 75 points. In other words, a long time in jail.

Note: These numbers are purely arbitrary. Feel free to experiment with other numbers!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Management Systems

Authors: Patricia Ward, George A Dafoulas

1st Edition

ISBN: 1844804526, 978-1844804528

More Books

Students also viewed these Databases questions

Question

Define independent variables.

Answered: 1 week ago