case 'c': //find if the sum of numbers is
even or odd
System.out.print("Enter
two numbers: ");
int num1 =
console.nextInt();
int num2 =
console.nextInt();
if (myGeek.isEven(num1,
num2))
System.out.println("Sum is even");
else
System.out.println("Sum is not even");
break;
case 'd'://find if all are the same numbers
System.out.print("Enter 3
integers: ");
num1 = console.nextInt();
num2 = console.nextInt();
int num3 = console.nextInt();
if (myGeek.allTheSame(num1,
num2, num3))
System.out.println("All the same!");
else
System.out.println("All are NOT the same");
break;
case 'e': //sum the numbers between two
numbers entered by user
System.out.print("Enter the
first number: ");
num1 =
console.nextInt();
System.out.print("Enter the second number: ");
num2 =
console.nextInt();
int total =
myGeek.sum(num1, num2);
System.out.println("The sum between "+ num1 + " and "
+num2 + " is " + total);
break;
case 'f': //repeat the input string
System.out.print("Enter a
string: ");
String text =
console.next();
System.out.print("How
many times to repeat: ");
int count =
console.nextInt();
System.out.println(myGeek.repeat(text, count));
break;
case 'g': //number of digits
System.out.print("Enter a number: ");
num1 = console.nextInt();
System.out.println("The number " + num1 +
" has " + myGeek.digits(num1)+ " digits");
break;
case 'h'://find out the middle in the input
string
System.out.print("Enter a string: ");
String input = console.next();
System.out.println("The middle of
string \"" + input + "\" is " + myGeek.middle(input));
break;
case '?'://print the menu
printMenu();
break;
case 'q'://quit
break;
default://invalid choice
System.out.println("Invalid input");
}
} while (command != 'q');
} //end of the main method
public static void printMenu()
{
System.out.print("\nCommand Options\n"
+ "-----------------------------------\n"
+ "a: Get name\n"
+ "b: Num of questions asked\n"
+ "c: Is it Even\n"
+ "d: All the same\n"
+ "e: Sum between two integers\n"
+ "f: Repeat\n"
+ "g: Number of Digits\n"
+ "h: Middle of String\n"
+ "?: Display\n"
+ "q: Quit\n\n");
} // end of the printMenu method
MICHAEL FLETCHER, PHD
PHIL 210: SAME-SEX MARRIAGE AND THE STATE
Key Terms: the parity thesis, the difference thesis, moral
impasse, public dilemma, public domain, private domain,
resolution by declaration, resolution by accommodation
A. Arguer: Jeff Jordan: “Is it Wrong to Discriminate on the
Basis of Homosexuality?”
a. Asserts “the difference thesis” (thus denies “the parity
thesis”), and uses AFCC to support this assertion.
b. Jordan (306): “What [the AFCC] show[s] is that some
discrimination against homosexuals, in this case refusal to
sanction same-sex marriage, is not only legally permissible but
also morally permissible. The discrimination is a way of
resolving a public policy dilemma that accommodates, to an
extent, each side of the impasse and, further, protects the
religious and moral integrity of a good number of people. In
short, the arguments show us that there are occasions in which
it is morally permissible to discriminate on the basis of
homosexuality.”
B. Abbreviations:
a. Same-sex marriage = SSM
b. Religion-based morality = RBM
Jordan Argument #1: The Argument from Conflicting Claims
(AFCC) [Instructor’s Reconstruction]
1) The State should undertake to resolve the public dilemmas
about X (= same-sex marriage).
a. [Moral impasse => public dilemma => threat to social order
=> need for State res.]
2) The State can resolve a public dilemma about X in either of
two (mutually exclusive) ways—a “resolution by declaration”
OR a “resolution by accommodation.”
3) There is no “overriding reason” for the state to resolve by
declaration. That is, the State appears to have good reasons for
not taking this option.
4) Therefore: the state should opt for a resolution by
accommodation if it is possible.
5) A resolution by accommodation is possible.
a. If the State sides with SSM, then it allows the expression of
homosexual love in BOTH the private and public domains. If
the State sides with RBM, then it forbids SSM.
b. So, the resolution of the public dilemma about X (= same sex
marriage) by accommodation would be possible if: The State
would legally allow private expression of homosexual acts but
legally disallow the public expression of homosexuality (i.e.,
same-sex marriage).
6) Therefore: the State ought to resolve by accommodation the
public dilemma about same-sex marriage (as defined in 5b).
7) Therefore: there are (in fact) some cases where the State is
permitted to discriminate against people on such basis as their
sexual orientation.
8) Therefore, “the difference thesis” is true and “the parity
thesis” is false.
Boonin’s Objection to the Premise 5 (AFCC): Charge of
Equivocation
What the religion-based moralist (RBM) finds objectionable is
NOT merely the public expression of homosexuality (e.g.,
same-sex marriage), but rather the act of homosexual sex. They
object to same-sex sexual relations—period—whether private or
public.
Diagram A: Jordan’s State Accommodation Private
Public
Respects RBM
Same-sex sex = SSS Respects Gays SSS
SSM
Same-sex marriage = SSM okay
not-okay
The arrangement above is supposed to respect the views of gays
and RBMs. But Boonin says this is mistaken. For when we
note that the term ‘same-sex marriage’ can be used to refer to
same-sex marriage or the act of same-sex sex, we get a different
result.
Boonin (308): “If we conflate the two distinct questions about
private acts and public benefits into one issue, and think of it as
“the” dispute over homosexuality, then this [Jordan’s
accommodation] seems plausible enough. Each side gets some
of what it wants, and neither side gets all of what it wants. But
if the conflict is over the permissibility of same-sex marriage in
particular, as opposed to about the complex cluster of issues
relating to homosexuality taken as a whole, then this is no
accommodation at all.”
Jordan’s alleged State accommodation appears to assume that
RBM objects only to SSM and does NOT condemn SSS in the
private domain. But this isn’t true. The religion-based moralist
objects to ALL expressions of homosexuality, both private and
public, not just public expressions (as in marriage). So, they
would not feel accommodated by Jordan’s arrangement.
Diagram B: Boonin’s Criticism
Private
Party Same-Sex Sex
Gays YesY/N
RBM No
Public
Party Same-Sex Marriage
Gays YesY/N
RBM No
What this shows is that there is no arrangement in any sphere
where the parties don’t conflict; there is no arrangement where
we get a Y/Y. Each party takes opposing positions on both
issues. Thus there appears, contra Jordan, to be no middle
ground.
So, that being the case, if the State to adopt the policy (in
Diagram A), it would in effect be taking the side of
homosexuals. For by allowing homosexual acts in private, the
State falls short of condemning such acts morally and therefore
sides with gays.
Framing Boonin’s Criticism of the AFCC
1) If ‘the parity thesis’ has been proved false, then ‘the
difference thesis’ must have been proven true.
2) ‘The difference thesis’ has not been proven true. [Boonin’s
attack on P5 above]
3) Therefore: it has not been shown there are (in fact) cases
where the State is morally justified in discriminating on the
basis of homosexuality.
4) Therefore: ‘the parity thesis’ has not been proven false.
Re-Evaluation of the AFCC in light of Boonin’s Objection
1. Note that Boonin has not shown that “the parity thesis” is
true.
2. There is a difference on the one hand between proving a
thesis to be false and on the other showing that the basis for
inferring its truth is in some way insufficient.
a. Let p = a proposition and not-p its logical opposite. Both
can’t be true together. Now to state the current point in more
formal terms, we would say this—that undercutting the
inference to the truth of p does NOT entail the truth of not-p.
3. By itself, Boonin’s criticism of the AFCC (at most)
accomplishes the second. What he’s done is to undercut the
inference to the truth of “the difference thesis.”
4. So, if Boonin’s criticism holds, then he has shown that we
aren’t justified in concluding that the difference thesis is true;
in which case we aren’t justified in concluding that the parity
thesis is false.
5. The take-home: the state-of-play (as we leave our study of
this debate) appears to be non-conclusive. Jordan would need
to answer Boonin’s criticisms of the AFCC and/or he would
need to provide new independent argument in favor the
difference thesis. And Boonin would need to provide more
positive argument for the parity thesis, not just provide
criticism his opponent’s arguments for the difference thesis.
Jordan Argument #2: The “No-Exit” Argument
1. No just government can justifiably coerce its citizens to
violate a deeply held religious belief. [Principle of Justice]
2. If the State were to sanction same-sex marriage, then citizens
would have no “exit right” concerning the practice of same-sex
marriage. [What is an exit right?]
3. So, if the State were to sanction same-sex marriage, then it
would be coercing its citizens to violate their deeply held
religious beliefs.
4. So, the State would not be justified in sanctioning same-sex
marriage.
3
MICHAEL FLETCHER, PHD
PHIL 210: FINAL EXAM STUDY GUIDE
(OR HOW TO SUCCESSFULLY PASS THIS COURSE AND
MAKE IT TO CABO IN 4 EASY STEPS)
The 4 Steps:
1) Read the Jordan and the Boonin papers (ideally, more than
once).
2) Obtain correct and sufficiently detailed answers to all the
questions on this Study Guide.
3) Be sure to know all key terms, since these refer to important
concepts.
4) Be able to reconstruct a line of reasoning in support of the
parity thesis and the difference thesis.
Key terms: the parity thesis, the difference thesis, morally
justifiable vs morally unjustifiable discrimination, moral
legalism, moral impasse, public dilemma, moral status,
resolution by declaration, resolution by accommodation,
overriding reason, private versus public domain, religion-based
morality, the argument from conflicting claims
I. The Issue
1. “What is the moral status of homosexuality?” “Is
homosexuality a sin?” “Is having sex with members of one’s
own gender morally wrong?”—All of these questions are ones
that could concern a moral agent who faces sexual choices in
his or her private life.
Do these questions precisely capture the issue of ethical concern
to Jordan and Boonin? When they ask, “Is homosexuality and
heterosexuality ethically on a par with each other?,” what are
they really asking? Is there a political aspect to the issue they
are concerned with? If so, how would you restate the issue of
concern so as to exhibit its essential political aspect?
II. The Positions on the Issue
2. Jordan introduces two theses—“the parity thesis” and “the
difference thesis.” How would you state these theses in relation
to the issue under consideration? What is the logical
relationship between these two theses?
3. What is, in Jordan’s estimation, the strongest argument for
the parity thesis? Does this argument succeed? If not, what
objections can be raised against it?
III. Moral Impasses, Public Dilemmas, and State Resolution
4. What is a moral impasse? Explain by using an example. Do
all moral impasses constitute public dilemmas? Specifically,
what three conditions appear to be jointly sufficient to qualify a
moral impasse as a public dilemma?
5. What two options are open to the State for resolving public
dilemmas? In this context, explain the difference between
“resolution by declaration” and a “resolution by
accommodation.” What is it about a public dilemma that could
necessitate involvement by the State?
IV. The Argument from Conflicting Claims
6. What is the argument from conflicting claims. You should
focus on being able to state the argument, so that it is a
recognizable line of reasoning leading to its conclusion. For
starters, get clear about what the conclusion of this argument is.
Then work backwards from this conclusion to a set of premises
that the conclusion could be viewed to follow from. To that
end, consider these questions below:
7. What do Islam, Christianity, and Judaism all have in
common? What type of God-Concept characterizes all these
religions? Why might noting the type of God-concept be
relevant to the issue of concern? What is Divine Command
Ethics? What attitude do theists of these major Western
Religions have toward homosexuality, conceived as a type of
sexual behavior? How is this at all relevant to the
discrimination issue?
8. What makes Jordan think that the difference thesis, not the
parity thesis, is true?
What single fact, if it obtains, is sufficient to logically refute
the parity thesis?
9. Jordan points out that there is an important “asymmetry”
between the State’s taking the side of same-sex marriage versus
its taking the side of religion-based morality. What is this
asymmetry and why is it important? Why, according to
Jordan,should the State not pursue resolution by declaration and
instead pursue resolution by accommodation?
10. Jordan anticipates two objections to the Argument from
Conflicting Claims at the end of his paper and makes some
replies. What are these objections?
11. What is the second argument—the so-called “No Exit”
argument—given at the end of Jordan’s paper? For which thesis
is this argument given?
V. Boonin Against Jordan
12. What side of the debate does Boonin represent? In other
words, which of the two theses does he assert?
13. Concerning Boonin’s attack on Jordan, what objection(s)
does Boonin raise against him?
PAGE
1
CSE 110 - ASSIGNMENT # 5
Maximum points : 20
What This Assignment Is About:
• Methods (Chapter 5)
- Definition and Invocation.
Your programming assignments require individual work and
effort to be of any benefit. Every student must work
independently on his or her assignments. This means that every
student must ensure that neither a soft copy nor a
hard copy of their work gets into the hands of another student.
Sharing your assignments with others in any way is
NOT permitted.
Violations of the University Academic Integrity policy will not
be ignored. The university academic integrity
policy is found at
http://www.asu.edu/studentlife/judicial/integrity.html
Use the following Coding Guidelines:
• Give identifiers semantic meaning and make them easy to read
(examples numStudents,
grossPay, etc).
• Keep identifiers to a reasonably short length.
• User upper case for constants. Use title case (first letter is
upper case) for classes. Use lower
case with uppercase word separators for all other identifiers
(variables, methods, objects).
• Use tabs or spaces to indent code within blocks (code
surrounded by braces). This includes
classes, methods, and code associated with ifs, switches and
loops. Be consistent with the
number of spaces or tabs that you use to indent.
• Use white space to make your program more readable.
• Use comments after the ending brace of classes, methods, and
blocks to identify to which block it
belongs.
Assignments Documentation:
At the beginning of each programming assignment you must
have a comment block with the following
information:
/*------------------------------------------------------------------------
-
// AUTHOR: your name
// FILENAME: title of the source file
// SPECIFICATION: description of the program
// YOUR Lab Letter and Name of the TA for your Closed lab
// FOR: CSE 110- homework #- days and time of your class
// TIME SPENT: how long it took you to complete the
assignment
//----------------------------------------------------------------------*/
Part 1: There is no part 1 for this assignment
Write a class definition (not a program, there is no main
method) named Geek (saved in a file Geek.java)
that models a person who is a geek. For our purposes, a geek is
someone who delights in answering all
sorts of questions, such as “what is the sum of all numbers
between two numbers?”, “If a number is
even?, and etc. A Geek has a name and also keeps track of how
many questions s/he has answered.
Your Geek class must have:
• only two instance variables – the Geek’s name and number of
questions asked so far
Methods Description of the methods
public Geek (String name) Sets the Geek's name and the number
of questions asked
public String getName() takes no parameters and returns the
Geek’s name as a String (don’t count this request in the total
questions)
public int getNumberOfQuestions()
It takes no parameters and returns as an integer how
many questions s/he has been asked (don’t count this
request in the total)
public boolean isEven (int num1,
int num2)
It takes two integers and returns a boolean value
indicating if the sum of the numbers is even or not
public boolean allTheSame(int x,
int y, int z)
Determines if the three arguments are all equal.
returns true if all the same, otherwise false
public int sum (int num1, int
num2)
It takes two integers and computes and returns an
integer which is the sum of all numbers between the
two inclusive (include the numbers in the sum) – for
full credit this method should work even if the two
numbers are the same (the sum is just one of the
numbers) or if the first number is larger than the
second. Also, you cannot assume which number will
be greater.
public String repeat(String str,
int n)
Repeats a given input string. return string repeated n
times
public int digits(int n) Determines number of digits in a number.
It returns the number of digits
public String middle(String str)
Finds the middle substring of a string, and return a
string containing the middle substring. Determine if
string length is odd or even if it is even print two
characters if it is odd print one character
Save the Geek class in a file called Geek.java and
Assignment5.java in the same folder.
Assignment5.java is a test driver code for the Geek class.
Assignment5.java will ask a user to enter one of the following
commands. Based on the user's choice, the program
performs corresponding operation. This will be done by calling
(invoking) one of the methods you defined in the
Geek class. The program will terminate when the user enters 'q'.
Command Options
-----------------------------------
a: Get name
b: Num of questions asked
c: Is it Even
d: All the same
e: Sum between two integers
f: Repeat
g: Number of Digits
h: Middle of String
?: Display
q: Quit
Here is the description for each option:
a: asks for the Geek’s name
b: returns the number of questions asked so far
c: asks for two integers and returns Boolean indicating if the
sum is even or odd
d: asks for three positive integers and returns true if they are
the same, false otherwise
e: asks for two integers and returns the sum between two
integers
f: asks for a string and repeats count number of times
g. asks for an integer and counts how many digits it has
h: returns the middle character of a string if is odd, 2 characters
if it is even
?: displays the menu
q: quits
Helpful hints for doing this assignment:
· work on it in steps – write one method, test it with a test
driver and make sure it works before going
on to the next method
· always make sure your code compiles before you add
another method
· your methods should be able to be called in any order
Sample Output (user input is in RED):
Command Options
-----------------------------------
a: Get name
b: Num of questions asked
c: Is it Even
d: All the same
e: Sum between two integers
f: Repeat
g: Number of Digits
h: Middle of String
?: Display
q: Quit
Please enter a command or type ?
a
Eisenstein
Please enter a command or type ?
b
0
Please enter a command or type ?
c
Enter two numbers: 4 5
Sum is not even
Please enter a command or type ?
f
Enter a string: hi
How many times to repeat: 4
hihihihi
Please enter a command or type ?
g
Enter a number: 5
The number 5 has 1 digits
Please enter a command or type ?
g
Enter a number: 77854
The number 77854 has 5 digits
Please enter a command or type ?
h
Enter a string: java
The middle of string "java" is av
Please enter a command or type ?
h
Enter a string: hello
The middle of string "hello" is l
Please enter a command or type ?
b
6
Please enter a command or type ?
c
Enter two numbers: 4 5
Sum is not even
Please enter a command or type ?
d
Enter 3 integers: 4 5 6
All are NOT the same
Please enter a command or type ?
d
Enter 3 integers: 4 4 4
All the same!
Please enter a command or type ?
e
Enter the first number: 5
Enter the second number: 10
The sum between 5 and 10 is 45
Please enter a command or type ?
e
Enter the first number: 10
Enter the second number: 5
The sum between 10 and 5 is 45
Please enter a command or type ?
q
Press any key to continue . . .
Submit your homework by following the instructions below:
• Go to the course web site (my.asu.edu), and then click on the
on-line Submission tab.
• Submit your Assignment5.java and Geek.java files on-line.
Make sure to choose HW5
from drop-down box.
Important Note: You may resubmit as many times as you like
until the deadline, but we will
only mark your last submission.
NO LATE ASSIGNMENTS WILL BE ACCEPTED
http://my.asu.edu/Maximum points : 20 What This Assignment
Is About:Use the following Coding Guidelines: