Friday, November 3, 2017

Code Review: Cement Stock Management System

Compiler or Tool: Turbo C

Programming Language: C++

User Interface Type: CUI [Character User Interface]

Description:

This Cement Stock Management System allows shop staff to maintain their daily Inward and outward records database with details such as Challen Number, date, quantity, stock quantity 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 four classes and inheritance diagram for cement is as follows:

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 four classes and five functions are used to manage the system. To study the code includes how files are read and write with very fancy menu.

Note that this system is same as Book Library System, and hence shows how existed code can be restructured to create new system.

Total code lines for this system are 615 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, November 2, 2017

C++ Code Review: calculates sum of series of type 1+1/2^2+1/3^3+...+1/n^n

Description: This program calculates sum of series of type 1+1/2^2+1/3^3+...+1/n^n.

Code:

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

//Program calculates sum of series of type 1+1/2^2+1/3^3+...+1/n^n.

 

#include<iostream>

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

#include<math.h> // for pow()

 

using namespace std;

 

int main()

{

 

    double sum=0,a;

    int n,i;

 

    cout<<"Series Type:1+1/2^2+1/3^3+...+1/n^n"<<endl;

    cout<<"Enter the value of n:";

    cin>>n;

 

    for(i=1; i<=n; ++i)

    {

        a=1/pow(i,i);

        sum+=a;

    }

 

    cout<<"Sum="<<sum;

    getch();

}   

 

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, October 31, 2017

C++ Code Review: calculates sum of series of type 1^2+3^2+5^2+...+n^2

Description: This program calculates sum of series of type 1^2+3^2+5^2+...+n^2.

Code:

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

//Program calculates sum of series of type 1^2+3^2+5^2+...+n^2.

 

#include<iostream>

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

#include<math.h> // for pow()

 

using namespace std;

 

int main()

{

 

    int n,i;

    long sum=0;

 

    cout<<"Series Type:1^2+3^2+5^2+...+n^2"<<endl;

    cout<<"Enter the value of n:";

    cin>>n;

 

    for(i=1;i<=n;i+=2)

        sum+=(i*i);

 

    cout<<"Sum="<<sum;

    getch();

}   

 

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.