Search:

Type: Posts; User: Semion

Search: Search took 0.13 seconds.

  1. Replies
    10
    Views
    2,635

    Re: Need some help with a Checkout Area Simulator

    // DO NOT ADD NEW METHODS OR DATA FIELDS!

    package PJ3;

    class Cashier {

    // define constants for representing intervals
    static int BUSY = 1;
    static int FREE = 0;
  2. Replies
    17
    Views
    1,855

    Re: How To Use Linear Search

    How do you unbox?
  3. Replies
    17
    Views
    1,855

    Re: How To Use Linear Search

    I see. I'm looking at the API and I don't see any other method that can find a duplicate. Is there another way?
  4. Replies
    17
    Views
    1,855

    Re: How To Use Linear Search

    I tried using Vector<Integer> but I'm still having problems matching the sum to every value in the container.


    public static void main(String[] args) {


    Vector<Integer> sumArray = new...
  5. Replies
    17
    Views
    1,855

    Re: How To Use Linear Search

    I was thinking the same thing about closing off the first for loop. The way I have it, the for loop is checking the current sum against each previous sum for a match, except on the first roll there...
  6. Replies
    17
    Views
    1,855

    Re: How To Use Linear Search

    Still not working. I have:


    for (int k = 0; k < sumArray.length; k++){

    for (int j = sumArray.length - 1; i < j; j--){

    if...
  7. Replies
    17
    Views
    1,855

    Re: How To Use Linear Search

    Thanks for the reply. I tried this code but it still has the sum equal to the value in the index. I see where you're going here in the linear search going backwards. Great idea. Now I just need to...
  8. Replies
    17
    Views
    1,855

    Re: How To Use Linear Search

    You are correct. Forgive the confusing sentence. I meant that the value inside each index is equal to the sum.
  9. Replies
    17
    Views
    1,855

    Re: How To Use Linear Search

    The code does compile and run. That particular module is what I thought was a linear search through the array. I used some println statement to see what's happening in the run. It looks like the sum...
  10. Replies
    17
    Views
    1,855

    How To Use Linear Search

    Hi all,

    I'm having a problem using a linear search to find a duplicate. Here's the details of my program:

    I roll two dice continually and get random numbers, 1-6. If I roll two of the same...
  11. Replies
    10
    Views
    2,635

    Re: Need some help with a Checkout Area Simulator

    I'll try that out. Thanks!
  12. Replies
    10
    Views
    2,635

    Re: Need some help with a Checkout Area Simulator

    Sorry for the confusion. It's pretty much how you just explained it but it's according to each customer's transaction time and the total simulation time you set. You can set the total simulation time...
  13. Replies
    10
    Views
    2,635

    Re: Need some help with a Checkout Area Simulator

    Ah, that's in the "CheckoutArea" file. Second one down from the previous post. All of the events are handled there, from cashier free to busy, to customer waiting and being served, to setting up the...
  14. Replies
    10
    Views
    2,635

    Re: Need some help with a Checkout Area Simulator

    Absolutely. First, you enter all of the required fields that the program is asking for (total simulation time, max transaction time, chances of a new customer entering the queue, number of cashiers,...
  15. Replies
    10
    Views
    2,635

    Need some help with a Checkout Area Simulator

    Hi all,

    I've been working on this project for the past week and feel like I'm almost done. I've worked through most of the bugs but one is escaping me. The program is a Checkout Area Simulator for...
  16. Thread: Greetings

    by Semion
    Replies
    1
    Views
    833

    Greetings

    Hey all,

    Just googled for a Java help forum and this one popped up. I'm a CS student in San Francisco and have a passion for programming. I'm a beginner, but am looking forward to learning all I...
Results 1 to 16 of 16