Advertisement
dredLuxx

Library

Feb 17th, 2020
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.55 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #include <fstream>
  5. #include <string.h>
  6. #include <conio.h>
  7.  
  8. using namespace std;
  9.  
  10. class Library
  11. {
  12. public:
  13. char bookname[100], auname[50], sc1[50];
  14. int q, B, p;
  15. Lib()
  16. {
  17. strcpy(bookname, "No Book Name");
  18. strcpy(auname, "No Author Name");
  19. strcpy(sc1, "No Publication Year");
  20. q = 0;
  21. B = 0;
  22. p = 0;
  23. }
  24. void get();
  25. void pass();
  26. void librarian();
  27. void password();
  28. void getdata();
  29. void show(int);
  30. void modify();
  31. void search(int);
  32. int branch(int);
  33. };
  34.  
  35. void Library::getdata()
  36. {
  37. int i;
  38. fflush(stdin);
  39. cout << "\n\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  40. cout << "\n\t\t<><>\t\t\t\t <><>";
  41. cout << "\n\t\t<><>\t PLEASE FILL UP THE\t\t<><>";
  42. cout << "\n\t\t<><>\t\tFORMS TO ADD\t\t<><>";
  43. cout << "\n\t\t<><>\t\t\t\t <><>";
  44. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  45. cout << "\n\t\t \t\t\t\t ";
  46. cout << "\n\t\t\tEnter a Book's Name : ";
  47. cin.getline(bookname, 100);
  48. for (i = 0; bookname[i] != '\0'; i++)
  49. {
  50. if (bookname[i] >= 'a' && bookname[i] <= 'z')
  51. bookname[i] -= 32;
  52. }
  53. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  54. cout << "\n\t\t \t\t\t\t ";
  55. cout << "\n\t\t\tEnter a Author's Name : ";
  56. cin.getline(auname, 50);
  57. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  58. cout << "\n\t\t \t\t\t\t ";
  59. cout << "\n\t\t\tEnter a Publication Year : ";
  60. cin.getline(sc1, 50);
  61. }
  62. void Library::show(int i)
  63. {
  64. cout << "\n\t\t<><>\t\t\t\t <><>";
  65. cout << "\n\t\t<><>\t Book Name : " << bookname << "\t\t<><>";
  66. cout << "\n\t\t<><>\t\t\t\t <><>";
  67. cout << "\n\t\t<><>\t Book's Author Name : " << auname << " <><>";
  68. cout << "\n\t\t<><>\t\t\t\t <><>";
  69. cout << "\n\t\t<><>\t Book's Publication Year : " << sc1 << " <><>";
  70. cout << "\n\t\t<><>\t\t\t\t <><>";
  71. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  72.  
  73. }
  74. void Library::modify()
  75. {
  76. char ch, st1[100];
  77. int i = 0, b, cont = 0;
  78. system("cls");
  79. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  80. cout << "\n\t\t<><>\t\t\t\t <><>";
  81. cout << "\n\t\t<><>\t- Please choose one option-\t<><>";
  82. cout << "\n\t\t<><>\t\t\t\t <><>";
  83. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  84. cout << "\n\t\t<><>\t\t\t\t <><>";
  85. cout << "\n\t\t<><>\t |1| Add New Book\t\t<><>";
  86. cout << "\n\t\t<><>\t\t\t\t <><>";
  87. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  88. cout << "\n\t\t<><>\t\t\t\t <><>";
  89. cout << "\n\t\t<><>\t |2| Delete A Book\t\t<><>";
  90. cout << "\n\t\t<><>\t\t\t\t <><>";
  91. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  92. cout << "\n\t\t<><>\t\t\t\t <><>";
  93. cout << "\n\t\t<><>\t |3| Go back\t\t\t<><>";
  94. cout << "\n\t\t<><>\t\t\t\t <><>";
  95. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  96. cout << "\n\t\t<><>\t\t\t\t <><>";
  97. cout << "\n\t\t\tEnter your choice : ";
  98. cin >> i;
  99.  
  100. if (i == 1)
  101. {
  102. system("cls");
  103. B = branch(2);
  104. system("cls");
  105. getdata();
  106. ofstream outf("Booksdata.txt", ios::app | ios::binary);
  107. outf.write((char *)this, sizeof(*this));
  108. outf.close();
  109. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  110. cout << "\n\t\t<><>\t\t\t\t <><>";
  111. cout << "\n\t\t<><>\t Book added Successfully.\t<><>";
  112. cout << "\n\t\t<><>\t\t\t\t <><>";
  113. }
  114. else if (i == 2)
  115. {
  116. system("cls");
  117. b = branch(2);
  118. ifstream intf1("Booksdata.txt", ios::binary);
  119. if (!intf1)
  120. {
  121. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  122. cout << "\n\t\t<><>\t\t\t\t <><>";
  123. cout << "\n\t\t\t File Not Found\t<><>";
  124. cout << "\n\t\t<><>\t\t\t\t <><>";
  125. cout << "\n\t\t\t Press any key to continue.....";
  126. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  127. getch();
  128. intf1.close();
  129. system("cls");
  130. librarian();
  131. }
  132. intf1.close();
  133. system("cls");
  134. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  135. cout << "\n\t\t<><>\t\t\t\t <><>";
  136. cout << "\n\t\t<><>\t Please choose one option\t<><>";
  137. cout << "\n\t\t<><>\t\tfor Deletion\t\t<><>";
  138. cout << "\n\t\t<><>\t\t\t\t <><>";
  139. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  140. cout << "\n\t\t<><>\t\t\t\t <><>";
  141. cout << "\n\t\t<><>\t |1| By Book Name\t\t<><>";
  142. cout << "\n\t\t<><>\t\t\t\t <><>";
  143. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  144. cout << "\n\t\t<><>\t\t\t\t <><>";
  145. cout << "\n\t\t Enter the number of your choice : ";
  146. cin >> i;
  147. fflush(stdin);
  148. if (i == 1)
  149. {
  150. system("cls");
  151. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  152. cout << "\n\t\t<><>\t\t\t\t <><>";
  153. cout << "\n\t\t<><>\tEnter Book Name : ";
  154. cin.getline(st1, 100);
  155. ofstream outf("temp.txt", ios::app | ios::binary);
  156. ifstream intf("Booksdata.txt", ios::binary);
  157. intf.read((char *)this, sizeof(*this));
  158. while (!intf.eof())
  159. {
  160. for (i = 0; b == B && bookname[i] != '\0' && st1[i] != '\0' && (st1[i] == bookname[i] || st1[i] == bookname[i] + 32); i++)
  161. ;
  162. if (bookname[i] == '\0' && st1[i] == '\0')
  163. {
  164. cont++;
  165. intf.read((char *)this, sizeof(*this));
  166. }
  167. else
  168. {
  169. outf.write((char *)this, sizeof(*this));
  170. intf.read((char *)this, sizeof(*this));
  171. }
  172. }
  173.  
  174. intf.close();
  175. outf.close();
  176. remove("Booksdata.txt");
  177. rename("temp.txt", "Booksdata.txt");
  178. }
  179. else
  180. {
  181. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  182. cout << "\n\t\t<><>\t\t\t\t <><>";
  183. cout << "\n\t\t\t Incorrect Input.....\n";
  184. cout << "\n\t\t<><>\t\t\t\t <><>";
  185. cout << "\n\t\t\t Press any key to continue.....";
  186. cout << "\n\t\t<><>\t\t\t\t <><>";
  187. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  188. getch();
  189. system("cls");
  190. modify();
  191. }
  192. if (cont == 0)
  193. {
  194. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  195. cout << "\n\t\t<><>\t\t\t\t <><>";
  196. cout << "\n\t\t\t Book Not Found.\n";
  197. cout << "\n\t\t<><>\t\t\t\t <><>";
  198. cout << "\n\t\t\t Press any key to continue.....";
  199. cout << "\n\t\t<><>\t\t\t\t <><>";
  200. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  201. getch();
  202. system("cls");
  203. modify();
  204. }
  205. else
  206. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  207. cout << "\n\t\t<><>\t\t\t\t <><>";
  208. cout << "\n\t\t\t Deletion Successful.\n";
  209. cout << "\n\t\t<><>\t\t\t\t <><>";
  210. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  211. }
  212. else if (i == 3)
  213. {
  214. system("cls");
  215. librarian();
  216. }
  217. else
  218. {
  219. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  220. cout << "\n\t\t<><>\t\t\t\t <><>";
  221. cout << "\n\t\t\t Wrong Input.\n";
  222. cout << "\n\t\t<><>\t\t\t\t <><>";
  223. cout << "\n\t\t\t Press any key to continue.....";
  224. cout << "\n\t\t<><>\t\t\t\t <><>";
  225. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  226. getch();
  227. system("cls");
  228. modify();
  229. }
  230. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  231. cout << "\n\t\t<><>\t\t\t\t <><>";
  232. cout << "\n\t\t\t Press any key to continue.....";
  233. cout << "\n\t\t<><>\t\t\t\t <><>";
  234. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  235. getch();
  236. system("cls");
  237. librarian();
  238. }
  239.  
  240. int Library::branch(int x)
  241. {
  242. int i;
  243. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  244. cout << "\n\t\t<><>\t\t\t\t <><>";
  245. cout << "\n\t\t<><>\t- Please Choose one Branch - <><>";
  246. cout << "\n\t\t<><>\t\t\t\t <><>";
  247. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  248. cout << "\n\t\t<><>\t\t\t\t <><>";
  249. cout << "\n\t\t<><>\t|1| Major Subjects\t\t<><>";
  250. cout << "\n\t\t<><>\t\t\t\t <><>";
  251. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  252. cout << "\n\t\t<><>\t\t\t\t <><>";
  253. cout << "\n\t\t<><>\t|2| Minors Subject\t\t<><>";
  254. cout << "\n\t\t<><>\t\t\t\t <><>";
  255. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  256. cout << "\n\t\t<><>\t\t\t\t <><>";
  257. cout << "\n\t\t<><>\t|3| Go to Main Menu\t\t<><>";
  258. cout << "\n\t\t<><>\t\t\t\t <><>";
  259. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  260. cout << "\n\t\t<><>\t\t\t\t <><>";
  261. cout << "\n\t\t<><>\t Select [ 1 - 2 - 3 ]\t\t<><>";
  262. cout << "\n\t\t<><> Enter your choice number : \t<><>";
  263. cout << "\n\t\t\t\t ";
  264. cin >> i;
  265. switch (i)
  266. {
  267. case 1:
  268. return 1;
  269. break;
  270. case 2:
  271. return 2;
  272. break;
  273. case 3:
  274. system("cls");
  275. if (x == 1)
  276. librarian();
  277. default:
  278. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  279. cout << "\n\t\t<><>\t\t\t\t <><>";
  280. cout << "\n\t<><>\t PLEASE ENTER CORRECT OPTION\t <><>";
  281. cout << "\n\t\t<><>\t\t\t\t <><>";
  282. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  283. getch();
  284. system("cls");
  285. branch(x);
  286. }
  287. }
  288.  
  289. void Library::search(int x)
  290. {
  291. int i,b,cont=0;
  292. char ch[100];
  293. system("cls");
  294. b=branch(x);
  295. ifstream intf("Booksdata.txt",ios::binary);
  296. if(!intf)
  297. {
  298. system("cls");
  299. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  300. cout << "\n\t\t<><>\t\t\t\t <><>";
  301. cout << "\n\t\t<><>\t Book Not Found.\t\t<><>";
  302. cout << "\n\t\t<><>\t\t\t\t <><>";
  303. cout << "\n\t\t<><>\t Press any key to continue.....\t<><>";
  304. cout << "\n\t\t<><>\t\t\t\t <><>";
  305. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  306. getch();
  307. system("cls");
  308. if(x==1)
  309. librarian();
  310. }
  311.  
  312. system("cls");
  313. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  314. cout << "\n\t\t<><>\tPlease Choose one option \t<><>";
  315. cout << "\n\t\t<><>\t\t\t\t <><>";
  316. cout << "\n\t\t<><>\t |1| Search By Name\t<><>";
  317. cout << "\n\t\t<><> Enter Your Choice : \t<><>";
  318. cout << "\n\t\t\t\t\t";
  319. cin>>i;
  320. fflush(stdin);
  321. intf.read((char*)this,sizeof(*this));
  322. if(i==1)
  323. {
  324. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  325. cout<<"\n\t\tEnter Book's Name : ";
  326. cin.getline(ch,100);
  327. system("cls");
  328.  
  329. while(!intf.eof())
  330. {
  331. for(i=0;b==B&&q!=0&&bookname[i]!='\0'&&ch[i]!='\0'&&(ch[i]==bookname[i]||ch[i]==bookname[i]+32);i++);
  332. if(bookname[i]=='\0'&&ch[i]=='\0')
  333. {
  334. cout<<"\n\t\tBook Found :-\n";
  335. show(x);
  336. cont++;
  337. break;
  338. }
  339. intf.read((char*)this,sizeof(*this));
  340. }
  341. }
  342.  
  343. else
  344. {
  345. cont++;
  346. cout<<"\n\t\tPlease enter correct option";
  347. getch();
  348. system("cls");
  349. search(x);
  350. }
  351. intf.close();
  352. if(cont==0)
  353. cout<<"\n\t\tThis Book is not available \n";
  354. cout<<"\n\t\tPress any key to continue.....";
  355. getch();
  356. system("cls");
  357. if(x==1)
  358. librarian();
  359. }
  360.  
  361. void Library::get()
  362. {
  363. int i;
  364.  
  365. cout << "\n\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  366. cout << "\n\t\t<><>\t\t\t\t <><>";
  367. cout << "\n\t\t<><>\tMINI LIBRARY INVENTORY SYSTEM\t<><>";
  368. cout << "\n\t\t<><>\t\t\t\t <><>";
  369. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  370. cout << "\n\t\t<><>\t\t\t\t <><>";
  371. cout << "\n\t\t<><>\t Project in Computer\t <><>";
  372. cout << "\n\t\t<><>\t Programming 2(CCS1203)\t<><>";
  373. cout << "\n\t\t<><>\t Mr. Paul Cedrix Moreno\t<><>";
  374. cout << "\n\t\t<><>\t\t\t\t <><>";
  375. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  376. cout << "\n\t\t<><>\t\t\t\t <><>";
  377. cout << "\n\t\t<><>\t\tPrepared by:\t <><>";
  378. cout << "\n\t\t<><>\t Quiachon, Mildred Joy P.\t<><>";
  379. cout << "\n\t\t<><>\t 1st Year - BSIT 1207\t<><>";
  380. cout << "\n\t\t<><>\t\t\t\t <><>";
  381. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  382. cout << "\n\t\t<><>\t\t\t\t <><>";
  383. cout << "\n\t\t<><>\t- PLEASE CHOOSE ONE TO LOGIN - <><>";
  384. cout << "\n\t\t<><>\t\t\t\t <><>";
  385. cout << "\n\t\t<><>\t |1| Librarian Module\t <><>";
  386. cout << "\n\t\t<><>\t\t\t\t <><>";
  387. cout << "\n\t\t<><>\t |2| Close the Application\t<><>";
  388. cout << "\n\t\t<><>\t\t\t\t <><>";
  389. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  390. cout << "\n\t\t<><>\t\t\t\t <><>";
  391. cout << "\n\t\t<><>\t Select [ 1 - 2 ]\t\t<><>";
  392. cout << "\n\t\t<><> Enter your choice number : \t<><>";
  393. cout << "\n\t\t\t\t ";
  394. cin>>i;
  395. if(i==1)
  396. {
  397. system("cls");
  398. pass();
  399. }
  400. else if(i==2)
  401. {
  402. system("cls");
  403. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  404. cout << "\n\t\t<><>\t\t\t\t <><>";
  405. cout << "\n\t\t<><>\tTHANK YOU FOR USING M.L.I.S <><>";
  406. cout << "\n\t\t<><>\t\t Prepared by:\t\t<><>";
  407. cout << "\n\t\t<><>\t Quiachon, Mildred Joy P.\t<><>";
  408. cout << "\n\t\t<><>\t 1st Year - BSIT 1207\t<><>";
  409. cout << "\n\t\t<><>\t\t\t\t <><>";
  410. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  411. exit(0);
  412. }
  413. else
  414. {
  415. system("cls");
  416. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  417. cout << "\n\t\t<><>\t\t\t\t\t<><>";
  418. cout << "\n\t\t<><>\tPLEASE ENTER CORRECT OPTION\t<><>";
  419. cout << "\n\t\t<><>\t\t\t\t\t<><>";
  420. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  421. getch();
  422. system("cls");
  423. get();
  424. }
  425. }
  426.  
  427. void Library::pass()
  428. {
  429. int i = 0;
  430. char ch, st[21], ch1[21] = {"pass"};
  431. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  432. cout << "\n\t\t<><>\t\t\t\t\t<><>";
  433. cout << "\n\t\t<><> Please enter a Librarian\t<><>";
  434. cout << "\n\t\t<><>\t Password first\t\t<><>";
  435. cout << "\n\t\t<><>\t\t\t\t\t<><>";
  436. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  437. cout << "\n\t\t<><>\t\t\t\t\t<><>";
  438. cout << "\n\t\t Enter Password : ";
  439. while (1)
  440. {
  441. ch = getch();
  442. if (ch == 13)
  443. {
  444. st[i] = '\0';
  445. break;
  446. }
  447. else if (ch == 8 && i > 0)
  448. {
  449. i--;
  450. cout << "\b \b";
  451. }
  452. else
  453. {
  454. cout << "*";
  455. st[i] = ch;
  456. i++;
  457. }
  458. }
  459. ifstream inf("password.txt");
  460. inf >> ch1;
  461. inf.close();
  462. for (i = 0; st[i] == ch1[i] && st[i] != '\0' && ch1[i] != '\0'; i++)
  463. ;
  464. if (st[i] == '\0' && ch1[i] == '\0')
  465. {
  466. system("cls");
  467. librarian();
  468. }
  469. else
  470. {
  471. system("cls");
  472. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  473. cout << "\n\t\t<><>\t\t\t\t\t<><>";
  474. cout << "\n\t\t<><>\t WRONG PASSWORD, TRY AGAIN.\t<><>";
  475. cout << "\n\t\t<><>\t\t\t\t\t<><>";
  476. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  477. getch();
  478. system("cls");
  479. pass();
  480. }
  481. }
  482. void Library::librarian()
  483. {
  484. int i;
  485. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  486. cout << "\n\t\t<><>\t\t\t\t\t<><>";
  487. cout << "\n\t\t<><>\t WELCOME LIBRARIAN\t\t<><>";
  488. cout << "\n\t\t<><>\t\t\t\t\t<><>";
  489. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  490. cout << "\n\t\t<><>\t\t\t\t\t<><>";
  491. cout << "\n\t\t<><>\t- Please Choose One Option -\t<><>";
  492. cout << "\n\t\t<><>\t\t\t\t\t<><>";
  493. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  494. cout << "\n\t\t<><>\t\t\t\t\t<><>";
  495. cout << "\n\t\t<><>\t |1| Modify Book\t\t<><>";
  496. cout << "\n\t\t<><>\t\t\t\t\t<><>";
  497. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  498. cout << "\n\t\t<><>\t\t\t\t\t<><>";
  499. cout << "\n\t\t<><>\t |2| Go to Main Menu\t\t<><>";
  500. cout << "\n\t\t<><>\t\t\t\t\t<><>";
  501. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  502. cout << "\n\t\t<><>\t\t\t\t\t<><>";
  503. cout << "\n\t\t<><>\t |3| Close Application\t\t<><>";
  504. cout << "\n\t\t<><>\t\t\t\t\t<><>";
  505. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  506. cout << "\n\t\t<><>\t\t\t\t\t<><>";
  507. cout << "\n\t\t<><>\t |4| Search Book\t\t<><>";
  508. cout << "\n\t\t<><>\t Select [ 1 - 2 - 3 - 4]\t<><>";
  509. cout << "\n\t\t<><> Enter your choice number : \t<><>";
  510. cout << "\n\t\t\t\t ";
  511. cin >> i;
  512. switch (i)
  513. {
  514. case 1:
  515. modify();
  516. break;
  517. case 2:
  518. system("cls");
  519. get();
  520. break;
  521. case 3:
  522. system("cls");
  523. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  524. cout << "\n\t\t<><>\t\t\t\t <><>";
  525. cout << "\n\t\t<><>\tTHANK YOU FOR USING M.L.I.S <><>";
  526. cout << "\n\t\t<><>\t\t Prepared by:\t\t<><>";
  527. cout << "\n\t\t<><>\t Quiachon, Mildred Joy P.\t<><>";
  528. cout << "\n\t\t<><>\t 1st Year - BSIT 1207\t<><>";
  529. cout << "\n\t\t<><>\t\t\t\t <><>";
  530. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  531. exit(0);
  532. break;
  533. case 4:
  534. system("cls");
  535. search(2);
  536. break;
  537. default:
  538. system("cls");
  539. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  540. cout << "\n\t\t<><>\t\t\t\t\t<><>";
  541. cout << "\n\t\t<><>\t PLEASE ENTER CORRECT OPTION\t<><>";
  542. cout << "\n\t\t<><>\t\t\t\t\t<><>";
  543. cout << "\n\t\t<><><><><><><><><><><><><><><><><><><><><><>";
  544. getch();
  545. system("cls");
  546. librarian();
  547. }
  548. }
  549.  
  550. int main()
  551. {
  552. Library obj;
  553. obj.get();
  554. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement