# Search:

Type: Posts; User: JBtheIV

1. ## Thread: Working with Methods

by JBtheIV
Replies
13
Views
404

### [SOLVED] Re: Working with Methods

Yeah that was the problem I was having because thats not correct. But I guess my program is solid then.
2. ## Thread: Working with Methods

by JBtheIV
Replies
13
Views
404

### [SOLVED] Re: Working with Methods

I said in my previous post that my program is running the way it should. 50 kilograms is 22.686.... and 50 pounds is 110 kilograms. I just wanted to make sure those 2 methods were set up right. I...
3. ## Thread: Working with Methods

by JBtheIV
Replies
13
Views
404

### [SOLVED] Re: Working with Methods

Oh ok, that makes alot of sense. But now when I test it again it reads something like this:

Please select the type of conversion you would like to make: 2
Please enter the kilograms: 50
50...
4. ## Thread: Working with Methods

by JBtheIV
Replies
13
Views
404

### [SOLVED] Re: Working with Methods

Quick update! I reworked my code around this time and managed to create the 3rd method. The only problem is it will give me a result something like this. Basically, I got it to print, but now it...
5. ## Thread: Working with Methods

by JBtheIV
Replies
13
Views
404

### [SOLVED] Re: Working with Methods

public static void main(){
nPounds = input.nextInt();
System.out.print(nPounds + " pounds is " + dPoundsToKilograms + " kilograms");
}

Why is it when I do this,...
6. ## Thread: Working with Methods

by JBtheIV
Replies
13
Views
404

### [SOLVED] Working with Methods

Hello.

My teacher gave us an assignment.

Menu to be displayed for the user:
WEIGHT CONVERSION
1. Pounds to kilograms
2. Kilograms to pounds

Note: To indicate the type of conversion, the...
7. ## Thread: Working with loops for the first time.

by JBtheIV
Replies
24
Views
561

### Re: Working with loops for the first time.

Sorry to sound like a pain but thats the problem I'm having. I honestly have no idea how to move on.
8. ## Thread: Working with loops for the first time.

by JBtheIV
Replies
24
Views
561

### Re: Working with loops for the first time.

The while loop asks the user to enter a number for a product. Until they enter the integer 10 (the sentinel), it will keep asking them for a product number.

ex.
Please select an item from the...
9. ## Thread: Working with loops for the first time.

by JBtheIV
Replies
24
Views
561

### Re: Working with loops for the first time.

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

import java.util.Scanner;

/**
*
10. ## Thread: Working with loops for the first time.

by JBtheIV
Replies
24
Views
561

### Re: Working with loops for the first time.

@javaiscool. Thanks man, I think I'm on to something.

I imported the code:

if (nNumber == 1){
nSum += GPOD_SHUFFLE;
}
else if (nNumber == 2){
nSum...
11. ## Thread: Working with loops for the first time.

by JBtheIV
Replies
24
Views
561

### Re: Working with loops for the first time.

Sorry if I wasn't clear, but our Teacher hasn't taught us about array's yet. Therefore we should be required to figure this out without them.
Thus, thats why I need to figure out the right...
12. ## Thread: Working with loops for the first time.

by JBtheIV
Replies
24
Views
561

### Re: Working with loops for the first time.

Thanks for the response. Our professor hasn't taught us about arrays so thats why it looks foreign to me.

/*
* To change this template, choose Tools | Templates
* and open the template in...
13. ## Thread: Working with loops for the first time.

by JBtheIV
Replies
24
Views
561

### Re: Working with loops for the first time.

I don't know how to use arrays, or at the least, can't remember. Can you give an example?
14. ## Thread: Working with loops for the first time.

by JBtheIV
Replies
24
Views
561

### Re: Working with loops for the first time.

Ok update!
I redid my coding and was able to fix the problem.

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
15. ## Thread: Working with loops for the first time.

by JBtheIV
Replies
24
Views
561

### Re: Working with loops for the first time.

The customer can purchase as many items as they want. Each item corresponding to a number (1-9). The system will ask the user to enter another item until the user inputs 10. Then the total items...
16. ## Thread: Working with loops for the first time.

by JBtheIV
Replies
24
Views
561

### Working with loops for the first time.

Hello.

So far, I am in my 3rd week of Java programming and I've finally run into a bit of a problem. We were given an assignment of the following:
Scenario 1: Customer purchases all 9 items...
Results 1 to 16 of 16