Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 7 of 7

Thread: Word problem...PROBLEM!

  1. #1
    Junior Member
    Join Date
    Dec 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Word problem...PROBLEM!

    Hi guys!... im having a hard time analyzing about this word problem that was given to me, can anyone help me or atleast give an idea on how to solve this?...

    Word Problem---
    A queue is a list that is used in a restricted way. Items are always added to the end of the list. For example, when X is added to A, B, C, the result is A, B, C, X. items can only be removed from the front of the list. In order to remove C from the list, A and B must first be removed. Write a set of methods for treating an array of character of characters as queue. It should include method for insertion and deletion. The limits of the arrays index should be defined constants of type integer.


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,172
    My Mood
    Hungover
    Thanks
    141
    Thanked 600 Times in 515 Posts

    Default Re: Word problem...PROBLEM!

    Write a set of methods for treating an array of character of characters as queue. It should include method for insertion and deletion.

  3. #3
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 287 Times in 225 Posts
    Blog Entries
    4

    Default Re: Word problem...PROBLEM!

    Have you started to write any code yet?

    Please show us what you have and we can help you move forward..
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

    Looking for a Java job? Visit - Java Programming Careers

  4. #4
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,896
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: Word problem...PROBLEM!

    I would recommend using a doubly linked list. You'll need to keep track of the head/tail nodes, but you'll only need to concern yourself with adding a node at the tail and removing nodes from the head (or vise-versa). Using an array would work too, but I think is a little bit counter-intuitive and inefficient.

  5. #5
    Junior Member
    Join Date
    Dec 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Word problem...PROBLEM!

    Quote Originally Posted by JavaPF View Post
    Have you started to write any code yet?

    Please show us what you have and we can help you move forward..
    honestly i haven't started making yet because it makes me kinda confuse on where to start... can you help me sir?

  6. #6
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,896
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: Word problem...PROBLEM!

    If you're unsure on how to program in Java, I'd suggest reading Trail: Learning the Java Language (The Java™ Tutorials).

  7. #7
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,172
    My Mood
    Hungover
    Thanks
    141
    Thanked 600 Times in 515 Posts

    Default Re: Word problem...PROBLEM!

    Starting Writing a Program

Similar Threads

  1. Need help in analyzing this word problem.
    By daveewhit in forum What's Wrong With My Code?
    Replies: 1
    Last Post: November 29th, 2010, 07:36 AM
  2. Word filter assignment help
    By normandygahn in forum What's Wrong With My Code?
    Replies: 3
    Last Post: September 15th, 2010, 07:42 AM
  3. [SOLVED] Is "Public void closeFile()" a problem in the program for AS-Level computing project
    By muffin in forum What's Wrong With My Code?
    Replies: 2
    Last Post: August 5th, 2009, 09:12 PM
  4. [SOLVED] [Problem] imports javax.swing problem
    By Brollie in forum AWT / Java Swing
    Replies: 8
    Last Post: July 5th, 2009, 07:59 AM
  5. Java program for 2-D Array Maze
    By Peetah05 in forum Collections and Generics
    Replies: 11
    Last Post: May 8th, 2009, 04:30 AM