Friday, December 22, 2017

Code Review: LIC Management System

Compiler or Tool: Turbo C

Programming Language: C++

User Interface Type: CUI [Character User Interface]

Description:

This LIC 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 5 classes, cust 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_image003

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

clip_image005 

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 1366 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 21, 2017

C++ Code Review: Swaps two numbers using class.

Description: This program swaps two numbers using class.

Code:

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

//Program swaps two numbers using class

 

#include<iostream>

#include<conio.h> //for getch()

 

using namespace std;

 

class swapCls

{

    int a,b;

public:

    void getdata();

    void swapv();

    void display();

};

 

void swapCls::getdata()

{

    cout<<"Enter two numbers:";

    cin>>a>>b;

}

 

void swapCls::swapv()

{

    a=a+b;

    b=a-b;

    a=a-b;

}

 

void swapCls::display()

{

    cout<<"a="<<a<<"\tb="<<b;

}

 

main()

{

 

    swapCls s;

 

    s.getdata();

    cout<<"nBefore swap:\n";

    s.display();

 

    s.swapv();

    cout<<"\nAfter swap:\n";

    s.display();

 

    getch();

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

C++ Code Review: Reverse strings stored at array

Description: This program reverse strings stored at array.

Code:

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

//Program reverse strings stored at array.

 

#include<iostream>

#include<stdio.h> //used for gets()

#include<string.h>

 

using namespace std;

 

int main()

{

    char a[3][50];

    int i,j,k,len;

 

    cout<<"Enter 3 strings:\n";

 

    for(i=0;i<3;i++)

    {

        gets(a[i]);

    }

 

    cout<<"\nThe list of original strings:\n" ;

 

    for(i=0;i<3;i++)

    {

        cout<<a[i]<<"\n";

    }

 

    cout<<"\nThe list of changed strings:\n";

 

    for(i=0;i<3;i++)

    {

        len=strlen(a[i]);

        for(j=0,k=len-1;k>=0;j++,k--)

        {

            cout<<a[i][k];

        }

 

        cout<<"\n";

    }

 

    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.