Order Now

Pseudocode

Category:

No matching category found.

0 / 5. 0

Words: 275

Pages: 1

723

Pseudocode
Firstname Lastname
Name of University
Pseudocode
Situation
You are driving a car coming to an intersection that has a stop sign. You will make a right turn at the intersection.
Pseudocode
Main Module
Declare Driver as Real
Declare Steering as RealDeclare Accelerator as Real Declare BrakePedal as Real
Declare Indicator as Real
Declare CarState as Real
Declare RoadState as Real
Call DriveCar Module Call TurnCar Module
End Main Module DriveCar Module
If no Intersection
Do
Put car into Drive gear
Do
If roadState or mirrorStatus is clear
Press the accelerator
Else
Press BrakePedal
End If
While CarState is not Stopped
WHILE Driver wants to continue
Else
Check intersection sign
If intersection sign is stop
If roadState is not clear
Press BrakePedal
Else
Continue to drive
End If
End If
End If
End DriveCar Module TurnCar Module
If Driver wants to turn right
Press right Indicator
Else If Driver wants to turn left
Press left indicator
End If
While Driver wants to turn If RoadState is clear
While Turn is not completePress accelerator
Move Steering in appropriate direction End WhileMove Steering back to straight direction
Call DriveCar Module
End
Else Wait till RoadState is clear
End WhileEnd TurnCar Module
Inputs and Expected Outputs
Input Expected Output
Turn Indicator On Car’s indicator starts to flash
Move Steering Car moves in appropriate direction
Press Brake Car slows down
Press Accelerator Car starts moving
Logical Steps
The Driver drives the car till intersection is reached.

Wait! Pseudocode paper is just an example!

If the intersection has a stop sign and the road is busy as well, the driver will stop the car till the road clears.
If the intersection is clear and the driver wants to take a turn, the driver turns on the car’s indicator and takes the turn. If the intersection is busy, he/she waits till the intersection is clear.

Get quality help now

Ashley Miller

5.0 (201 reviews)

Recent reviews about this Writer

Thank you for your services, they are really helpful! I was ready to give up my term paper because I just haven’t any idea what to write about. I’ve found a couple of ideas here and finished my piece without hurdles.

View profile

Related Essays

Revenge of the Electric Car

Pages: 1

(275 words)

The Origins of Nations States

Pages: 1

(275 words)

Books Iv Of The Republic Of Plato

Pages: 5

(1375 words)

Tesla Cars: Model X

Pages: 3

(771 words)

Evolution Of Olympic Games

Pages: 1

(404 words)

Does Sex Sell?

Pages: 1

(275 words)

Health and Social Care Revised

Pages: 8

(2200 words)

Bad choices

Pages: 3

(825 words)

Cell analogy

Pages: 3

(1650 words)