Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-07-2009, 05:12 AM
Member
 
Join Date: Nov 2009
Posts: 2
Rep Power: 0
Syra is on a distinguished road
Default Help with program
I'm actually not quite sure whether this should be under Advanced or Beginners at the moment but I really need help with this.

For my assignment that's due, I need to implement a queue, making sure all of the methods are implemented, and also write a driver to test it that creates a stack of Strings and reads in a series from standard input. The thing is- if the string starts with an "@" is is one of the particular commands for the program, including @Dequeue, @First, @Size, and @Display. I'm not sure on how to get my program to recognize the @ at the beginning and do what I want it to do based upon the command.

I'm not sure if say a switch statement would work or maybe some kind of if else code set...
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 11-07-2009, 05:17 AM
Fubarable's Avatar
Moderator
 
Join Date: Jun 2008
Posts: 6,494
Rep Power: 8
Fubarable is on a distinguished road
Default
if / else sounds good to me. Why not try that?
__________________
When posting code, please use code tags so that your code is readable. To do this, place the tag [code] before your block of code and [/code] after your block of code.
How to use Code Tags
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 11-07-2009, 06:37 AM
Member
 
Join Date: Nov 2009
Posts: 2
Rep Power: 0
Syra is on a distinguished road
Default
Thank you for your help
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
execute java program within java program popey New To Java 2 10-22-2009 06:32 PM
Execute A program from a Program! Moncleared Advanced Java 2 02-22-2009 05:17 PM
Executing a program within a program gibsonrocker800 New To Java 5 05-12-2008 09:24 AM
How to execute an External Program through Java program Java Tip java.io 0 04-04-2008 03:40 PM
How to execute an External Program through Java program JavaBean Java Tips 0 10-04-2007 10:33 PM


All times are GMT +2. The time now is 09:04 PM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org