7
7
Cake
- flavor: String
- icingFlavor: String
- diameter: float
- price: float
+ Cake(flavor: String, icingFlavor: String,
diameter: float, price: float)
+ getFlavor(): String
+ setFlavor(flavor: String): void
+ getIcingFlavor(): String
+ setIcingFlavor(icingFlavor: String): void
+ getDiameter(): float
+ setDiameter(diameter: float): void
+ getPrice(): float
+ setPrice(price: float): void
class Cake
Declarations
private string flavorCake
private string flavorIcing
private float diameter
private float price
endClass
7-B
start
Declarations
Cake flavorOption
flavorOption.setFlavorA("Chocolate")
flavorOption.setFlavorB("Mocha")
displayItem(flavorOption)
stop
7-C
start
Declarations
num SIZE = 250
Cake cake[SIZE]
num sub
sub = 0
while sub < SIZE
cake[sub] = getCakeValues()
sub = sub + 1
endwhile
displayItems(items, SIZE)
stop
7-D
start
Declarations
num SIZE = 250
Cake cake[SIZE]
num sub
sub = 0
while sub < SIZE
cake[sub] = getCakeValues()
sub = sub + 1
endwhile
displayItems(items, SIZE)
stop