Thread: Nassi_Schneiderman Flowchart help please!

  1. #1
    Registered User
    Join Date
    Feb 2013
    Posts
    10

    Nassi_Schneiderman Flowchart help please!

    So my teacher never taught us how to draw a Nassi-Schneiderman Flowchart, and I have attached what I have done (but I'm not sure if it is correct). This is the code for the flowchart:

    inFile >> id >> name >> sex >> exam1 >> exam2 >> exam3;


    avg = (exam1 + exam2 + exam3)/3;

    outFile << "~*< Exam AVG Report >*~" << endl << endl;
    outFile << "Name: " << name << " " << "Id: " << id << " " << "Sex: " << sex << endl << endl;
    outFile << "Exam1 = " << exam1 << endl;
    outFile << "Exam2 = " << exam2 << endl;
    outFile << "Exam3 = " << exam3 << endl << endl;
    outFile << "AVG Of Exams = " << (exam1 + exam2 + exam3)/3 << endl << endl;
    outFile << "~ end ~" << endl;

    My problem is the second "outFile" line. I am not sure how to correctly add "Name: ", "Id: ", and "Sex: " in the flowchart, as the output for this is all on one line. Could someone tell me if my attached picture is correct, or how I can correctly make this flowchart with these outputs on one line?? Any help would be GREATLY appreciated. Thank you!!
    Attached Images Attached Images Nassi_Schneiderman Flowchart help please!-flowchart1-jpg 

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,656
    Well having read this -> https://en.wikipedia.org/wiki/Nassi-Shneiderman_diagram
    What you have seems OK.

    In the absence of any loops or decisions, it's just a list of boxes.

    > My problem is the second "outFile" line. I am not sure how to correctly add "Name: ", "Id: ", and "Sex: " in the flowchart, as the output for this is all on one line.
    The purpose of the flowchart is to capture the essence of the program, not be a 1:1 duplication of the code in another form.

    Normally, you're supposed to come up with the flowchart, THEN do the code - not the other way round.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Feb 2013
    Posts
    10
    Quote Originally Posted by Salem View Post
    Well having read this -> https://en.wikipedia.org/wiki/Nassi-Shneiderman_diagram
    What you have seems OK.

    In the absence of any loops or decisions, it's just a list of boxes.

    > My problem is the second "outFile" line. I am not sure how to correctly add "Name: ", "Id: ", and "Sex: " in the flowchart, as the output for this is all on one line.
    The purpose of the flowchart is to capture the essence of the program, not be a 1:1 duplication of the code in another form.

    Normally, you're supposed to come up with the flowchart, THEN do the code - not the other way round.
    Thank you so much! I wasn't sure if it was correct as the output reads Name:, Id: and Sex: on the same line. I really appreciate your reply. Thank you again! I do understand that I was supposed to design the NS flowchart before I started coding. I am just starting out, and I felt more comfortable programming first. I guess I will just have to keep practicing!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with flowchart.
    By blur606 in forum C Programming
    Replies: 8
    Last Post: 11-12-2012, 08:14 AM
  2. Flowchart help
    By MstrKurt in forum C Programming
    Replies: 8
    Last Post: 01-17-2012, 01:23 AM
  3. Need help with flowchart
    By moey187 in forum C++ Programming
    Replies: 2
    Last Post: 04-14-2011, 04:25 AM
  4. flowchart. Help!!!
    By chema124 in forum C Programming
    Replies: 3
    Last Post: 12-10-2002, 10:00 AM
  5. Flowchart
    By ob1cnobe in forum C++ Programming
    Replies: 4
    Last Post: 06-05-2002, 12:03 PM