Thread: Need Help. Design a simple program

  1. #1
    Registered User
    Join Date
    Mar 2011
    Posts
    4

    Need Help. Design a simple program

    Design a program that will ask a user to input different types of Canadian coins to make up exactly two dollars. The user can choose to input any Canadian coin followed by the number of the coin value. For example, a user can choose to input a one-dollar coin followed by the how many to use for the calculation. The program should calculate the total value input and display to the user if he/she was correct.
    Required steps:
    1. The program has to be designed with a flowchart, using the conventional symbols discussed in class. The logic in the flowchart and the pseudo-code has to match precisely.
    2. All code has to be written in pseudo-code in a text editor of your choice. Use the pseudo-code conventions discussed in class (I.e. proper declarations, data-types etc.).
    3. All code has to be fully commented using the conventions discussed in class. Comments have to be descriptive and comprehensive to fully explain your thought process.
    4. Ensure input validation is enforced.
    5. Has to include modules and decision structures.

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Read the homework policy. No one cares that you're going to come back and say "but it's not homework, it's something I'm doing in my free time" either. The same concept applies. We aren't here to write everything for you. Put some effort in.


    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Welcome to the forum, Jowett!

    We need to have the students show a good effort before we jump in to help - otherwise we're inundated by students who just want their homework done, for gratis.

    We're not the best at interpreting what the teacher wants also, since we haven't been in the class, reading your chapter of the book this week, etc.

    Give it a good try, and let us know what has you stumped (if anything does). Be sure to post your code. The more specific you are, the better the help can be.

  4. #4
    Registered User
    Join Date
    Mar 2011
    Posts
    4
    Module main ()
    //Display the Starting message.
    Call startingMessage()
    Display “press a key to see step 1.”
    Input
    //display step 1
    Call step 1()
    Display “enter how many toonie”
    Input num1
    //display step 2
    Call step 2()
    Display “enter how many loonie”
    Input num2
    //display step 3
    Call step 3()
    Display “enter how many quarter”
    Input num3
    //display step 4
    Call step 4()
    Display “enter how many cent”
    Input num4
    //display total
    Call total()
    End Module
    Module step 1()
    Set num1=value*200
    Display “step 1”
    End Module
    Module step 2()
    Set num2=value*100
    Display “step 2”
    End Module
    Module step 3()
    Set num3=value*25
    Display “step 3”
    End Module
    Module step 4()
    Set num4=value*1
    Display “step 4”
    End module
    Module total()
    Set total=num1+num2+num3+num4
    End Module
    If total==200
    Display “It is two dollor”
    Else
    Display “please count again”
    End if


    it is gonna works?

  5. #5
    Registered User
    Join Date
    Mar 2011
    Posts
    4
    Quote Originally Posted by Adak View Post
    Welcome to the forum, Jowett!

    We need to have the students show a good effort before we jump in to help - otherwise we're inundated by students who just want their homework done, for gratis.

    We're not the best at interpreting what the teacher wants also, since we haven't been in the class, reading your chapter of the book this week, etc.

    Give it a good try, and let us know what has you stumped (if anything does). Be sure to post your code. The more specific you are, the better the help can be.
    please help

  6. #6
    Registered User
    Join Date
    Mar 2011
    Posts
    4
    Quote Originally Posted by Adak View Post
    Welcome to the forum, Jowett!

    We need to have the students show a good effort before we jump in to help - otherwise we're inundated by students who just want their homework done, for gratis.

    We're not the best at interpreting what the teacher wants also, since we haven't been in the class, reading your chapter of the book this week, etc.

    Give it a good try, and let us know what has you stumped (if anything does). Be sure to post your code. The more specific you are, the better the help can be.
    Module main ()
    //Display the Starting message.
    Call startingMessage()
    Display “press a key to see step 1.”
    Input
    //display step 1
    Call step 1()
    Display “enter how many toonie”
    Input num1
    //display step 2
    Call step 2()
    Display “enter how many loonie”
    Input num2
    //display step 3
    Call step 3()
    Display “enter how many quarter”
    Input num3
    //display step 4
    Call step 4()
    Display “enter how many cent”
    Input num4
    //display total
    Call total()
    End Module
    Module step 1()
    Set num1=value*200
    Display “step 1”
    End Module
    Module step 2()
    Set num2=value*100
    Display “step 2”
    End Module
    Module step 3()
    Set num3=value*25
    Display “step 3”
    End Module
    Module step 4()
    Set num4=value*1
    Display “step 4”
    End module
    Module total()
    Set total=num1+num2+num3+num4
    End Module
    If total==200
    Display “It is two dollor”
    Else
    Display “please count again”
    End if

  7. #7
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    This is one of those assignments where you need to have been in the class, to know what the instructor wants.

    Tater, you're in Canada. This is right up your alley.

    Does this match up with your flowchart?

    (I'm still laughing over "toonie" and "loonie")
    Last edited by Adak; 03-06-2011 at 01:55 AM.

  8. #8
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Adak View Post
    Tater, you're in Canada. This is right up your alley.
    (I'm still laughing over "toonie" and "loonie")
    LOL... google some images ...
    You'll discover a twonie is a coin inside a coin and the original loonie had a loon on one side....the names actually are appropriate.

    And whoever said mint-geeks don't have a sense of humour???



    OP: You really need to knuckle down and make some sincere effort here.
    We're not going to do your homework for you.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Homework Help, simple program, unsure newbie :(
    By Aslan14 in forum C Programming
    Replies: 13
    Last Post: 11-14-2010, 05:07 PM
  2. im a noob at c++, do you think so?
    By belRasho in forum C++ Programming
    Replies: 6
    Last Post: 04-25-2010, 11:02 PM
  3. Simple window program
    By baniakjr in forum C++ Programming
    Replies: 5
    Last Post: 03-11-2006, 03:46 PM
  4. Help with simple program
    By nik2007 in forum C++ Programming
    Replies: 4
    Last Post: 02-27-2006, 09:54 AM