PSUEDOCODE SBA PROGRAM
PSUEDOCODE SBA PROGRAM
(Ticket System)
BY KARL HAYE
START
Declare name, license_num, status as string
points,pay_date,offence, period,issue_date, Up_points as integer
Cost as real
Name “ ”
License_num“ ”
points=50
Pay_date=0
Offence=0
Period=0
Issue_date=1
Cost=0
Print “ Please enter your name of the motorist( to terminate the program enter end)”
Read name
While name<> ‘end’ do
Print “Please enter your license number”
Read license Num
Print “seatbelt=1”
Print “Expired fitness/registration=2”
Print “Defective vehicle=3”
Print “Racing=4”
Print “Suspended licenses=5”
Print “illegal parking=6”
Print “Please state the number for the offence that was committed”
Read offence
Print “Please state the status(paid or unpaid) of your ticket”
Read status
If status= “paid” then
Print “please enter the day paid in April”
Print “ ”
Read pay_date
Period= pay_date – issue_date
Endif
If status= “unpaid” then
Print “YOU MUST ATTEND COURT”
ENDIF
If offence=1 then
Up_points=points-1
Endif
If offence=2 then
Up_points=points-8
Endif
If offence=3 then
Up_points=points-11
Endif
If offence=4 then
Up_points= points-10
Endif
If offence=5 then
Up_points=points-15
Endif
If offence=6 then
Up_points=points-3
Endif
Cost=points*1050
If period>21 then
Cost=cost+(cost*0.20)
Endif
Print “ Offenders name”, name
Print
Print “license number =”, license_num
Print
Print “offence =’’,offence
Print
Print “status=’’, status
Print
Print “points =”, Up_points
Print “cost =”, cost
Print “please enter your name of the motorist(to terminate the program enter ‘end’ ’’
Read name
Endwhile
Stop