Partners Project: Aditya, Abdullah
HOW TO BUILD A TABLE:
(A) Welcome to your table company
//assuming 1 = new value needed, 0 = keeping value
changewidth = 1
changelength = 1
changeheight = 1
(B) If (changewidth ==1). //assume need the width value
repeat
Ask for width between 20 and 30 inches
Get width
If ((width < 20) or (width >30))
display error message
Go to line (B)
until (width >= 20) && (width <= 30)
(C) If (changelength ==1). //assume need the length value
repeat
Ask for length between width and 40 inches
Get length
If ((length < width) or ( length > 40))
display error message
Go to line (C)
until (length >= width) && ( length <= 40)
(D) If (changeheight ==1). //assume need height value
repeat
Ask for height between 28 and 32 inches
Get height
If (( height < 28) or ( height > 32))
display error message
Go to line (D)
until (height>= 28) && (height <=32)
If press 1 // change length
changewidth = 0
changewidth = 0
Go to line (C)
If press 2 // change width
changelength = 0
changeheight = 0
Go to line (B)
If press 3 // change height
changewidth = 0
changelength = 0
Go to line (D)
If press 4 // reset everything
Go to line (B)
AREA = length x width
print(this is your area of the table)
print(AREA)
PERIMETER = ( length x 2) + ( width x 2)
print(this is your perimeter of the table)
printe(PERIMETER)
print(this is your table height)
print(HEIGHT)
print(price of the table top will be $2 per inch^2, the legs will be $4 per inch)
costtable = AREA x 2
costlegs = HEIGHT x 4
Costtotal = costtable + costlegs
print(costtotal)
(E)print(choose what material should be used for table top material?)
press 1 for wood
press 2 for glass
press 3 for marble
(F)print(what colour would like?)
colour = dark brown, black, white, or red
Get colour
If colour doesn't = dark brown, black, white, or red
display error message
Go to line (F)
print(colours are free)
print(delivery/pick-up)
press 1 for delivery
press 2 for pick-up
If press 1 then
Ask for user address then start delivery process
If press 2 then
display the table company address
print(would you like to purchase another table?)
If yes
Go to line (B)
print(costtotal)
HOW TO BUILD A TABLE:
(A) Welcome to your table company
//assuming 1 = new value needed, 0 = keeping value
changewidth = 1
changelength = 1
changeheight = 1
(B) If (changewidth ==1). //assume need the width value
repeat
Ask for width between 20 and 30 inches
Get width
If ((width < 20) or (width >30))
display error message
Go to line (B)
until (width >= 20) && (width <= 30)
(C) If (changelength ==1). //assume need the length value
repeat
Ask for length between width and 40 inches
Get length
If ((length < width) or ( length > 40))
display error message
Go to line (C)
until (length >= width) && ( length <= 40)
(D) If (changeheight ==1). //assume need height value
repeat
Ask for height between 28 and 32 inches
Get height
If (( height < 28) or ( height > 32))
display error message
Go to line (D)
until (height>= 28) && (height <=32)
If press 1 // change length
changewidth = 0
changewidth = 0
Go to line (C)
If press 2 // change width
changelength = 0
changeheight = 0
Go to line (B)
If press 3 // change height
changewidth = 0
changelength = 0
Go to line (D)
If press 4 // reset everything
Go to line (B)
AREA = length x width
print(this is your area of the table)
print(AREA)
PERIMETER = ( length x 2) + ( width x 2)
print(this is your perimeter of the table)
printe(PERIMETER)
print(this is your table height)
print(HEIGHT)
print(price of the table top will be $2 per inch^2, the legs will be $4 per inch)
costtable = AREA x 2
costlegs = HEIGHT x 4
Costtotal = costtable + costlegs
print(costtotal)
(E)print(choose what material should be used for table top material?)
press 1 for wood
press 2 for glass
press 3 for marble
(F)print(what colour would like?)
colour = dark brown, black, white, or red
Get colour
If colour doesn't = dark brown, black, white, or red
display error message
Go to line (F)
print(colours are free)
print(delivery/pick-up)
press 1 for delivery
press 2 for pick-up
If press 1 then
Ask for user address then start delivery process
If press 2 then
display the table company address
print(would you like to purchase another table?)
If yes
Go to line (B)
print(costtotal)