SVG Equipment Rental Tracking Program
SVG Equipment Rental Tracking Program
PROGRAMMING SBA
Statement of Problem
This program was done to help SVG rentals to keep track of equipment that was rented and the amount of days
each equipment was rented for. This program store information about customers who rented equipment for more
than 30 days or less.
Declaration of Variables
Equipment Data type Use
equipment String Use to store the name of equipment that are
rented
Stop String This variable is a condition variable used to either
continue the program by the entering of yes or
the termination of the program by the entering of
No.
weedwacker Integer To show the amount of time weedwacker was
rented for
tilescutter Integer To store the amount of time tilescutter was rented
for
powersaw Integer To store the amount of time powersaw was rented
for
wheelbarrow Integer To store the amount a time wheelbarrow was
rented for
scaffold Integer To store the amount of time scaffold was rented
for
electricaldrill Integer To store the amount of time electricaldrill was
rented for
generator Integer To store the amount of time generator was rented
for
cementmixer Integer To store the amount of time cementmixer was
rented for
lawnmower Integer To store the amount of time lawnmower was
rented for
J Integer
num_time Integer Use to store the amount a time equipment was
rented for
customer_name: array [1..10] String Contains the name of customer_name who
equipments
daysrented: array [1..9] Integer Contains the number of days equipment was
rented for
total Real To show sum of all sales
sale_of_equip Real To show the price of equipment
Initialization of Variables
num_time 0
weedwacker0
tilescutter0
powersaw 0
wheelbarrow 0
scaffold0
electricaldrill0
generator 0
cementmixer 0
lawnmower 0
total0
stop yes
FOR J 1 to num_time do
start
daysrented[J] 0
customer_name[J]
stop
ENDFOR
Pseudocode
START
num_time 0
weedwacker 0
tilescutter 0
powersaw 0
wheelbarrow 0
scaffold 0
electricaldrill0
generator 0
cementmixer0
lawnmower 0
num_time 0
total 0
stop yes
FOR J 1 to num_time do
START
daysrented[J] 0
customer_name[J]
Endfor
stop
REPEAT
Print Enter number of time equipment rented
Read num_time
FOR J 1 to num_time DO
START
read stop
UNTIL stop= no
FOR J 1 to num_time DO
START
IF daysrented[J] >30 then
print equipment rented over 30 days are: ,customer_name [J]
ENDIF
STOP
ENDFOR
print the total sales is,total:2:2
print The amount of time the Weed Whacker was rented is/are:, weedwacker
print The amount of time the Tile Cutter was rented is/are:, tilescutter
print The amount of time the Power Saw was rented is/are:, powersaw
print The amount of time the Scaffold was rented is/are:, scaffold
print The amount of time the Lawnmower was rented is/are:, lawnmower
print The amount of time the Wheelbarrow was rented is/are: , wheelbarrow
print The amount of time the Cement Mixer was rented is/are: , cementmixer
print The amount of time the Generator was rented is/are:, generator
print The amount of time the Electric Drill was rented is/are:, electricaldrill
STOP
Var
daysrented: array [1..10] of integer;
equipment, stop: string;
weedwacker,tilescutter, powersaw, wheelbarrow, scaffold, electricaldrill,
generator, cementmixer, lawnmower, J, num_time: integer;
total, price_of_equip: real;
customer_name: array [1..10] of string;
BEGIN
num_time:= 0;
weedwacker:= 0;
tilescutter :=0;
powersaw :=0;
wheelbarrow :=0;
scaffold:=0;
electricaldrill:=0;
generator:=0;
cementmixer:=0;
lawnmower:=0;
total:=0;
stop := 'yes';
for J:= 1 to num_time do
begin
daysrented[J]:= 0;
customer_name[J]:= ;
end;
REPEAT
writeln('Enter number of time equipment rented');
readln (num_time);
For J:= 1 to num_time DO
begin
for J := 1 to num_time DO
begin
IF daysrented[J] >30 then
writeln ('equipment rented over 30 days are:',customer_name [J]);
end;