Asked by tajay johnson
1. Create a pseudocode algorithm that will accept the name of the motorists and the type of offence for the ticket. Determine if the tickets will be awarded a demerit point and check the current point(s) each motorist has on his or her licence. Display the updated points for the motorist. If the motorist has over 19 points, his or her licence will be suspended for 2 years. Other suspensions are based on 10 – 13 points for 6 months suspension and 14 – 19 points for 1 year suspension. Store the list of all suspended motorists. Display the names of the suspended motorists and the penalties.
Answers
Answered by
Steve
read name, offence
points = findpoints(offence)
p = addpoints(name,points)
suspension = (p>19):24?(p>13):12?(p>9):6:0
if suspension > 0 then
addsuspension(name,suspension)
display name,p,suspension
end if
points = findpoints(offence)
p = addpoints(name,points)
suspension = (p>19):24?(p>13):12?(p>9):6:0
if suspension > 0 then
addsuspension(name,suspension)
display name,p,suspension
end if
There are no AI answers yet. The ability to request AI answers is coming soon!
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.