Friday, December 1, 2017

Code Review: Hospital Management System

Compiler or Tool: Turbo C

Programming Language: C++

User Interface Type: CUI [Character User Interface]

Description:

This Hospital Management System is nothing but automating simple enquiry process at hospital. Even though this KIOSK type system is very small it teaches how to code simple system of RAM type [i.e., not file handling support system] in C++ language.

The system has two classes, patient class has following properties:

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 is good example for how to generate a good idea/code with already existing task. It uses five functions. It is open for adding more features and facilities within it.

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

Note: For source code and other details send request e-mail specifying project name to 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 30, 2017

C++ Code Review: Shows length of entered sentence without using any library function.

Description: This program shows length of entered sentence without using any library function.

Code:

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

//Program shows length of entered sentence without using any library function.

 

#include<iostream>

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

 

using namespace std;

 

int main()

{

    char a[30];

    int i;

    cout<<"Enter a string:";

    gets(a);

 

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

 

    cout<<"\nLength of the string '"<<a<<"' is "<<i;

 

    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, November 28, 2017

C++ Code Review: How to remove space within sentence.

Description: This program shows how to remove space within sentence.

Code:

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

//Program shows how to remove space from sentence.

 

#include<iostream>

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

 

using namespace std;

 

int main()

{

    char str1[30],str2[30],str3[60];

    int i,j;

    cout<<"Enter first string:";

    gets(str1);

    cout<<"Enter second string:";

    gets(str2);

 

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

        str3[i]=str1[i];

 

    for(j=0;str2[j]!='\0';++j)

        str3[i+j]=str2[j];

 

    str3[i+j]='\0';

 

    cout<<"\nThe concatenated string is "<<str3;

 

    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.