Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 26th, 2006, 5:16 PM   #1
snipez
Newbie
 
Join Date: Feb 2006
Posts: 2
Rep Power: 0 snipez is on a distinguished road
Help on basics

i need to incoparate the 'case' statement some where in my system that i have to create .

im producing one that , tells people how to organise a party . has any1 got an example of how at some point in the flow diagram i would incoparate a stage where a case statement would be needed?

the basics of my flow diagram at the moement consist of

produce guest list
Organise finance
Book venue
sort food/decorations

its really basic but its the start. any help would be most appreciated
snipez is offline   Reply With Quote
Old Feb 26th, 2006, 5:46 PM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Pseudocode:
while (noErrors)
   Printblock (
   Tasks:
      1) Produce guest list
      2) Organize finance
      3) Books
      4) Sort
   }
   Print (Select task to perform:)
   Get (userinput)
   switch (userinput) 
   {
      case 1: guestList (); break;
      case 2: finance (); break;
      case 3: books (); break;
      case 4: sort (); break;
      default: Print ("Bad input");
                 noErrors = false;
   }
}
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Feb 26th, 2006, 5:50 PM   #3
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 936
Rep Power: 4 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
Quote:
Originally Posted by snipez
im producing one that , tells people how to organise a party
...
produce guest list
Organise finance
Book venue
sort food/decorations
I wouldn't suggest using JavaScript/VBScript for this task.
titaniumdecoy is offline   Reply With Quote
Old Feb 26th, 2006, 6:06 PM   #4
snipez
Newbie
 
Join Date: Feb 2006
Posts: 2
Rep Power: 0 snipez is on a distinguished road
thankx Dawei , and i have the choice to use pseudo code . or make a flow diagram , just trying to work out how and where to post on this forum . would you lot recomend using a flow diagram ?
i mean i have been told to make sure that i start with 5 steps and from those branche of into 5 more and so on but no more than 5 . for example

as i have opted to do the system where it has to teach somebody how to plan and run a party. it would go as followed


Produce guest list -

have you produced a guest list = if no then ( at this point i need it to go back and repeat the question until completed this task).
once yes has been selcted then
have invites been produced if no then produce them .
have replies been retrieved if yes then
have you got a total guest list count.

thats really basic but im relaly just strating out so i guess its going to be like that. Thats just for the guest list part , i still have yet to cover other parts (venue,food/drink,finance)

i have also been old to use compound and nested statements , any1 with brief knowledge of these , as mine is non existent at the moe . also i got to many if statements going on anyway to get rid of these ? ..
snipez is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:28 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC