Thursday, November 28, 2019

Association in Java Definition and Examples

Association in Java Definition and Examples The association relationship indicates that a class knows about, and holds a reference to, another class. Associations can be described as a has-a relationship because the typical implementation in Java is through the use of an instance field. The relationship can be bi-directional with each class holding a reference to the other. Aggregation and composition are types of association relationships. Associations join one or more of one thing against one or more of another thing. A professor might be associated with a college course (a one-to-one relationship) but also with each student in her class (a one-to-many relationship). The students in one section might be associated with the students in another section of the same course (a many-to-many relationship) while all the sections of the course relate to a single course (a many-to-one relationship). Association Example Imagine a simple war game with an AntiAircraftGun class and a Bomber class. Both classes need to be aware of each other because they are designed to destroy each other: public class AntiAirCraftGun {   Ã‚  private Bomber target;   Ã‚  private int positionX;   Ã‚  private int positionY;   Ã‚  private int damage;   Ã‚  public void setTarget(Bomber newTarget)   Ã‚  {   Ã‚  Ã‚  Ã‚  this.target newTarget;   Ã‚  }   Ã‚  //rest of AntiAircraftGun class } public class Bomber {   Ã‚  private AntiAirCraftGun target;   Ã‚  private int positionX;   Ã‚  private int positionY;   Ã‚  private int damage;   Ã‚  public void setTarget(AntiAirCraftGun newTarget)   Ã‚  {   Ã‚  Ã‚  Ã‚  this.target newTarget;   Ã‚  }   Ã‚  //rest of Bomber class } The AntiAirCraftGun class has-a Bomber object and the Bomber class has-a AntiAirCraftGun object.

Sunday, November 24, 2019

Are People Obedient Essays - Social Psychology, Conformity

Are People Obedient Essays - Social Psychology, Conformity Are People Obedient ARE PEOPLE OBEDIENT? By Queron Thompson Does everyone in society go against what they believe in merely to satisfy an authority figure? Stanley Milgrams Perils Of Obedience expresses that most of society supports the authority figure regardless of their own personal ideals. Milgram says to the reader, For many people, obedience is a deeply ingrained behavioral tendency, indeed a potent impulse overriding training in ethics, sympathy, and moral conduct (Milgram 606). Is Milgrams statement telling us obedience is an unparalleled force in todays society? Two authors, George Orwell and Langston Hughes, provide us with incidents that support Milgrams findings. George Orwells work, Shooting an Elephant, can be used as an example of Milgrams discoveries. He recalls an account of himself as a British policeman called upon to take action against a belligerent elephant rampaging through a small Burmese Village. Orwell makes it a point to show that the natives of the village, who at any other time would have looked upon the him in disfavor, are now backing him in hopes of the animals destruction. Orwell realizes it is quite unnecessary to kill the animal, yet does it anyway. Why might you ask? Milgrims findings on peoples obedience to authority can be seen as an answer to this question. In the reading Orwell says, And suddenly I realized that I should have to shoot the elephant after all. The people expected it of me and I had got to do it: I could feel their two thousand wills pressing me forward, irresistibly.(Orwell 771). With this statement, we can easily determine the role the villagers take on. Suddenly, they have taken on the role of the authority figure and Orwell the conforming citizen. In Milgrams Perils Of Obedience, the test subjects or teachers follow the experimenters authority and inflict punishment upon the actors or learners without any regard to their own feelings. In Orwells writings, he has also put the natives or authority ahead of his own personal convictions and has proven Milgram an astute judge of human character. Langston Hughes, author of Salvation offers us a different perspective on Milgrams findings, obedience before morality. Mr. Hughes paints a picture of himself as a little boy, whose decisions at a church revival, directly reflect mans own instinctive behavioral tendencies for obedience. A young Langston, whos congregation wants him to go up and get saved, gives into obedience and ventures to the altar as if he has seen the light of the Holy Spirit. Can he really see it or is this just a decision to give into the congregation, or what we consider the authority? Milgrams deeply ingrained human impulses are evident at this point. Hughes goes on to say, So I decided that maybe to save further trouble, Id better lie, too, and say that Jesus had come, and get up and be saved; So I did (Hughes 32). In saying this, Young Langston has obviously overlooked his personal belief of a visual Holy Spirit to meet the level of obedience laid out by the congregation. Once again, Stanley Milgrams theor ies are correct. His discoveries bind us to the fact that people may believe strongly in an idea or thought but, will overlook that belief to be obedient. In conclusion, what does this leave the reader to think? Do people conform to authority? Is society holding back its views inorder to meet a level of obedience? Stanley Milgram has pointed out a human characteristic that may very well be in each and every one of us. George Orwell and Langston Hughes have both given us two examples that support and defend this theory. With all this evidence compounded, we the reader can make a justified assumption that everyone in society has, at one time or another, overlooked his or her personal feelings to conform. This occurrence, whether it is instinctive or judgmental is one that each individual deals with a personal level.

Thursday, November 21, 2019

Ethics and Corruption in Law Eforcement Research Paper

Ethics and Corruption in Law Eforcement - Research Paper Example According to a 1998 report by the General Accounting Office, â€Å"...several studies and investigations of drug-related police corruption found on-duty police officers engaged in serious criminal activities, such as conducting unconstitutional searches and seizures; stealing money and/or drugs from drug dealers; selling stolen drugs; protecting drug operations; providing false testimony; and submitting false crime reports† (General Accounting Office, 1998: 8). Of those law-enforcement officials convicted of various corruption offenses resulting from FBI led investigations between 1993 and 1997, about half were for drug-related offenses. More than 100 drug-related cases involving police officers are prosecuted nationwide every year. Another of the indications of the widespread problem of corrupt cops is that all of the federal drug enforcement agencies have had at least one of its agents implicated in a drug-related offense. Officers nationwide have given in to the same tempta tions offered by the selling of drugs that have lured their criminal adversaries. This discussion examines the scope of the problem citing specific examples and the possible criminological reasons behind this behavior. The growth of police corruption instances involving drug sales is relatively easy to explain. The financial rewards offered by the sales of illegal drugs in relation to other forms of income both legal and illegal, is enormous. The temptation attracts law enforcement officials who are becoming increasingly more discouraged by the growing proliferation of drug traffickers. Though police agencies of all descriptions have fought the 30-plus year ‘drug war’ by spending billions of dollars and locking up millions of people, their efforts have not only not ended drug use or sales but drugs are now more available, cheaper and purer than ever before. Disheartened police officers involved in stopping drug crimes put their lives in jeopardy but are under-paid and u nder-appreciated by an indifferent public. Many officers joined the force to protect and serve but find them regulating an illegal drug market that they know they will never suppress. As long as the U.S. government continues it’s disastrous ‘war,’ formerly well-intentioned cops will continue to be lured by the money to be had by engaging in the drug trade they are expected to prevent. They risk their lives for a war which has no end and they know this fact better than anyone. Fighting a losing battle discourages even the most loyal and honest of law officials and some use this to justify becoming involved in a drug cartel. It’s easy money, they are being underpaid for dangerous work and their efforts are futile. In 2002, 41 police officers in Tijuana, Mexico were arrested (Peet, 2004). These officers, who included the Chief of Police, were on the payroll of drug dealers. They protected drug shipments, took bribes and committed murders. The allegations agai nst these police officers is hardly an isolated incident in Mexico as most of the towns located along the border of the U.S. are controlled and ‘policed’ by drug cartels (Peet, 2004). Any country that wages a war on drugs faces corruption among its police officers, politicians,