- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
5 Posted Topics
this is my code - i have three classes and i will post all since i have no idea what i'm doing apparently [CODE]public class OneTwoTest { public static void main(String[] args) { System.out.println("Welcome to One-Two Match!"); Game g = new Game(); g.play(); System.out.println("Thank you for playing."); } // end … | |
I am supposed to change an ordinary for loop into an enhanced for each loop. I have the following two problems: 1. for(int i = 1; i<data.length; i++) sum = sum + data; 2. for(int i = 0; i<data.length; i++) if(data == target) return i; These are the only pieces … | |
Re: do a While loop, where you say, while the word is not olleh, do... then you make a loop in which you rearrange the letters one by one, starting from the last one. | |
[CODE]public class Election { private Voter v1; private Voter v2; private Voter v3; public String winner; int myTotal = 0; int hisTotal = 0; public Election(double pa1, double pv1, double pa2, double pv2, double pa3, double pv3) { for(int i=1; i<=3500; i++) v1=new Voter(pa1, pv1); for(int i=1; i<=3500; i++) v2=new … | |
I have two other classes but they are very small, and this is where the error lies. This is my code: [CODE]import java.util.Scanner; public class Player { private boolean isHuman; private int score=0; private Scanner input; public Player(int human) { System.out.println("If you would like to play, press 1. Otherwise, press … ![]() |
The End.