CBSE Projects Chemistry, C++, Physics, Maths, Biology, IP,

三打哈网 2019-05-25 04:58200http://www.peahd.comadmin

//**********************************************************
//    PROJECT BOOK LIBRARY
//**********************************************************

//**********************************************************
//    INCLUDED HEADER FILES
//**********************************************************

# include <iostream.h>
# include <fstream.h>
# include <process.h>
# include <string.h>
# include <stdlib.h>
# include <stdio.h>
# include <ctype.h>
# include <conio.h>
# include <dos.h>

//**********************************************************
// THIS CLASS CONTROL ALL THE FUNCTIONS IN THE MENU
//**********************************************************

class MENU
{
public :
void main_menu(void) ;
void introduction(void) ;
private :
void edit_menu(void) ;
void edit_book(void) ;
void edit_member(void) ;
} ;

//**********************************************************
// THIS CLASS CONTAINS FUNCTIONS RELATED TO BOOKS
//**********************************************************

class BOOK
{
public :
void list(void) ;
char *bookname(int) ;
protected :
void add_new_book(int, char tname[33], char tauthor[26], float, int, int) ;
void update_copies(int, int, int) ;
void modify(int, char[], char[], float) ;
void deletion(void) ;
int  book_found(int) ;
int  bookname_found(char []) ;
int  recordno(int) ;
int  available(int) ;
char *authorname(int) ;
float bookprice(int) ;
int  no_of_copies(int) ;
int  bookcodeof(char[]) ;
void display(int) ;
int  reccount(void) ;
void delete_rec(int) ;
private :
int   bookcode, copies ;
char  name[33], author[26] ;
float price ;
int   avail ;

} ;

//**********************************************************
// THIS CLASS CONTAINS FUNCTIONS RELATED TO MEMBERS
//**********************************************************

class MEMBER
{
public :
void list(void) ;
protected :
void add_mem(int, int, char [], char [], char[], int, int, int) ;
void modify(int, char[], char[], char[]) ;
void deletion(void) ;
int  member_found(int) ;
void update_book(int, int, int, int, int) ;
char *membername(int) ;
char *memberphone(int) ;
char *memberaddress(int) ;
int  recordno(int) ;
int  lastcode(void) ;
int  issued(int) ;
int  fine(int) ;
void display(int) ;
void delete_rec(int) ;
private :
int  memcode, bookcode ;
char name[26], phone[10], address[33] ;
int  dd, mm, yy ;   // DATE OF RETURNING THE BOOK //
} ;

//**********************************************************
// THIS IS DERIVED FROM CLASS BOOK & MEMBER AND CONTAINS
// FUNCTIONS FOR WORKING (ISSUE,RETURN,ETC).
//**********************************************************

class WORKING : public BOOK, public MEMBER
{
public :
void issuebook(void) ;
void returnbook(void) ;
void add_book(void) ;
void add_member(void) ;
void modify_book(void) ;
void modify_member(void) ;
void delete_book(void) ;
void delete_member(void) ;
} ;

//**********************************************************
// THIS CLASS CONTAINS FUNCTIONS RELATED DATE & FINE
//**********************************************************

class DATE
{
public :
void extend_date(int,int,int,int) ;
int  diff(int, int, int, int, int, int) ;
int  day, mon, year ;
} ;

//**********************************************************
// FUNCTION TO EXTEND GIVEN DATE BY 15 DAYS
//**********************************************************

void DATE :: extend_date(int d1, int m1, int y1, int days)
{
static int month[] = {31,29,31,30,31,30,31,31,30,31,30,31} ;
for (int i=1; i<=days; i++)
{
d1++ ;
if ((d1 > month[m1-1]) || (y1%4 != 0 && m1 == 2 && d1 > 28))
{
d1 = 1 ;
m1++ ;
}
if (m1 > 12)
{
m1 = 1 ;
y1++ ;
}
}
day  = d1 ;
mon  = m1 ;
year = y1 ;
}

//**********************************************************
// THIS FUNCTION RETURN THE DIFFERENCE BETWEEN TWO GIVEN
// DATES
//**********************************************************

int DATE :: diff(int d1, int m1, int y1, int d2, int m2, int y2)
{
int days = 0 ;
if ((y2<y1) || (y2==y1 && m2<m1) || (y2==y1 && m2==m1 && d2<d1))
return days ;
static int month[] = {31,29,31,30,31,30,31,31,30,31,30,31} ;
while (d1 != d2 || m1 != m2 || y1 != y2)
{
days++ ;
d1++ ;
if ((d1 > month[m1-1]) || (y1%4 != 0 && m1 == 2 && d1 > 28))
{
d1 = 1 ;
m1++ ;
}
if (m1 > 12)
{
m1 = 1 ;
y1++ ;
}
}
return days ;
}

花草树木_快3胆拖表:CBSE Projects Chemistry, C++, Physics, Maths, Biology, IP,

Copyright © 2002-2017 花草树木_快3胆拖表 版权所有 备案号:鄂ICP备12013430号-2 鄂公网安备61032703000292