Question: Please modify per instructions: start / / Declarations num SIZE = 1 0 string names [ SIZE ] num properties [ SIZE ] num values

Please modify per instructions:
start
// Declarations
num SIZE =10
string names[SIZE]
num properties[SIZE]
num values[]
num count
num NUM_TO_DISPLAY =3
num comps
num x
num y
num tempProp
num tempVal
string tempName
string QUIT ="ZZZZ"
string choice
num numEntered
call getReady()
call display()
call finish()
stop
getReady()
count =0
output "Enter salesperson name
output tempName
while tempName != QUIT OR count = SIZE
names[count]= tempname
output "Enter number of properties sold "
input properties[tempname]
output "Enter total value of those properties "
input values[tempname]
count = count +1
if count = SIZE then
output "Enter salesperson name or ", QUIT, " to quit "
output tempName
endif
numEntered = count
end
return
display()
choice ="X"
while choice >"P" OR choice >"V"
output "Do you want to see the top three salespeople by (V)alue"
output "or by number of (P)roperties sold? "
output choice
endwhile
if choice ="V"
valueSort()
else
propertySort()
endif
count =0
if numEntered =3 then
numToDisplay = numEntered
else
numToDisplay =3
endif
while count = numToDisplay
output names[count], properties[count], values[count]
count = count +1
end
return
finish()
output "End of display"
return
valueSort()
comps = numEntered +1
while y = comps
x =0
while x = comps
if values[x]= values[x +1] then
swap()
endif
x = x +1
endwhile
y = y +1
end
return
propertiesSort()
comps = numEntered +1
while y = comps
x =0
while x = comps
if properties[x]= properties[x +1] then
swap()
endif
x = x +1
endwhile
y = y +1
end
return
void swap()
tempName = names[x -1]
names[x -1]= names[x]
names[x]= tempName
tempProp = properties[x -1]
properties[x -1]= properties[x]
properties[x]= tempProp
tempVal = values[x -1]
values[x -1]= values[x]
values[x]= temp
return
 Please modify per instructions: start // Declarations num SIZE =10 string

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!