Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 136,163 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,893 people online right now. Registration is fast and FREE... Join Now!




Psuedocode/Nassi Schneiderman Diagram Help

 
Reply to this topicStart new topic

Psuedocode/Nassi Schneiderman Diagram Help

Rating  5
c++izhere
6 Dec, 2007 - 12:38 PM
Post #1

New D.I.C Head
*

Joined: 12 Mar, 2007
Posts: 41


My Contributions
[me3]me[/code]



#1Write a program that will prompt the user for a color of hair(allow them to enter the code: 1,2 or 3). Using the file Models, display the names of all the people with specified color of hair.

Models:
"Hair","Eye","Age","Gender"
Betty Brevard 1 1 28 f
Sage Samuels 2 3 33 m
Lisa Lieman 3 2 19 f
Terry Tilde 2 1 40 f
Mike Michaels 1 3 29 f
Pat Patterson 3 3 41 m



This is what i have:


if hair_code = 1
Display "Blonde"
else
if hair_code= 2
Display "Brunette"
else
If hair_code=3
Display "Red"
else
Display "Error in Input"




# 2
Write a program that will prompt the user for gender(allow them to enter m or f). Using the file Models,display color of eyes and color of hair, for all people of the specified gender

Models:
"Same as above"


if gender = m
display "Sage Samuels 2,3", "Mike Michaels 1,3","Pat Patterson 3,3"
else
if gender = f
display " Betty Brevard 1,1", Lisa Lieman 3,2", "Terry Tilde 2,1"



This post has been edited by c++izhere: 6 Dec, 2007 - 12:47 PM
User is offlineProfile CardPM
+Quote Post

Martyr2
RE: Psuedocode/Nassi Schneiderman Diagram Help
6 Dec, 2007 - 12:51 PM
Post #2

Programming Theoretician
Group Icon

Joined: 18 Apr, 2007
Posts: 5,199



Thanked: 213 times
Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

My Contributions
Ummm great I guess? Not sure what the point of your thread is. smile.gif
User is online!Profile CardPM
+Quote Post

c++izhere
RE: Psuedocode/Nassi Schneiderman Diagram Help
6 Dec, 2007 - 12:53 PM
Post #3

New D.I.C Head
*

Joined: 12 Mar, 2007
Posts: 41


My Contributions
QUOTE(Martyr2 @ 6 Dec, 2007 - 01:51 PM) *

Ummm great I guess? Not sure what the point of your thread is. smile.gif




how 2 put in Pseudocode / Nassis- Diagram "Format"
User is offlineProfile CardPM
+Quote Post

Martyr2
RE: Psuedocode/Nassi Schneiderman Diagram Help
6 Dec, 2007 - 12:59 PM
Post #4

Programming Theoretician
Group Icon

Joined: 18 Apr, 2007
Posts: 5,199



Thanked: 213 times
Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

My Contributions
Ohhhh I had missed that part in the original post. Your question. I guess I will have to look better next time. wink2.gif
User is online!Profile CardPM
+Quote Post

c++izhere
RE: Psuedocode/Nassi Schneiderman Diagram Help
6 Dec, 2007 - 01:38 PM
Post #5

New D.I.C Head
*

Joined: 12 Mar, 2007
Posts: 41


My Contributions
QUOTE(Martyr2 @ 6 Dec, 2007 - 01:59 PM) *

Ohhhh I had missed that part in the original post. Your question. I guess I will have to look better next time. wink2.gif



can you help....
User is offlineProfile CardPM
+Quote Post

Martyr2
RE: Psuedocode/Nassi Schneiderman Diagram Help
6 Dec, 2007 - 02:38 PM
Post #6

Programming Theoretician
Group Icon

Joined: 18 Apr, 2007
Posts: 5,199



Thanked: 213 times
Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

My Contributions
Well first of all your answers are not right to what the questions are asking. For instance, in the first one you have to have do the following steps...

1) Get color number from user
2) Open file
3) Read Line
4) Does person have color hair matching user input?
5) If yes, print name
6) Read next Line
7) Close file

The nassi would then look like the one below. Notice that they are not asking you to display the hair color, they are asking you to display the people with that hair color they chose.

Attached Image

I will leave the second one up to you. You can use the first one as an example. Remember that these are to show the structure of the program, so don't try to immediately jump to code. Think of the steps. It is like pseudocode but graphically.

Enjoy!

"At DIC we be nassi-ass-kicking code ninjas!" decap.gif



User is online!Profile CardPM
+Quote Post

c++izhere
RE: Psuedocode/Nassi Schneiderman Diagram Help
7 Dec, 2007 - 09:49 AM
Post #7

New D.I.C Head
*

Joined: 12 Mar, 2007
Posts: 41


My Contributions
QUOTE(Martyr2 @ 6 Dec, 2007 - 03:38 PM) *

Well first of all your answers are not right to what the questions are asking. For instance, in the first one you have to have do the following steps...

1) Get color number from user
2) Open file
3) Read Line
4) Does person have color hair matching user input?
5) If yes, print name
6) Read next Line
7) Close file

The nassi would then look like the one below. Notice that they are not asking you to display the hair color, they are asking you to display the people with that hair color they chose.

Attached Image

I will leave the second one up to you. You can use the first one as an example. Remember that these are to show the structure of the program, so don't try to immediately jump to code. Think of the steps. It is like pseudocode but graphically.

Enjoy!

"At DIC we be nassi-ass-kicking code ninjas!" decap.gif




thanks for ur help...thanks alot
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/1/08 11:57PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month