Decision Tool
You are trying to decide if a job is right for you, but there are many factors to consider and it is overwhelming. Write a program that stores as variables each of the following: job's salary, travel distance, difficulty, stability, opportunity for progress, enjoyability, benefits, and reputation. Write a set of conditions (such as a maximum or minimum value for each variable) that must all be met in order to accept a job, then display whether or not all conditions were met. Set the variable values with your score of each feature applied to the potential job (for example difficulty = 7), then run the program to get your answer.
- For features without clear values, use a score from 0 to 10.
- Have it output "Accept the job" if all of the conditions are met, otherwise have it say "Don't work there".
- If the benefits condition fails, have it override that failure if the salary is sufficiently higher than the minimum acceptable salary you set.
Extra Challenge: For a job that fails the test, also have it display all the reasons that it failed.
It may help to have a variable to keep track of the success condition, set it true by default but mark it false if any condition isn't met. Then check it in the end.
It may help to have a string variable to keep track of the reasons for failure. Then you can append lines to it for each failure, and display the whole string in the end.