- so this is the question.
-rick hammer is a carpenter who wants an application to compute the price of any desk a customer orders, based on the following: desk length and width in inches, type of wood, and number of drawers. The price computes as follows.-The minimum charge for all desks is 200 $
-If the surface (length*width) is over 750 square inches add 50 $ .
-If the wood is mahogany, add 150 $; for oak, add 125 $. No charge is added for pine.
-For every drawer in the desk, there is an additional 30 $ charge.
The Question.
- Design a pseudocode for the program.
a) A program that accepts data for an order number, customer name, length and width of the desk ordered, type of wood, and number of drawers. Display all the entered data and final price for the desk.
this is my pseudo-code
Start
Declarations
String Customer_Name
Num Order_Number
Num Length,_Width
String Type_of_Wood
Num Price=200
Num _of _Drawers
Num Total_Cost
HouseKeeping ()
Input Customer_Name
Output Please enter Customer_Name
Input Order_Num
Output Please enter Order_Num
Input Lenghth,_Width
Output Please enter Lenghth,_Width
Input Type_Of_Wood
Output Please enter Type_of_Wood
Input Num_of_Drawers
Output Please enter Num_of_Drawers
Input Price=200
Output Price=200
Num Total_Cost
Return
Detail ()
If Lenghth,_Width > 750 then
Price=200+50
If Type_of_Wood = “Mahogany” Then
Price=200+150
If Type_of_Wood=”Oak” Then
Price=200+125
If Type_of_Wood= Pine Then
Price=200+0
If Num_of_Drawers < 1 Then
Price=200+30
Output: Order_Num, Customer_Name, and Total_Cost
Return
End of Job ()
Option Explicit On
‘Output: “Thanks for using my program”
okay i tried and this is what i think it can be for visual basic.
'FinalPriceOfDesk.Vb - This program accepts data for an order number, customer name, length and width of the desk ordered, type of wood, and number of drawers. Display all the entered data and final price for the desk.'
Option Explicit On
Option Strict On
Module FinalPriceOfDesk
Sub main ()
'Work done in the Declarations Module
String Customer_Nam
Num Order_Number
Num Length,_Width
String Type_of_Wood
Num Price=200 as Integer
Num _of _Drawers
Num Total_Cost
'Work done in the HouseKeeping Module
Dim Input Customer_Name
Output Please enter Customer_Name
Dim Input Order_Num
Output Please enter Order_Num
Dim Input Lenghth,_Width
Output Please enter Lenghth,_Width
Dim Input Type_Of_Wood
Output Please enter Type_of_Wood
Dim Input Num_of_Drawers
Output Please enter Num_of_Drawers
Dim Input Price=200
Output Price=200
Dim Num Total_Cost
If Lenghth,_Width > 750 then
Dim Price=200+50
If Type_of_Wood = “Mahogany” Then
Dim Price=200+150
If Type_of_Wood=”Oak” Then
Dim Price=200+125
If Type_of_Wood= Pine Then
Dim Price=200+0
If Num_of_Drawers < 1 Then
Dim Price=200+30
End If
System.Console.WriteLine("Customer_Name: " & Order_Number: " & Total_Cost)
System.Console.WriteLine("Thank You For Using My Program)
End Sub
I know I am probaly wrong please help...


Sign In
Create Account

Back to top









