hw7.cpp
// Programmer: Bushra Anjum
// file: hw7.cpp
#include "header.h"
#include <iostream>
using namespace std;
int main()
{
int option =1;
Bullet bullet;
Bullet db [SIZE];
//establish the DB to be searched later
establishDB(db, SIZE);
//print DB in easy to read format
cout<<"\n\nPrinting the bullet database ...\n"<<endl;
printDB(db, SIZE);
//sort DB on caliber of bullets and print
cout<<"\n\nSorting and printing the bullet database ...\n"<<endl;
sortDB(db, SIZE);
printDB(db, SIZE);
//find largest groove width .38 caliber bullet
bullet = searchLargest38(db, SIZE);
printBullet(bullet);
while(option !=2)
{
presentMenu();
option=getInteger(1,2);
if(option==1)
{
bullet=getBullet();
if(searchBullet(bullet, db, SIZE))
printBullet(bullet);
else
cout<<"\n\nBullet not found!"<<endl;
}
}
goodbye();
return 0;
}