[go: up one dir, main page]

0% found this document useful (0 votes)
125 views3 pages

Assignment One

The document describes simulating a car's fuel gauge and odometer. It will model fuel level and distance over time considering factors like consumption and refueling. The simulation aims to accurately represent these values. Components like the car, fuel level, distance, driving and refueling events are identified.

Uploaded by

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

Assignment One

The document describes simulating a car's fuel gauge and odometer. It will model fuel level and distance over time considering factors like consumption and refueling. The simulation aims to accurately represent these values. Components like the car, fuel level, distance, driving and refueling events are identified.

Uploaded by

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

Markian Mumba 22ZAD106537

Assignment one

Simulation of a cars fuel gauge and odometer

Problem Formulation
The fuel gauge consists of the sending unit and the indicator. The sending unit is in the
tank while the indicator is on the dashboard. While the odometer is to measure the
distance travelled by a vehicle
The simulation of a car's fuel gauge and odometer aims to model the behaviour
of a car's fuel system and track its distance travelled. The goal is to accurately
represent the fuel level and distance travelled over time, taking into account various
factors such as fuel consumption, refuelling, and other events that may impact the fuel
system. The simulation of a car's fuel gauge and odometer aims to model the
behaviour of a car's fuel system and track its distance travelled. The goal is to
accurately represent the fuel level and distance travelled over time, taking into account
various factors such as fuel consumption, refuelling, and other events that may impact
the fuel system.

SMART objectives
Specific, Measurable, Achievable, Relevant and Time-Bound
● The objective of this simulation is to create a model that accurately represents
the fuel level and distance travelled by car over time. The model should be
specific, measurable, achievable, relevant, and time-bound, with a target
completion date for the simulation to be functional and ready for use.

Identify the following Components


1. Entity:
The main entity in this simulation is the car, which is of interest to the system.
2. Attribute:
The attributes of the car are its fuel level and distance travelled.
3. Activity:
The activity in the simulation is the operation of the car, including driving,
refuelling, and other events that may impact the fuel system.
4. State:
The state of the system is described by the current fuel level and distance
travelled, which are updated as the car is driven and refuelled.
5. Event:
An event in the simulation is an instantaneous occurrence, such as refuelling or
a change in fuel consumption, that may impact the fuel level and distance
travelled.

Flow Diagram
[Start]
|
v
[Fuel Level Check]
|
| (Fuel Level >= 0)
|____________
| |
| v
| [Drive Car]
| |
| | (Fuel Level < 0)
| |_____________
| |
| v
| [Refuel Car] [Stop Car]
| |
| v
| [Fuel Level Check] [End]
| |
v v
[Drive Car]<----------------[End]
Sequence Diagram

[Car] ---> [Fuel Gauge]


|
|fuel_level = check_fuel_level()
|
<--- [Fuel Gauge]
|
[Car] ---> [Odometer]
|
|distance = check_distance_traveled()
|
<--- [Odometer]

You might also like