Friday, December 29, 2017

Code Review: Payroll Management System

Compiler or Tool: Turbo C

Programming Language: C++

User Interface Type: CUI [Character User Interface]

Description:

This Payroll Management System allows staff to maintain their employees- database with details such as their name, designation, age, address 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 classes, employee 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 1function 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 1526 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 28, 2017

C++ Code Review: shows how virtual base class solves duplicate properties problem.

Description: This program shows how virtual base class solves duplicate properties problem.

Code:

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

//Program shows how virtual base class solves duplicate properties problem.

 

#include<iostream>

 

using namespace std;

 

class student

{

protected:

    int roll_no;

public:

    void get_no(int x)

    {

        roll_no=x;

    }

 

    void put_no()

    {

        cout<<"\nRoll Number:"<<roll_no;

    }

};

 

class test: virtual public student

{

protected:

    float sub_marks;

 

public:

    void get_submarks(float y)

    {

        sub_marks=y;

    }

 

    void put_submarks()

    {

        cout<<"\nSubject Marks:"<<sub_marks;

    }

};

 

class sports: public virtual student

{

protected:

    float sp_marks;

public:

    void get_spmarks(float z)

    {

        sp_marks=z;

    }

 

    void put_spmarks()

    {

        cout<<"\nSports Marks:"<<sp_marks;

    }

};

 

class result: public test, public sports

{

    float total_marks;

public:

    void put_result()

    {

        total_marks=sub_marks+sp_marks;

        put_no();

        put_submarks();

        put_spmarks();

        cout<<"\nTotal Marks: "<<total_marks;

    }

};

 

int main()

{

    result R;

    R.get_no(20);

    R.get_submarks(75.6);

    R.get_spmarks(81.2);

    R.put_result();

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

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

Description: This program swaps two numbers using pointer.

Code:

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

//Program swaps two numbers using pointer

 

#include<iostream>

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

 

using namespace std;

 

main()

{

    int* a = new int;

    int* b = new int;

 

    cout << "Enter value of a and b:";

    cin >> *a >> *b;

 

//put a in temp

    int* temp = a;

//put b in a

    a = b;

//put temp, was a, into b

    b = temp;

 

    cout << "After swapping \n a=" << *a << "\n b=" << *b;

 

    delete a;

    delete b;

    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.

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.