I am in my programing class right now for about 2 weeks. I have to say im struggling with it. I'm currently working in a homework assigment. I need to write it in a form of a IPO and pseudocode but the fourther i go in to coding i get lost more and more.
This is what i currently have:
Main Module
Declare Unit_Name as String
Declare Unit_Price_Per_Pound as Integer
Declare Unit_Price_Per_Ounce as Integer
Declare Weight_In_Pound as Integer
Declare Weight_In_Ounce as Integer
Declare Total_Weight_In_Pounds as Integer
Declare Total_Weight_In_Ounces as Integer
Declare Total_Unit_Weight as Real
Declare Display Unit_Name as String
Declare Display Weight_In _Pound as Integer
Declare Display Weight_In _Ounce as Integer
Declare Display Total_Price¬_Per_Pound as Real
Declare Display Total_Price_Per_Ounce as Real
Declare Display Total_Price as Real
Declare Display Message as String
Call Unit_Name Module
Call Unit_Price_Per_Pound Module
Call Unit_Price_Per_Ounce Module
Call Weight_In_Pound Module
Call Weight_ In_Ounce Module
Call Total_Unit_Weight Module
End Main Module
GetInput Module
Display "Enter Unit_Name"
Input Name*Dark Brew coffee
Display "Enter Unit_Price_Per_Pound "
Input Unit_Price_Per_Pound *$1
Display "Enter Unit_Price_Per_Ounce "
Input Unit_Price_Per_Ounce *$16
Display "Enter Unit_Total_Weight_Pounds "
Input Total_Weight*3
Display "Enter Unit_Total_Weight_Ounce "
Input Total_Weight*0
End GetInput Module
Calculate Weight Module
Total_Weight in Pounds*3.00= Unit_Price_Per_Pound *$1
Total_Weight in Ounces*2=Unit_Price_Per_Ounce*$16
Total_Weight in Pounds*3 X Unit_Price_Per_Pound *$1.00 = Total_Price_Per_Pound*$3.00
Total_Weight in Ounces*2 X Unit_Price_Per_Ounce *$0.16 =Total_Price_In_Ounce*$0.32
End Calculate Weight Module
Display Module
Display "Dark Brew Coffee” Unit_Name
Display "Price Per Pound is" Unit_Price_Per_Pound *$1.00
Display "Price Per Ounce is" Unit_Price_Per_Ounce *$0.32
Display "Your Total Today is:” Total_Price*$3.32
Display “Thank You” Message
End Display Module
the purpose of this assigment is to display price per ounce.
In no way shape or form im looking for someone to do m homework, Please do not write the code for me i just need advice and guidence
and some help on calculating module.
*=means for example
My questions are:
Do I even need to mention pounds when I only was assigned to display ounces?
I tried VTC tutorials but are there any visual video tutorials avaliable elsewhere?
Edited by Jordan, 11 September 2009 - 04:30 AM.
Please use code tags


Sign In
Create Account

Back to top









