todd stolz-schroeder

Greenhorn
+ Follow
since Feb 08, 2010
Merit badge: grant badges
For More
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by todd stolz-schroeder

David Newton wrote:Oh, that's obnoxious--just cut-and-paste next time, please.

Are you calling the functions? They won't call themselves.



You cant copy out of the command promt so thats what i had to do.

And i added the return command and still the same thing

14 years ago
it looks like this





instead of this

14 years ago
Im trying to do it but when its like this why does it return nothing??

14 years ago

Anupam Jain wrote:

todd stolz-schroeder wrote:
I have my whole program written but i need to break it down into 5 seperate methods one for the values, one for the average, one for the smallest, one for the largest and one for the median. im a little confused on how to do it, thanks.



You have the answer in your question itself...

try to make the array reference variable as a class member. make five methods as:

getValues() //To store values in array
getAverage() //to find the average value
getSmallest() //to find the smallest value
getLargest() //to find the largest value
getMedian() //to find the Median value

Hope it helps....

Yeah get that but i dont know what the write code for it would be and where to put it I worked on this all day yesterday and just wannna get it done
14 years ago
I have my whole program written but i need to break it down into 5 seperate methods one for the values, one for the average, one for the smallest, one for the largest and one for the median. im a little confused on how to do it, thanks.


14 years ago
I figured out most of it, i just need help with a boolean to tell if the budget is over 3.94 for true and if its under its false.

Can someone send me in the right direction on how to write a boolean variable?

this is the code i have so far


14 years ago
i really need help with my homework


this is what i have to do

You are buying a picnic lunch to share with friends in the park. Write, compile, and test a Java class that will 1) ask for a budget amount 2) display the cost of each item for a lunch for three and 3) calculate and display the total price of all the items and determine and display whether you have exceeded your budget.

Lunch items will consist of apples, cheese, and bread. Use six class variables of the appropriate data type to hold the price (cost) and amount (quantity) of each item as indicated in the following table:

ITEM
COST
QUANTITY

Apple
$0.25/each
3

Cheese
$3.99/lb
0.5 lb

Bread
$1.19/loaf
1



You will need additional class variables to hold the budget and total amounts.

Your program will ask the user for the budget amount through an input dialog box and then display the results in message dialog boxes. Hint: it might be easier to first create a String variable to hold all or part of the second parameter to the JOptionPane.showMessageDialog() method.


Your output should resemble the pictures below:









this is what i have so far, i need a little help with it. thanks!


14 years ago