Академический Документы
Профессиональный Документы
Культура Документы
0 PSEUDOCODE
Start
int num_hours ,customers;
int x;
float charge_min = 2.00,rate = 1.50 , charge_max = 10.00, price
float calculate_charge
Display ***~WELCOME TO AEON CAR PARK~***
Display " Want your car safe? it's right here !! "
Display " *** Please make sure you lock your car after you left it ***"
Display " Please enter the number of hours : "
Input num_hours
if(num_hours<=2)
calculate_charge = charge_min;
else
if ((num_hours>2) && (num_hours<=24))
calculate_charge = charge_min +(num_hours-2)*rate
else
calculate_charge = charge_min+(num_hours-2)*rate+10;
Display Please select your car type"
Display " 1 = MPV "
Display " 2 = Sedan "
Display " 3 = Others";
Input integer x
switch(x)
case 1:
Display "MPV "
price=calculate_charge*2
Print "price of ticket =" price "MYR"
break
case 2:
Display "Sedan"
price=calculate_charge*4;
Print " price of ticket =" price " MYR "
break
case 3:
Print " Sir, You car type cannot park here. Sorry sir "
break
Display " ***THANK YOU***
End
Yes
if
num_hours<=2
calculate_charge=charge_min
Yes
No
if
num_hours>2 && <=24
calculate_charge=charge_min
+ (num_hours-2)* rate
No
Calculate_charge= charge_min+(num_hours-2)*rate
Switch (x)
Input int x
Yes
Case 1:
x=1
price=calculate_charge*2
Yes
No
Case 2:
x=2
price=calculate_charge*4
No
Case 3:
x=3
Break
End
BNJ20802
COMPUTER PROGRAMMING OF C++
PROJECT REPORT
NO.
1.
MATRIC NO.
AN150130
3.
NAME
ISAZA MOHD AMIRUL HAFIZIE BIN MOHD
ISA
MUHAMMAD DINIE ZIKRY BIN
MOHAMAD GHAZALI
LUQMAN HAKIM BIN ABDUL RAHIM
4.
AN150201
5.
AN150012
2.
AN150151
AN150312
1
2.0 PROBLEM STATEMENT
A parking lot also known as a car lot, is a cleared area that is intended for
parking vehicles. Usually, the term refers to a dedicated area that has been
provided with a durable or semi-durable surface. In most countries where cars are
the dominant mode of transportation, parking lots are a feature of every city and
suburban area. Shopping malls, sports stadiums, and similar venues often feature
parking lots of immense area.
The parking lot usually owned by private company or local authorities. The
problem with these companies is, they tend to charge the vehicle according to
what they like. It is difficult for the vehicle user to estimate the parking rates that
they need to pay.
So, our solution to solve this problem is to develop a program that will calculate
the rate that the vehicle user need to pay according to vehicle types and its parking
hours. We hope by using this program, it will reduce the problem of parking rates
in private parking lot.
2
5.0 PROGRAM EXPLANATION
This program will enables the user to know exactly the price of their parking fee
before entering the Aeon Parking Lot. By using the if-else statement, the program can
determine the time or how long did the driver wants to park their vehicle. Thus, the
program will calculate the fee required using the process as in the pseudocode on how
much did they need to pay for a parking area. Other than that, the case statement can
be used to identify the types of the vehicle and whether it is allowable at the Aeon
Parking lot.
The program asks the user to enter the number of hours require. If the driver enter
less or equal to two hours, the program will directly calculate the minimum charge,
else it will calculate the the minimum charge including the rate for parking more than
two hours. Next, it will asks the user to enter their type of vehicles. It will display the
sort of vehicle 1 = mpv 2= sedan and 3= others. If the user enter number 1, it will
calculate the charge needed and print it. So does with the sedan. If user choose
number 3, the program will display " Sir, You car type cannot park here. Sorry sir ".
7
CONTENT
NO.
TITLE
PAGE
1.
Introduction
2.
Problem Statement
3.
Pseudo code
4.
Flow Chart
4-6
5.
Problem Explanation