0% found this document useful (0 votes)
4 views2 pages

Pseudocode For It Sba

The document outlines pseudocode for a system that processes traffic violations by capturing details such as ticket number, motorist name, offense type, and current demerits. It calculates demerit points based on the offense type and determines the suspension period based on total demerits. The program continues to prompt for new entries until the user decides to stop.

Uploaded by

joshuaadams487
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Pseudocode For It Sba

The document outlines pseudocode for a system that processes traffic violations by capturing details such as ticket number, motorist name, offense type, and current demerits. It calculates demerit points based on the offense type and determines the suspension period based on total demerits. The program continues to prompt for new entries until the user decides to stop.

Uploaded by

joshuaadams487
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

PSEUDOCODE FOR IT SBA

Name of constants
Spo = 10,Heo = 4,Mpo = 5,Sbo = 3
suspension_3_months = '3 months'
suspension_6_months = '6 months'
suspension_1_year = '1 year'

Name of variables
ticketno, name, offence_type, suspension: string
current_demerits, demerit_points, total_demerits: integer

step 1 Start
step 2 Ticketno  ‘ ‘
step 3 Name  ‘ ‘
step 4 offence_type  ‘ ‘
step 5 suspension  ‘ ‘
step 6 current_demerits  0
step 7 demerit_points  0
step 8 total_demerits  0
step 9 repeat
step 10 output( "Enter ticket No.: ")
step 11 input( ticketno)
step 12 output( "Enter Motorist Name: ")
step 13 input( Name)
step 14 output( "Enter type of offense")
step 15 input(offence_type)
step 16 output(current demerit)
step 17 input( current_demerits)
step 18 If offence_type = "Spo" THEN
step 19 demerit_points  "Spo"
step 20 Else if offence_type= "Heo" THEN
step 21 demerit_points  "Heo"
step 22 Else if offence_type= "Mpo" THEN
step 23 demerit_points  "Mpo"
step 24 Else if offence_type= "Sbo" THEN
step 25 demerit_points  "Sbo"
step 26 Else output ("Invalid offence type")
step 27 endif
step 28 Total_demerits  demerit_points + current_demerits
step 29 IF Total_demerits < 5 THEN
step 30 suspension  suspension_3_months
step 31 Else If Total_demerits > 5 AND < 10 THEN
step 32 suspension  suspension_6_months
step 33 Else Suspension  suspension_1_year
step 34 endif
step 35 output('name:name')
step 36 output('offense type:offence_type')
step 37 output('suspension:suspension')
step 38 output('current demerits:current_demerits')
step 39 output('demerit points:demerit_points')
step 40 output('total demerits:total_demerits')
step 41 output('Enter [1] to stop or [0] to continue: ')
step 42 input(check)
step 43 until check = 1
step 44 Stop

You might also like