Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

mmaaee Group Title

will you please give me codes how to make a grocery line simulator in java?

  • one year ago
  • one year ago

  • This Question is Open
  1. KonradZuse Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    ??

    • one year ago
  2. rsmith6559 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    A line is a queue. A FIFO ( first in first out ) data structure. I'd bet that Java has a class for that, and javadoc has info about the class.

    • one year ago
  3. msmithhnova Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    I don't know what is available in Java but if you wanted to build your own instead of using a built in then there would be several options. If you know the maximum size of the queue, you could use an array and modular arithmetic to "move" the head of the line. You could also used a linked list type of structure for any size where you simply "push" (add) elements to the end of the list and "pop" remove elements from the start. These are a couple of options.

    • one year ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.