This is my attempt on solving 3 famous morals dilemmas:

"1.    The Overcrowded Lifeboat 
In 1842, a ship struck an iceberg and more than 30 survivors were crowded into a lifeboat intended to hold 7. As a storm threatened, it became obvious that the lifeboat would have to be lightened if anyone were to survive. The captain reasoned that the right thing to do in this situation was to force some individuals to go over the side and drown. Such an action, he reasoned, was not unjust to those thrown overboard, for they would have drowned anyway. If he did nothing, however, he would be responsible for the deaths of those whom he could have saved. Some people opposed the captain's decision. They claimed that if nothing were done and everyone died as a result, no one would be responsible for these deaths. On the other hand, if the captain attempted to save some, he could do so only by killing others and their deaths would be his responsibility; this would be worse than doing nothing and letting all die. The captain rejected this reasoning. Since the only possibility for rescue required great efforts of rowing, the captain decided that the weakest would have to be sacrificed. In this situation it would be absurd, he thought, to decide by drawing lots who should be thrown overboard. As it turned out, after days of hard rowing, the survivors were rescued and the captain was tried for his action. If you had been on the jury, how would you have decided?"

Why isn’t the captain one of those thrown away? Based on the result of a draw? Why did he decide he'll be one of the survivors? The boat doesn’t need his experience, it needs strong rowers as he said who will only need to paddle their way to the shore, and he may not be strong. The captain should be condemned for his authoritarian stance and deciding to sacrifice others instead of himself. Even if he owned that boat he is the one responsible for their safety. What everyone can't live without is owned by everyone.

The story of the prophet Jonah was more just than what this captain decided. For when they were forced to sacrifice one of them they conducted a draw which selected Jonah so they threw him off the boat. The captain should have done the same. Since they had known that some must be sacrificed to save the rest then at least they should conduct a draw which also includes the captain. That if they didn’t find any other solution even though there are, like swimming close to the boat tied by a rope, or any other solution.

The captain's solution only suits the strong ones. In Islam "the weak is the prince of the convoy" as the prophet Mohammed said, and not the strong as in the materialistic western philosophy and as in this example. That is why men sacrifice themselves for women and children in wars, which is a chivalrous act. The strong one defends the weak, not sacrifices the weak for his safety!    

Such examples are justifications for capitalism and imperialism, because it is based on the idea of "survival for the strongest" which does not exist in nature, like considering throwing atomic bombs on the populated cities of Japan an act that saved humanity from war, which was originally started by the US and it can stop it by correcting its mistakes, not by burning innocent civilians! They tried to make the USA's move moral due to the peace (surrender) it caused, forgetting the massive destruction it also caused.

According to this principle, the unjust tyrant will be a man of peace because he managed to stop conflict in his country even if it was through the use of force and oppression. Like what they said about Ariel Sharon that he is a man of peace because his oppression of the Palestinians had stopped the armed conflict in his time. This a deficient and narrow view. Injustice is not stopped by injustice, even if it had many facets injustice is eventually one.

Any western person who accepts this principle should accept the reign of the dictator because he is tough and doesn’t allow anyone to do anything, thus peace will prevail! Even though he acts unjustly, i.e. he transferred injustice from others to himself. This is what the US did by the atomic bombings, it transferred what may or may not occur into an injustice that occurred, killing hundreds of thousands of innocent lives with excessive heat that reached 1000 degrees, flaying the skins of humans and animals and polluting the soil for hundreds of years to come. You don’t extinguished fire with fire, but with its opposite. Hence, injustice isn’t stopped by injustice, for this stoppage is not real. 

Sacrificing an innocent individual or few individual for the group opens a door to immorality. Morality should either be taken as a whole or left as a whole. The right of the individual is the right of the group, because the group is nothing but individuals. Being unjust with one person is like being unjust with all people. " whoever kills a person—unless it is for murder or corruption on earth—it is as if he killed the whole of mankind; and whoever saves it, it is as if he saved the whole of mankind " the Quran. Therefore, who acts unjustly towards one person it is as if he acted so towards the whole of mankind, and this will be clear in the example of the detective below.     

What the captain did was immoral because he sacrificed the weak for the strong, and this is the law of the jungle, even though the jungle is viewed unjustly. It is the jungle of interest-based pragmatism and it is precisely what capitalism does, sacrificing the weak for the strong. This is what Nietzsche and the atheistic thought called for, Nietzsche even blatantly demanded that the weak must be killed just because they are weak. Weakness became an immoral sin that requires termination of life! even animals don’t do that, they don’t kill the weak because it is weak, it's because they needs to to survive.

Not adopting morality as a whole but selectively is what interest-based pragmatism all about, it picks and chooses what serves it and neglects what doesn’t. Thus killing morality whenever it needed to, and it will need to a lot since interest is above everything else, which means it is ready to sacrifice everything else. Therefore, the principle of "interest above all else" is basically corrupt.   

Morality must be above man not below them, with man under its control not vice versa, otherwise morality will have no real value. And here appears the role of religion as a keeper of the status of morality and rewarding for it. Without religion no one will continue preferring morality over interest which will ultimately defeat morality if there was no religion.

If that gate is opened – sacrificing an innocent individual for the rest- the gate of injustice will be opened. Everyone will do unjust acts in the name of the safety of the group. Thus the decision to sacrifice few individuals is an unjust one especially for the weak ones, unless everyone agrees on a decision that also includes the captain. The principle of unfairly sacrificing the few for the more and the individual for the group is corrupt, and it opposes the Quran which says: "whoever kills a person—unless it is for murder or corruption on earth—it is as if he killed the whole of mankind", like the strict teacher who punishes a student with a punishment way more than what he deserves just to teach the other students a lesson, and he doesn’t view himself as unjust because he served the group and calmed the class so they might learn! The group is nothing but individuals, allowing yourself to act unjustly towards the individual means allowing yourself to be unjust towards the group, for the group is also individual. If you accept some injustice, what would prevents you from accepting the rest of it?!

A true Muslim adopts the whole of morality, because their religion is morality – with the creator and the created including themselves. The life of morality is more important than the life of man, the safety of morality is more important than the safety of man. If injustice is only fought with injustice the result will be the survival of the strongest. Our principle should be that morality is more valuable than life, and instead of sacrificing morality for life and its pleasures, we sacrifice the pleasures of life for morality, and even sacrifice our life if we had to, the Quran said: "gross injustice is worse than killing", like when the tribe of Quraish unfairly treated the prophet Mohammad and his companions, this verse was justifying the Muslims battle of Badr with Quriash, due to the continuous injustice practiced by Quraish against Muslims and their assaults and torture for them for more than 13 years.

Isn’t morality what is more sublime? Then why do we sacrifice the sublime for the non-sublime? Who sacrificed their life for the sublime were perpetuated by it, and who sacrificed the sublime for their interests have contaminated the sublime and the sublime contaminated them, throughout history.  

"2-The Trolley Problem 
A trolley is running out of control down a track. In its path are five people who have been tied to the track by a mad philosopher. Fortunately, you could flip a switch, which will lead the trolley down a different track to safety. Unfortunately, there is a single person tied to that track. Should you flip the switch or do nothing? 

3- The Mad Bomber 
A madman who has threatened to explode several bombs in crowded areas has been apprehended. Unfortunately, he has already planted the bombs and they are scheduled to go off in a short time. It is possible that hundreds of people may die. The authorities cannot make him divulge the location of the bombs by conventional methods. He refuses to say anything and requests a lawyer to protect his fifth amendment right against self-incrimination. In exasperation, some high level official suggests torture. This would be illegal, of course, but the official thinks that it is nevertheless the right thing to do in this desperate situation. Do you agree? If you do, would it also be morally justifiable to torture the mad bomber’s innocent wife if that is the only way to make him talk? Why?"

In the example of the trolley you are not the one who was unjust to that person when you directed the train towards him, but the circumstances. Reducing the damage is no doubt a moral act, actually it is the only moral act you could do in that situation. Logically speaking, there is "one" in those five whom you have saved, so when you saved the five you have also saved one among them, so you saved one and more.

Who changes the direction of the trolley isn’t like the detective who tortures the wife of the bomber to save hundreds, because the detective is the one committing torture not nature as in the trolley problem, and here you can't guarantee that torturing his wife will make him confess, and you can't also guarantee that he's truly a bomber, his confession isn't  enough evidence. You can practice many detective methods like telling him you'll go easy on him if he confessed else he'll be jailed or executed if he didn’t.  

If we allowed the detective to open the gate of torture to reach the truth innocent people will be tortured. Torture is based on suspicion -doubt- while torture is certain, and its affects remain for the rest of one's life. You don’t do a certain evil act to stop an uncertain evil from occurring. Otherwise the detective will be a danger against society just like the mad bomber. Also, torturing that man because he is a threat may not make him confess, and he could die of torture along with his wife and the bombs explode, so the bomber won't be the only one who acted unjustly but the detective also!     

He is in the process of detection, and the word "detection" means to search for the truth, i.e. the truth is not yet clear to him, while torture has truly been done to avoid a presumed truth. Let's assume he has hundreds or thousands of suspects for one crime, and the crime is torturing one person and torturing his wife and children. This detective will torture all of them to confess! Some will do, some don't know the information needed and most of them are innocent! He'll be torturing hundreds for one individual! This the opposite of his idea of sacrificing the few for the group, he'll be sacrificing a large group for a few individuals in the name of protecting the group from their threat, even though who committed the crime is one of those hundreds of suspects so the rest have definitely been wrongfully treated, and he knew from the beginning that the criminal is one and the rest are innocent. Thus, the injustice practiced by the detective is greater than that of the criminal! He had only tortured a few while the detective tortured hundreds! Thus, justice is not reached through injustice.   

Here the detective has become a danger to society since everyone he accuses will be tortured, this method is a threat to society. This is like the explosion that may burn an innocent person, or the random shooting that may kill innocent people. This kind of shooting is called a threat to society, for what may harm everyone is a threat to everyone. Thus, the idea of the detective was not right, this is my point of view and others may have better opinions.