100% found this document useful (2 votes)
937 views16 pages

SVG Equipment Rental Tracking Program

This program was created to help SVG rentals track equipment rentals and calculate totals. It stores information about equipment rented, customers, and number of days each item was rented. The program prompts the user to input rental information like customer name, equipment, days rented, and price. It then displays a summary including total sales, number of rentals for each equipment type, and customers who rented for over 30 days.

Uploaded by

Jay Jay
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
100% found this document useful (2 votes)
937 views16 pages

SVG Equipment Rental Tracking Program

This program was created to help SVG rentals track equipment rentals and calculate totals. It stores information about equipment rented, customers, and number of days each item was rented. The program prompts the user to input rental information like customer name, equipment, days rented, and price. It then displays a summary including total sales, number of rentals for each equipment type, and customers who rented for over 30 days.

Uploaded by

Jay Jay
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/ 16

INFORMATION TECHNOLOGY

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

print enter the name customer


read customer_name [J]

print enter equipment rented all in common letters


read equipment

print enter days equipment was rented for


read daysrented[J]

IF equipment= cementmixer then


Cementmixer cementmixer + 1
ENDIF
IF equipment= electricaldrill then
electricaldrill electricaldrill + 1
ENDIF
IF equipment= generator then
generator generator + 1
ENDIF
IF equipment= lawnmower then
lawnmower lawnmower +1
ENDIF
IF equipment = powersaw then
powersaw powersaw +1
ENDIF
IF equipment = scarffold then
scaffold <-- scaffold +1
ENDIF
IF equipment = tilecutter then
tilescutter tilescutter +1
ENDIF
IF equipment = weedwacker then
weedwacker weedwacker +1
ENDIF
IF equipment = wheelbarrow then
wheelbarrow wheelbarrow +1
ENDIF
print enter price_of_equip
read price_of_equip
total total + price_of_equip
STOP

print want to enter another account? type yes to continue or no to stop:

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

Data for Trace table


Pascal
program SVG_rentals;
{purpose: to find number of days and time equipment was rented for and there total price
created: Junio Kelly
Date: 23rd Feburary 2016}

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

writeln ('enter the name customer');


readln (customer_name [J]);

writeln ('enter equipment rented all in common letters');


readln (equipment);

writeln('enter days equipment was rented for');


readln (daysrented[J]);

if equipment= 'cementmixer' then


cementmixer:= cementmixer + 1;

if equipment= 'electricaldrill' then


electricaldrill:= electricaldrill + 1;

if equipment= 'generator' then


generator := generator + 1;

if equipment= 'lawnmower' then


lawnmower := lawnmower +1;
if equipment= 'powersaw' then
powersaw := powersaw +1;

if equipment= 'scarffold' then


scaffold := scaffold +1;

if equipment= 'tilecutter' then


tilescutter := tilescutter +1;

if equipment= 'weedwacker' then


weedwacker := weedwacker +1 ;

if equipment= 'wheelbarrow' then


wheelbarrow := wheelbarrow +1;

writeln ('enter price_of_equip');


readln (price_of_equip);
total := total + price_of_equip;
end;

writeln ('want to enter another account? type yes to continue or no to stop::');


readln (stop);

UNTIL stop= 'no';

for J := 1 to num_time DO
begin
IF daysrented[J] >30 then
writeln ('equipment rented over 30 days are:',customer_name [J]);
end;

writeln ('the total sales is',total:2:2);


writeln ('The amount of time the Weed Whacker was rented is/are:',weedwacker );
writeln('The amount of time the Tile Cutter was rented is/are:', tilescutter);
writeln('The amount of time the Power Saw was rented is/are:', powersaw);
writeln('The amount of time the Scaffold was rented is/are:', scaffold);
writeln('The amount of time the Lawnmower was rented is/are:', lawnmower);
writeln('The amount of time the Wheelbarrow was rented is/are:', wheelbarrow);
writeln('The amount of time the Cement Mixer was rented is/are:', cementmixer);
writeln('The amount of time the Generator was rented is/are:', generator);
writeln('The amount of time the Electric Drill was rented is/are:',electricaldrill);
END.

You might also like