Sell Car C++ To Pascal Coding
Sell Car C++ To Pascal Coding
CLASS: KCS5D
NAMA
MUHAMMAD SHAFIQ BIN MAT KHALID
MOHD FAZMIE AIZAT BIN JASMI
MUHAMAD AFIQ BIN ABDUL RAHMAN
NORMANS AK LEWIS
MATRIC NUMBER
2009248872
2009600224
2009622472
2009874918
Lecture:
SIR MOHAMAD FAIZAL B. AB JABAL
PROJECT NAME
-Car dealing system
INTRODUCTION
This system is a part of a complete car dealing system in which its objective
is to enable buyers to choose and or reserve their choices of cars. The system
functions by prompting the user to verify whether they want International cars or
Local produced cars. It will then display types of cars that are available at the
moment, where it will then prompt the user to input their choice of brand. Finally,
the system will prompt the user to choose any of the available specifications of
each of the cars. After all the choices are filled, the system will print out the total
for the customers.
OBJECTIVE
To give potential buyers the ease of selecting/reserving their wanted
cars.
Simplify complex dealing methods by converting it digitally.
Enables administrators the simplicity in saving and or editing data of
buyers.
Ensures all data is digitally recorded and is tamper-free.
Allows dealers to make deals online via the web without the hassle of
meeting face to face.
FLOWCHART
START
ENTER
type_of_car
ENTER brand_of_car
ENTER car_specification
Total=Car_price
PRINT Total
END
{
cout <<
"==========================================================
====="<<endl;
cout << "= No = Car Name
=
Price
="<<endl;
cout <<
"==========================================================
====="<<endl;
cout << "= 1 = Savvy 1.2 B-Line(M) Solid = RM34,367
="<<endl;
cout << "= 2 = Savvy 1.2 B-Line(M) Metalic = RM36,897
="<<endl;
cout <<
"==========================================================
====="<<endl;
cout<<endl;
cout<<"Please choose your favourite car : ";
cin>>pilihan3;
if (pilihan3 == 1){
cout<<"Price = RM 34,367"<<endl;}
else if(pilihan3 == 2){
cout<<"Price = RM 35,897"<<endl; }
else{
cout<<"Error";}
}
else if (pilihan2== 2)
{
cout <<
"==========================================================
====="<<endl;
cout << "= No = Car Name
= Price ="<<endl;
cout <<
"==========================================================
====="<<endl;
cout << "= 1 = Exora CPS 1.6 B-LIne(MT) Solid = RM57,267 ="<<endl;
cout << "= 2 = Exora CPS 1.6 B-LIne(MT) Metalic = RM64,477 ="<<endl;
cout <<
"==========================================================
====="<<endl;
cout<<endl;
cout<<"Please choose your favourite car : ";
cin>>pilihan3;
if (pilihan3 == 1){
cout<<"Price = RM 57,267"<<endl;}
else if(pilihan3 == 2){
cout<<"Price = RM 64,477"<<endl; }
else{
cout<<"Error";}
}
else if (pilihan2 ==3)
{
cout <<
"==========================================================
====="<<endl;
cout << "= No = Car Name
= Price
="<<endl;
cout <<
"==========================================================
====="<<endl;
cout << "= 1 = Persona 1.6 L-LIne(MT) Solid = RM45,499 ="<<endl;
cout << "= 2 = Persona 1.6 L-LIne(MT) Metalic = RM48,999 ="<<endl;
cout <<
"==========================================================
====="<<endl;
cout<<endl;
cout<<"Please choose your favourite car : ";
cin>>pilihan3;
if (pilihan3 == 1){
cout<<"Price = RM 45,499"<<endl;}
else if(pilihan3 == 2){
cout<<"Price = RM 48,999"<<endl; }
else{
cout<<"Error"<<endl;}
}
else if (pilihan2 ==4)
{
cout <<
"===================================================="<<endl;
cout << "= No = Car Name
=
Price
="<<endl;
cout <<
"===================================================="<<endl;
cout << "= 1 = Waja CPS 1.6AT = RM45,499
="<<endl;
cout << "= 2 = Waja CPS 1.6MT
= RM48,999
="<<endl;
cout <<
"===================================================="<<endl;
cout<<endl;
cout<<"Please choose your favourite car : ";
cin>>pilihan3;
if (pilihan3 == 1){
cout<<"Price = RM 45,499"<<endl;}
else if(pilihan3 == 2){
cout<<"Price = RM 48,999"<<endl; }
else{
cout<<"Error"<<endl; }
}
else{
cout<<"Error"<<endl;}
}
else if (pilihan==2)
{
cout << "============================= "<<endl;
cout << "= No = Car Name
= "<<endl;
cout << "============================= "<<endl;
cout << "= 1 = Renault
= "<<endl;
else{
cout<<"Error";}
}
else{
cout<<"Error"; }
}
getch();
}
begin
writeLn('=============================');
writeLn('= No = Car Type
=');
writeLn('=============================');
writeLn('= 1 = Local
=');
writeLn('= 2 = International =');
writeLn('=============================');
writeLn('Please choose your favourite car : ');
read(pilihan);
writeLn;
if (pilihan=1) then
begin
writeLn('============================= ');
writeLn('= No = Car Name
= ');
writeLn('============================= ');
writeLn('= 1 = Savvy
= ');
writeLn('= 2 = Exora
= ');
writeLn('= 3 = Persona
= ');
writeLn('= 4 = Waja
= ');
writeLn('============================= ');
writeLn('Please choose your favourite car : ');
read(pilihan2);
writeLn;
end;
if (pilihan2 =2) then
begin
writeLn('===================================================');
writeLn('= No = Car Name
=
Price
=');
writeLn('===================================================');
writeLn('= 1 = SX4 Sedan Premier = RM93,678
=');
writeLn('= 2 = Grand Vitara = RM119,450
=');
writeLn('===================================================');
writeLn('Please choose your favourite car : ');
read(pilihan3);
if (pilihan3 = 1)then
writeLn('Price = RM 93,678')
else if(pilihan3 = 2)then
writeLn('Price = RM 119,457')
else
writeLn('Error, Insert Again : ');
read(pilihan3);
end;
if (pilihan2 =3) then
begin
writeLn('===================================================');
writeLn('= No = Car Name
=
Price
=');
writeLn('===================================================');
writeLn('= 1 = Impreza
= RM193,278
=');
writeLn('= 2 = Forester
= RM218,430
=');
writeLn('===================================================');
writeLn('Please choose your favourite car : ');
read(pilihan3);
if (pilihan3 = 1) then
writeLn('Price = RM 193,278')
else if(pilihan3 = 2) then
writeLn('Price = RM 218,430')
else
writeLn('Error, Insert Again : ');
read(pilihan3);
end;
end;
end.
C++ Output
Pascal Output