Genesis Chavira

Greenhorn
+ Follow
since Oct 07, 2019
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
3
Given in last 30 days
3
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Genesis Chavira

What can I do to fix my errors?
1 week ago

Campbell Ritchie wrote:Insert a line something like this:-I can't get the right line number because your screenshot is invisible just at the moment.



I typed this in, and I'm starting to get an output, however, how can I get it to show me which one wins, for each possible scenario?
1 week ago
import java.util.Scanner;
public class RockPaperScissors
{
public static void main(String[] args)
{
try(Scanner keyboard1= new Scanner(System.in)){
try(Scanner keyboard2= new Scanner(System.in)){

String P= "Paper", R= "Rock", S= "Scissors";
String s1, s2;
System.out.println("Player 1 enter Rock, Paper, or Scissors");
s1= keyboard1.next();
s1= s1.toUpperCase();
System.out.println("Player 2 enter Rock, Paper, or Scissors");
s2= keyboard2.next();
s2= s2.toUpperCase();

if (s1.equals(s2)) {
System.out.println("No One Wins.");
}
else if(s1.equals(P) && s2.equals(R)) {
System.out.println("Paper beats Rock,Paper Wins!");
}
else if(s1.equals(P) && s2.equals(S)) {
System.out.println("Scissors beats Paper,Scissors Wins!");
}
else if(s1.equals(R) && s2.equals(S)) {
System.out.println("Rock beats Scissors,Rock Wins!");
}
else if(s1.equals(R) && s2.equals(P)) {
System.out.println("Paper beats Rock,Paper Wins!");
}
else if(s1.equals(S) && s2.equals(P)) {
System.out.println("Scissors beats Paper,Scissors Wins!");
}
else if(s1.equals(S) && s2.equals(R)) {
System.out.println("Rock beats Scissors,Rock Wins!");
}
}

}
}
}

That's all the code I have
The lines before it is just information my professor wanted about the project so technically my line 7 is my line 1
1 week ago
I'm not sure what object oriented programming means, sorry, this is my first time working with Java... and someone mentioned the Upper Case letters but they did not tell me what was wrong with it
1 week ago
Hi! For my Java class we have to create a game of Rock Paper Scissors between two players. I have no idea where I'm going wrong and was wondering if someone could help me. The code launches and lets me input either rock, paper, or scissors, however it will not give me an output of my results. I honestly have no clue on what to do. Thank you
1 week ago