0% found this document useful (0 votes)
93 views19 pages

Sell Car C++ To Pascal Coding

This document describes a car dealing system project that allows buyers to choose and reserve cars. It includes: 1) An introduction describing the system's objective to enable buyers to select cars and outlines the process of choosing local or international cars, then a brand and specifications. 2) Objectives of the system including giving buyers ease of selection, simplifying the dealing process, ensuring secure record keeping, and enabling online deals. 3) An overview of the project scope explaining the different system types and how they will provide an understanding of the overall system.

Uploaded by

shafunter
Copyright
© Attribution Non-Commercial (BY-NC)
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
0% found this document useful (0 votes)
93 views19 pages

Sell Car C++ To Pascal Coding

This document describes a car dealing system project that allows buyers to choose and reserve cars. It includes: 1) An introduction describing the system's objective to enable buyers to select cars and outlines the process of choosing local or international cars, then a brand and specifications. 2) Objectives of the system including giving buyers ease of selection, simplifying the dealing process, ensuring secure record keeping, and enabling online deals. 3) An overview of the project scope explaining the different system types and how they will provide an understanding of the overall system.

Uploaded by

shafunter
Copyright
© Attribution Non-Commercial (BY-NC)
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/ 19

CSC305: PROGRAMMING PARADIGM

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.

The scope for this system


The different types of system in this project will provide an understanding of the
system that include to verify the nationality of the car, after that choose what
brand of car it is and finally the various specification of the car. Each of this
system discussed will describe the general system required, the car dealing rule
and explains the function of the sub systems to support the system. The major
focus of this project will be the processing of real car dealing system. The analysis
provided in this project will give an understanding of the processing requirement
for this project. This is essential to the system developer to find a variety of
systems for the car dealing system.

FLOWCHART
START

ENTER

type_of_car

ENTER brand_of_car

ENTER car_specification

Total=Car_price

PRINT Total

END

C++ Coding:#include <iostream.h>


#include <conio.h>
main()
{
int pilihan, pilihan2, pilihan3;
cout << "============================= "<<endl;
cout << "= No = Car Type
= "<<endl;
cout << "============================= "<<endl;
cout << "= 1 = Local
= "<<endl;
cout << "= 2 = International = "<<endl;
cout << "============================= "<<endl;
cout<<endl;
cout<<"Please choose your favourite car : ";
cin>>pilihan;
cout<<endl;
if (pilihan==1)
{
cout << "============================= "<<endl;
cout << "= No = Car Name
= "<<endl;
cout << "============================= "<<endl;
cout << "= 1 = Savvy
= "<<endl;
cout << "= 2 = Exora
= "<<endl;
cout << "= 3 = Persona
= "<<endl;
cout << "= 4 = Waja
= "<<endl;
cout << "============================= "<<endl;
cout<<endl;
cout<<"Please choose your favourite car : ";
cin>>pilihan2;
cout<<endl;
if (pilihan2 ==1)

{
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;

cout << "= 2 = Suzuki


= "<<endl;
cout << "= 3 = Subaru
= "<<endl;
cout << "============================= "<<endl;
cout<<endl;
cout<<"Please choose your favourite car : ";
cin>>pilihan2;
cout<<endl;
if (pilihan2 ==1)
{
cout <<
"=================================================="<<endl;
cout << "= No = Car Name
=
Price
="<<endl;
cout <<
"=================================================="<<endl;
cout << "= 1 = Grand Espace = RM289,967
="<<endl;
cout << "= 2 = Megane C.C
= RM199,450
="<<endl;
cout <<
"=================================================="<<endl;
cout<<endl;
cout<<"Please choose your favourite car : ";
cin>>pilihan3;
if (pilihan3 == 1){
cout<<"Price = RM 289,967"<<endl;}
else if(pilihan3 == 2){
cout<<"Price = RM 199,450"<<endl; }
else{
cout<<"Error";}
}
else if (pilihan2 ==2)
{
cout <<
"==================================================="<<endl;
cout << "= No = Car Name
=
Price
="<<endl;
cout <<
"==================================================="<<endl;
cout << "= 1 = SX4 Sedan Premier = RM93,678
="<<endl;

cout << "= 2 = Grand Vitara = RM119,450


="<<endl;
cout <<
"==================================================="<<endl;
cout<<endl;
cout<<"Please choose your favourite car : ";
cin>>pilihan3;
if (pilihan3 == 1){
cout<<"Price = RM 93,678"<<endl;}
else if(pilihan3 == 2){
cout<<"Price = RM 119,457"<<endl; }
else{
cout<<"Error"<<endl;}
}
else if (pilihan2 ==3)
{
cout <<
"==================================================="<<endl;
cout << "= No = Car Name
=
Price
="<<endl;
cout <<
"==================================================="<<endl;
cout << "= 1 = Impreza
= RM193,278
="<<endl;
cout << "= 2 = Forester
= RM218,430
="<<endl;
cout <<
"==================================================="<<endl;
cout<<endl;
cout<<"Please choose your favourite car : ";
cin>>pilihan3;
if (pilihan3 == 1){
cout<<"Price = RM 193,278"<<endl;}
else if(pilihan3 == 2){
cout<<"Price = RM 218,430"<<endl; }

else{
cout<<"Error";}
}
else{
cout<<"Error"; }

}
getch();
}

PASCAL Coding:program Welcome;


uses
WinCrt; { Allows Writeln, Readln, cursor movement, etc. }
var
pilihan, pilihan2, pilihan3 : Integer;

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;

if (pilihan2 =1) then


begin
writeLn('====================================================
===========');
writeLn('= No = Car Name
=
Price
=');
writeLn('====================================================
===========');
writeLn('= 1 = Savvy 1.2 B-Line(M) Solid = RM34,367
=');
writeLn('= 2 = Savvy 1.2 B-Line(M) Metalic = RM36,897
=');
writeLn('====================================================
===========');
writeLn('Please choose your favourite car : ');
read(pilihan3);
if (pilihan3= 1)then
writeLn('Price = RM 34,367')
else if(pilihan3 = 2)then
writeLn('Price = RM 35,897')
else
begin
writeLn('Error, Insert Again : ');
read(pilihan3);
end
end;
if (pilihan2 = 2) then
begin
writeLn('====================================================
===========');
writeLn('= No = Car Name
= Price =');
writeLn('====================================================
===========');
writeLn('= 1 = Exora CPS 1.6 B-LIne(MT) Solid = RM57,267 =');
writeLn('= 2 = Exora CPS 1.6 B-LIne(MT) Metalic = RM64,477 =');
writeLn('====================================================
===========');

writeLn('Please choose your favourite car :');


read(pilihan3);
if (pilihan3 = 1)then
writeLn('Price = RM 57,267"')
else if(pilihan3 = 2)then
writeLn('Price = RM 64,477"')
else
writeLn('Error, Insert Again : ');
read(pilihan3);
end;
if (pilihan2 =3) then
begin
writeLn('====================================================
===========');
writeLn('= No = Car Name
= Price
=');
writeLn('====================================================
===========');
writeLn('= 1 = Persona 1.6 L-LIne(MT) Solid = RM45,499 =');
writeLn('= 2 = Persona 1.6 L-LIne(MT) Metalic = RM48,999 =');
writeLn('====================================================
===========');
writeLn('Please choose your favourite car : ');
read(pilihan3);
if (pilihan3 = 1)then
writeLn('Price = RM 45,499')
else if(pilihan3 = 2)then
writeLn('Price = RM 48,999')
else
writeLn('Error, Insert Again : ');
read(pilihan3);
end;
if (pilihan2 =4)then
begin
writeLn('===================================================='
);

writeLn('= No = Car Name


=
Price
=');
writeLn('===================================================='
);
writeLn('= 1 = Waja CPS 1.6AT = RM45,499
=');
writeLn('= 2 = Waja CPS 1.6MT = RM48,999
=');
writeLn('===================================================='
);
writeLn('Please choose your favourite car : ');
read(pilihan3);
if (pilihan3 = 1)then
writeLn('Price = RM 45,499')
else if(pilihan3 = 2)then
writeLn('Price = RM 48,999')
else
writeLn('Error, Insert Again : ');
read(pilihan3);
end ;
end;
if (pilihan=2)then
begin
writeLn('============================= ');
writeLn('= No = Car Name
= ');
writeLn('============================= ');
writeLn('= 1 = Renault
= ');
writeLn('= 2 = Suzuki
= ');
writeLn('= 3 = Subaru
= ');
writeLn('============================= ');
writeLn('Please choose your favourite car : ');
read(pilihan2);
if (pilihan2 =1) then
begin
writeLn('==================================================');
writeLn('= No = Car Name
=
Price
=');
writeLn('==================================================');

writeLn('= 1 = Grand Espace = RM289,967


=');
writeLn('= 2 = Megane C.C
= RM199,450
=');
writeLn('==================================================');
writeLn('Please choose your favourite car : ');
read(pilihan3);
if (pilihan3 = 1)then
writeLn('Price = RM 289,967')
else if(pilihan3 = 2)then
writeLn('Price = RM 199,450')
else
writeLn('Error, Insert Again : ');
read(pilihan3);

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

You might also like