Friday, December 8, 2017

Code Review: Library Information System

Compiler or Tool: Turbo C

Programming Language: C++

User Interface Type: CUI [Character User Interface]

Description:

This Library Information 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 3 structures and 1 class, library class with following properties and methods:

clip_image002

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

clip_image003

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

clip_image005 

The system uses basic commands to arrange data on screen and 3+1 classes 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 1122 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 7, 2017

C++ Code Review: Shows entered word is Palindrome or not.

Description: This program shows entered word is Palindrome or not.

Code:

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

//Program shows entered word is Palindrome or not.

 

#include<iostream>

 

using namespace std;

 

int main()

{

    int i,j,len,flag=1;

    char a[20];

 

    cout<<"Enter a string:";

    cin>>a;

 

    for(len=0;a[len]!='\0';++len);

 

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

    {

        if(a[j]!=a[i])

            flag=0;

    }

 

    if(flag==1)

        cout<<"\nThe string is Palindrome";

    else

        cout<<"\nThe string is not Palindrome";

 

    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 5, 2017

C++ Code Review: Shows how many words an entered sentence has.

Description: This program shows how many words an entered sentence has.

Code:

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

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

 

#include<iostream>

#include<stdio.h>

 

using namespace std;

 

int main()

{

    char a[100];

    int i,count=1;

 

    cout<<"Enter a string:";

    gets(a);

 

    for(i=0;a[i]!='\0';++i)

    {

        if(a[i]==' ')

            count++;

    }

 

    cout<<"\nThere are "<<count<<" words in the given string";

 

    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.