Friday, December 15, 2017

Code Review: Library Management System

Compiler or Tool: Turbo C

Programming Language: C++

User Interface Type: CUI [Character User Interface]

Description:

This Library Management System allows library staff to maintain their customer-n-books database with details such as new book or customer entry, issuing or returning book, listing all members or books etc. Even though the system is medium size it teaches how to code simple file handling support system with intuitive menu in C++ language.

The System contains 2 classes, book class with following properties and methods:

clip_image001

The main() function presents main menu and becomes single point entry and exit code. The main() function call graph is as follows:

clip_image002

The menu presented by this main() function is as follows:

clip_image004

The system uses basic commands to arrange data on screen and 2 classes and 15 functions are used to manage the system. To study the code includes how files are read and write with very fancy menu.

Total code lines for this system are 632 lines [approximately]. It is a most suitably called as mini project in C++ language.

If you want to write or construct or program C++ mini-project and do not know how or from where to start buy this simple e-book: Code Review of 26 C++ mini-projects.

Note: For other details send request e-mail to mailforprojects@rediffmail.com. Add your comments in below available comment box.

 

Note: Click these label/tags to view all related posts. Tags: C++MiniProject

 

…till next post, bye-bye & take care.

Thursday, December 14, 2017

C++ Code Review: Shows permutation of entered letters.

Description: This program shows all possible combination of entered letters.

Code:

//Compiling Tool: Code::Block IDE with MinGW

//Program shows how many words a entered sentence has.

 

#include<iostream>

#include<stdio.h>

#include<string.h>

 

using namespace std;

 

int main()

{

    char a[50],temp;

    int i,j,len;

    cout<<"Enter any string:\n";

    gets(a);

    len=strlen(a);

 

    cout<<"Reverse of the string is: ";

 

    for(i=0,j=len-1;i<len/2;++i,--j)

    {

        temp=a[i];

        a[i]=a[j];

        a[j]=temp;

    }

 

    cout<<a;

    return 0;

}           

 Output:

 clip_image002

If you want to write or construct or program C++ mini-project and do not know how or from where to start buy this simple e-book: Code Review of 26 C++ mini-projects. For book sample click this link.

Add your comments in below available comment box.

Note: Click these label/tags to view all related posts. Tags: C++Code

 

…till next post, bye-bye & take care.

Tuesday, December 12, 2017

C++ Code Review: Shows permutation of entered letters

Description: This program shows all possible combination of entered letters.

Code:

//Compiling Tool: Code::Block IDE with MinGW

//Program shows all possible combination of entered letters.

 

#include<iostream>

#include<string.h>

 

using namespace std;

 

void swap(char *x, char *y)

{

    char temp;

    temp = *x;

    *x = *y;

    *y = temp;

}

 

void permutation(char *a, int l, int r)

{

   int i;

 

   if (l == r)

     cout << a << "\n";

   else

   {

       for (i = l; i <= r; i++)

       {

          swap((a+l), (a+i));

          permutation(a, l+1, r);

          swap((a+l), (a+i));

       }

   }

}

 

int main()

{

    char string[20];

    int n;

 

    cout << "Enter a string: ";

    cin >> string;

 

    n = strlen(string);

    permutation(string, 0, n-1);

 

    return 0;

}          

 Output:

 clip_image002

If you want to write or construct or program C++ mini-project and do not know how or from where to start buy this simple e-book: Code Review of 26 C++ mini-projects. For book sample click this link.

Add your comments in below available comment box.

Note: Click these label/tags to view all related posts. Tags: C++Code

 

…till next post, bye-bye & take care.