Ask Experts Questions for FREE Help !
Ask
    Ann111111's Avatar
    Ann111111 Posts: 1, Reputation: 1
    New Member
     
    #1

    Sep 12, 2013, 12:49 AM
    Can somebody help me with Java code?
    A method called dropItems() taking a Robot and an integer. The robot should (try
    to) drop that number of items.
    My version doesn't work unfortunately. Here is it:

    int dropBeepers(String input, int createRobot, int count) {
    count =0;


    while(isRobotCarryingItems()) {
    dropItemFromRobot();
    }
    count++;
    return(count);
    }
    }
    Pelusawoman's Avatar
    Pelusawoman Posts: 23, Reputation: 2
    New Member
     
    #2

    Sep 14, 2013, 06:22 PM
    Well, one problem is that count is coming in with a value, yes? Then you zero it, and if all goes well, you increment it to "1" and send it back. Is this really what you want to do?

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

I want the java code please [ 2 Answers ]

Write a program that ask from the user how many integers you want to read then reads the set of integers from user, and then finds and prints the sum of even valued and odd valued integers . And also count how many even was entered by user and how many odd were entered by user.

Calculation in java code [ 4 Answers ]

In my program total of fields is 53.25 but it is giving 53.24999 Why it is happening like that

Java code [ 2 Answers ]

Please give me a simple java code for addition of two numbers here two numbers are accepted From users please give me explanation about each code

Java code [ 2 Answers ]

Please give me a java program for additon of two numbers here nos are accepted from users here I am not confident about java program so please gieve me java code I only understand a hello program so please help me

Java code [ 1 Answers ]

What is difference between argument and parameter element as use in calling routines/coding a method? Can one use them interchangeably for talking/writing purposes?


View more questions Search