- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 2
- Posts with Downvotes
- 2
- Downvoting Members
- 1
Hi, im trying to move an object that moves only with the user input. For example if i type in 45, it will move 45 spaces. How would I go about doing that? Thank you for your time. |
|
Is anybody familiar with using ObjectEditor in Eclipse? I am working on a program and I need serious help. |
|
I have this code and it works. It prints out the number, product, and sum, but I need it to be able to work with more than one number. For example if enter 45 6 70 I need it to say Numbers: 45 6 70 Sum: 121 Product: 18900 How … |
|
Hi, Im new to java and I can not figure out where I am going wrong in this code. I need to take the value from the arguments in the run configuration. I the values are in args[] array and if there is more than one argument I need to … |
|
Can somebody please help me understand what the output of this code would be. I believe I am getting the wrong output due to some technical problems with my computer. [code] public class SetDemo { public static void main(String[] args) { SetInherit inherit = new SetInherit(); SetComposition comp = new … |
|
Hi, I am trying to compare two objects, but it is not working correctly. Please help. [CODE]/** * Compares theObject with <CODE>this</CODE> object for * equivalence. Do not concern yourself with runtime * efficiency. * @param theObject to be compared with this object * @return true if theObject is equivalent … |
|
Is this a simple way to return the number of occurrences of theValue in a bag? [code] /** * Return the number of occurrences of theValue in the bag. */ public int countOccurrences( String theValue ) { // fill in code for(int index = 0; index <= topPosition; index++ ) … |
|
Hi, this is my first program using JUnit and I am very lost, this is the piece of code that I am running the test on [CODE] public class BoundedBag { // Data members private int[] contents; // Elements of the BoundedBag. private int topPosition; // Index of highest used … |
|
Hi, I am having problems with this piece of code and maybe I am just not understanding how to do it, but can you please help me out or give me some tips. This is the description: You will implement your BoundedBag as a partially filled array. The array contents … |
|
Hello I am new to Java and I have no idea where to start with this program. Can somebody please start me off or display how you would execute the code. Thank you. This is what I have so far, but it is just the basics: [code] /* * For … |
|
Hello all: The task is to: Create a row of Alien attackers, class RowOfAlien, patterned after the partially filled array. Put five Aliens in the row. When the row hits the left or right of the screen, the Aliens snake downwards (see demo). Note that this is different from the … |
|
Hey guys I need help with part 2 of my space invaders game. So far I have the missile shooting from the base but the missile is only fired once and that's it. I need to finish the code so that once the missile hits the top of the window … |
|
I am confused on how to get my x and y coodrdinates to overalap. Can you please help me or give me an example of how to do so. This is the code that I have so far: [code] public boolean hitBy = true; public boolean hitBy(Bullet b) { // … |
|
The task is to be able to move the alien right, down, and left. So far all i can get the alien to do is move right and down. I need to get it to be able to move left. Can you help me please? import java.awt.Graphics; import java.awt.Image; /** … |
|
I have to write a code that displays a 4 x 4 grid of faces. I am stuck and this is wat i have so far: [code] import java.awt.Graphics; import java.util.Scanner; import javax.swing.JApplet; public class Program7 extends JApplet { public void init() { setSize(2000, 2000); } /** * Draw one … |
|
My professor said we have to write a page about how to trace this for(int count = 0; count <= 3; count++) for(int count2 = 0 < count; count2++) System,out,println(count2) Can somebody give me a general idea of how to trace this I know the answer is 0 0 1 … |