cbse 12 computer science investigatory project

Preview:

Citation preview

Computer Science

Project File

IMW Car Comparison Software

Acknowledgement

I am extremely grateful to Ms.Niyatha Teacher of the Department of Computer Science for her able guidance and useful suggestions, which has helped me in completing the project work, on time.

I would also like to thank all teaching and non-teaching staff of the Computer Science department who have helped me directly or indirectly in the completion of this project.

Finally and most importantly, I would like to my beloved principal Mr.H.Natrajan and my friends/classmates for their help and wishes for the successful completion of this project.

Table of Contents

1. Aim of the project

2. Requirement Analysis

2.1 Current system

2.2 Proposed system

3. Source Code

4. Input and Output Screens

5. Conclusion

6. Future Enhancements

7. Bibliography

1. Aim of the Project

To create a program using C++ titled ‘IMW car comparison Software’. Our software provides an easy user interface and which enables the user to find suitable car under his or her budget, and to compare many car companies and even models.

The user should also be able to view the price of the car in many showroom places,

And suggest the best one for you.

2. Requirement Analysis

A. Hardware Requirements:i. Standard PC

ii. Monitoriii. Keyboard and Mouse

B.Software Requirement

i. Windows OSii. Turbo C++

2.1Current System

The current system observed was maintained with database, car price statements, comparison status. They were stored by the developer.

2.2Proposed SystemThe propose system eliminates all the problem of the current system by allowing the user to do a variety of task easily and effectively. This is done by using C++ to create a user friendly program to select, view, compare car, and select the best one.

3. Source Code//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//

#include <iostream.h>

#include <conio.h>

#include <string.h>

#include <fstream.h>

#include <stdlib.h>

#include <stdio.h>

#include<graphics.h>

#include<dos.h>

class cars

{

public:

char carmake[25], carmodel[25];

int engine_cap;

float price,mile;

public:

// void getdata();

void display()

{

cout<<"\n Car Make : "<<carmake;

cout<<"\n Car Model : "<<carmodel;

cout<<"\n Engine Capacity : "<<engine_cap<<" cc";

cout<<"\n Mileage [c+y/Hy]: "<<mile<<" kmpl";

cout<<"\n Price [Showroom] : "<<price<<" cr\n";

}

};

void main()

{

cars cc[15];//audi[3],bmw[3],mer[3],jag[3],pors[3];

int choice, ch1,ch2;

char ch;

char carmake1[20],carmake2[20];

strcpy(cc[0].carmake,"Audi");

strcpy(cc[0].carmodel,"RS7 Sportback");

cc[0].engine_cap=3993;

cc[0].mile=10.2;

cc[0].price=1.49;

strcpy(cc[1].carmake,"Audi");

strcpy(cc[1].carmodel,"R8");

cc[1].engine_cap=5204;

cc[1].mile=6.71;

cc[1].price=2.53;

strcpy(cc[2].carmake,"Audi");

strcpy(cc[2].carmodel,"RS6");

cc[2].engine_cap=3993;

cc[2].mile=10.42;

cc[2].price=1.45;

strcpy(cc[3].carmake,"BMW");

strcpy(cc[3].carmodel,"7 Series");

cc[3].engine_cap=2993;

cc[3].mile=11.1;

cc[3].price=1.14;

strcpy(cc[4].carmake,"BMW");

strcpy(cc[4].carmodel,"X6M");

cc[4].engine_cap=4395;

cc[4].mile=9.0;

cc[4].price=1.69;

strcpy(cc[5].carmake,"BMW");

strcpy(cc[5].carmodel,"M6 Gran Coupe");

cc[5].engine_cap=4395;

cc[5].mile=17.0;

cc[5].price=1.77;

strcpy(cc[6].carmake,"Mercedes-Benz");

strcpy(cc[6].carmodel,"S Class");

cc[6].engine_cap=2987;

cc[6].mile=14.0;

cc[6].price=1.16;

strcpy(cc[7].carmake,"Mercedes-Benz");

strcpy(cc[7].carmodel,"G Class");

cc[7].engine_cap=5461;

cc[7].mile=8.5;

cc[7].price=1.98;

strcpy(cc[8].carmake,"Mercedes-Benz");

strcpy(cc[8].carmodel,"M Class");

cc[8].engine_cap=4663;

cc[8].mile=10.4;

cc[8].price=2.55;

strcpy(cc[9].carmake,"Jaguar");

strcpy(cc[9].carmodel,"XE");

cc[9].engine_cap=1999;

cc[9].mile=13.06;

cc[9].price=0.41;

strcpy(cc[10].carmake,"Jaguar");

strcpy(cc[10].carmodel,"XF");

cc[10].engine_cap=2179;

cc[10].mile=13.53;

cc[10].price=0.49;

strcpy(cc[11].carmake,"Jaguar");

strcpy(cc[11].carmodel,"XJL");

cc[11].engine_cap=2993;

cc[11].mile=12.9;

cc[11].price=1.01;

strcpy(cc[12].carmake,"Porsche");

strcpy(cc[12].carmodel,"Cayenne");

cc[12].engine_cap=2967;

cc[12].mile=13.88;

cc[12].price=1.05;

strcpy(cc[13].carmake,"Porsche");

strcpy(cc[13].carmodel,"Panamera");

cc[13].engine_cap=2967;

cc[13].mile=12.68;

cc[13].price=1.06;

strcpy(cc[14].carmake,"Porsche");

strcpy(cc[14].carmodel,"Macan");

cc[14].engine_cap=2967;

cc[14].mile=14.32;

cc[14].price=1.02;

//cc[1]="BMW","A",3000;

// cc.getdata();

// cc.putdata();

clrscr();

do

{

clrscr();

cout<<"\t\t******************IMW CARS****************\n"<<endl;

cout<<"\t\t Indian Motor Works \t"<<endl<<endl<<endl;

cout<<"\t\t 1. Available Cars\n";

cout<<"\t\t 2. Compare Cars\n";

cout<<"\t\t 3. Exit\n";

cout<<"\t\t 4. Owner's Info"<<endl<<endl;

cout<<"\n Enter your choice :";

cin>>choice;

switch(choice)

{

case 1: clrscr();

cout<<"\n \t\t 1. Audi";

cout<<"\n \t\t 2. BMW";

cout<<"\n \t\t 3. Mercedes-Benz";

cout<<"\n \t\t 4. Jaguar";

cout<<"\n \t\t 5. Porsche";

cout<<"\n \t\t 6. Exit";

cout<<"\n Enter your choice: ";

cin>>ch1;

switch(ch1)

{

case 1: cout<<"\n \t\t 1. RS7 Sportback";

cout<<"\n \t\t 2. R8";

cout<<"\n \t\t 3. RS6";

cout<<"\n \t\t 4. Exit";

cout<<"\n Enter your choice: ";

cin>>ch2;

switch(ch2)

{

case 1: cc[0].display();

break;

case 2: cc[1].display();

break;

case 3: cc[2].display();

break;

case 4: exit(0);

}

break;

case 2: cout<<"\n \t\t 1. 7 Series";

cout<<"\n \t\t 2. X6M";

cout<<"\n \t\t 3. M6 Gran Coupe";

cout<<"\n \t\t 4. Exit";

cout<<"\n Enter your choice: ";

cin>>ch2;

switch(ch2)

{

case 1: cc[3].display();

break;

case 2: cc[4].display();

break;

case 3: cc[5].display();

break;

case 4: exit(0);

}

break;

case 3: cout<<"\n \t\t 1. S Class";

cout<<"\n \t\t 2. G Class";

cout<<"\n \t\t 3. M Class";

cout<<"\n \t\t 4. Exit";

cout<<"\n Enter your choice: ";

cin>>ch2;

switch(ch2)

{

case 1: cc[6].display();

break;

case 2: cc[7].display();

break;

case 3: cc[8].display();

break;

case 4: exit(0);

}

break;

case 4: cout<<"\n \t\t 1. XE";

cout<<"\n \t\t 2. XF";

cout<<"\n \t\t 3. XJL";

cout<<"\n \t\t 4. Exit";

cout<<"\n Enter your choice: ";

cin>>ch2;

switch(ch2)

{

case 1: cc[9].display();

break;

case 2: cc[10].display();

break;

case 3: cc[11].display();

break;

case 4: exit(0);

}

break;

case 5: cout<<"\n \t\t 1. Cayenne";

cout<<"\n \t\t 2. Panamera";

cout<<"\n \t\t 3. Macan";

cout<<"\n \t\t 4. Exit";

cout<<"\n Enter your choice: ";

cin>>ch2;

switch(ch2)

{

case 1: cc[12].display();

break;

case 2: cc[13].display();

break;

case 3: cc[14].display();

break;

case 4: exit(0);

}

break;

case 6: exit(0);

}

break;

case 2: clrscr();

cout<<"\n\n Compare Cars";

cout<<"\n\n List of Cars";

cout<<"\n\n Audi\t\tBMW\t\tMercedes Benz\t\tJaguar\t\tPorsche";

cout<<"\n\nRS7 Sportback\t7 series\tS Class\t\t\tXE\t\tCayenne";

cout<<"\nR8\t\tX6M\t\tG Class\t\t\tXF\t\tPanamera";

cout<<"\nRS6\t\tM6 Gran Coupe\tM Class\t\t\tXJL\t\tMacan";

cout<<"\n\n\n Enter the two car models for comparison:";

// cout<<flushall();

gets(carmake1);

gets(carmake2);

for(int i=0;i<15;i++)

{

if(strcmp(carmake1,cc[i].carmodel)==0)

cc[i].display();

if(strcmp(carmake2,cc[i].carmodel)==0)

cc[i].display();

}

break;

case 3:

{

int gdriver = DETECT,gmode;

for (int i=1;i<10;i++)

{

cout<<endl;

for (int j=1;j<=i;j++)

cout<<"\Thank You For Visiting";

initgraph(&gdriver,&gmode,"D:\\TC\\BGI");

i=getmaxx()/2;

j=getmaxy()/2;

for(i=40;i<200;i++)

{

delay(89);

setcolor(i/10);

arc(i,j,0,180,i-10);

}

}

}

exit(1);

break;

case 4:

{

for (int i=1;i<10;i++)

{

cout<<endl;

for (int j=1;j<=i;j++)

cout<<"\t_______``Er.KISSAN''``Er.VIGNESH''``Dr.RAKESH''______";

}

}

default:

cout<<endl<<endl<<endl<<"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Sorry Wrong Option^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"<<endl;

}

cout<<endl<<endl<<"\n Do you want to continue (y/n): ";

cin>>ch;

}while(ch=='y');

{

if(ch=='y')

cout<<"*********************************************************************";

getch();

}

}

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

4. Input and Output Screens

5. Conclusion

Using C++ we have successfully created a Car Comparison Software that can perform the aforementioned functions with user friendliness effectively and successfully.

6. Future EnhancementsCalculation and estimation of car loans.Providing the user to compare more than (7-10) carsGuidance to purchase car via Internet.Feature to view 3-D car exterior and interior.Enabling alert notification on due date.

7. Bibliography

Computer Science in C++ By:-

SUMITA ARORA Khan.

S.Chand Publication

WEBSITES:-

www.icbse.com

//THANK YOU