Research Area

Ashutosh Dubey

Thursday, May 2, 2019

C++ program1 by Ashutosh Dubey


1. WRITE A PROGRAM TO DISPLAY A “WELCOME MESSAGE”.




2. WRITE A PROGRAM TO PERFORM ADDITION OF TWO NUMBERS.



3. WRITE A PROGRAM TO SWAP TWO NUMBER USING FUNCTIONS.



4. WRITE A PROGRAM TO IMPLEMENT CALL BY VALUE MECHANISM.



5. WRITE A PROGRAM TO IMPLEMENT CALL BY REFERENCE MECHANISM.



6. WRITE A PROGRAM TO IMPLEMENT CALL BY ADDRESS MECHANISM.



7. WRITE A PROGRAM TO CREATE A CLASS WHICH PERFORMS ADDITION AND MULTIPLICATION OF THREE NUMBERS USING SEPARATE FUNCTION.



8. WRITE A PROGRAM TO CREATE A CLASS WHICH ACCEPT THE DISTANCE BETWEEN TWO CITIES AND PRODUCE THE DISTANCE IN METER AND CENTIMETER.



9. WRITE A PROGRAM TO IMPLEMENT CONSTRUCTOR AND DESTRUCTOR.



10. WRITE A PROGRAM TO IMPLEMENT COPY CONSTRUCTOR.



11. WRITE A PROGRAM TO IMPLEMENT THIS POINTER.



12. WRITE A PROGRAM TO IMPLEMENT POLYMORPHISM.



13. WRITE A PROGRAM TO IMPLEMENT MULTIPLE INHERITANCES.



14. WRITE A PROGRAM TO IMPLEMENT MULTILEVEL INHERITANCE.





PROGRAM 1-

#include

#include

void main()

{

clrscr();

cout<<"WELCOME IN THE WORLD OF C++";

getch();

}

Program 6 to Program 10 By Ashutosh Dubey

PROGRAM 6-
#include
#include
void mul(int&,int&);
void main()
{
clrscr();
int a,b,c;
cout<<"ENTER A AND B"; cin>>a>>b;
mul(a,b);
cout<<"Values after multiplcation"<>a>>b>>c;
sum=a+b+c;
cout<<"sum="<>a>>b>>c;
mul=a*b*c;
cout<<"mul="<
#include
class Distance
{
private:
long km,m,cm;
public:
void input()
{
cout<<"enter the distance in km"; cin>>km;
}
void output()
{
m=km*1000;
cm=m*100;
cout<<"Distance in m"<
#include
class Distance
{
private:
long km,m,cm;

public:
Distance()
{
km=7;
m=km*1000;
cm=km*100;
cout<<"Distance in m"<
#include
class MyClass
{
private:
int data;
public:
MyClass(){ }
MyClass(int d){ data = d; }
MyClass(MyClass& a){
data = a.data;
cout << "\nCopy constructor invoked";
}
void display()
{ cout << data;
}
void operator =(MyClass& a)
{
data = a.data;
cout << "\nAssignment operator invoked";
}
};
void main()
{
clrscr();
MyClass a1(37);
MyClass a2;
a2 = a1;
cout << "\na2="; a2.display();
MyClass a3(a1);
cout << "\na3="; a3.display();
getch();
}

Array Programs

1.WAP to accept rollno of 5 students and display them.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
double a[5],i;
cout<<"\t\t\t\t\tLaxman"<<endl;
cout<<"Enter the Roll No4."<<endl;
for(i=0;i<=4;i++)
{
cin>>a[i];
}
for(i=0;i<=4;i++)
{
cout<<a[i]<<endl;
}
getch();}

2. WAP to accept 5 no and reverse them.







#include<iostream.h>


#include<conio.h>


void main()


{


clrscr();


int a[5],i;


cout<<"\t\t\t\tLaxman"<<endl;


cout<<"Enter the No."<<endl;


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


{


cin>>a[i];


}


cout<<"Reverse of No."<<endl;


for(i=4;i>=0;i--)


{


cout<<a[i]<<endl;


}


getch();


}






3. WAP to accept 10 integer and find the sum of all even and odd numbers separately.






#include<iostream.h>


#include<conio.h>


void main()


{


clrscr();


cout<<" \t\t\t\tLaxman"<<endl;


int a[10],i,sume=0,sumo=0;


cout<<"Enter the no."<<endl;


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


{


cin>>a[i];


}


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


{


if(a[i]%2==0)


sume=sume+a[i];


else


sumo=sumo+a[i];


}


cout<<"Sum of Even No."<<sume<<endl;


cout<<"Sum of Odd No."<<sumo;


getch();


}






















4.WAP to accept 10 element and identify the max and min no in the array also identify the position as well.










#include<iostream.h>


#include<conio.h>


void main()


{


clrscr();


cout<<" \t\t\t\tLaxman"<<endl;


int a[10],i,max=0,min=0,m,n;


cout<<"Enter the no."<<endl;


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


{


cin>>a[i];


}


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


{


if(max<a[i])


{


max=a[i];


m=i;


}


else if(min>a[i])


{


min=a[i];


n=i;


}


}


cout<<"Maximum no.is"<<max;


cout<<"\t& Position of max.is"<<m+1<<endl;


cout<<"Minimum no.is"<<min;


cout<<"\t& Position of min.is"<<n+1;


getch();


}






5. WAP to accept the amount of sale made for each day in a week and calculate the average of these values.










#include<iostream.h>


#include<conio.h>


void main()


{


clrscr();


cout<<" \t\t\t\tLaxman"<<endl;


int a[7],i,j=0;


cout<<"Enter the sales"<<endl;


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


{


cout<<"Day "<<i+1<<"\t\t";


cin>>a[i];


j+=a[i];


}


cout<<"The sales for week"<<j/7;


getch();


}






6. WAP to implement BUBBLE SORT algorithm.






#include<iostream.h>


#include<conio.h>


void main()


{


clrscr();


cout<<" \t\t\t\tLaxman"<<endl;


int a[100],i,j,temp,n;


cout<<"Enter the no. of elements in the array"<<endl;


cin>>n;


cout<<"Enter the elements"<<endl;


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


{


cin>>a[i];


}


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


{


for(j=0;j<n-1;j++)


{


if(a[j]>a[j+1])


{


temp=a[j];


a[j]=a[j+1];


a[j+1]=temp;


}


}


}


cout<<"Sorted list is\n";


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


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


getch();


}

Friday, July 20, 2012

ER Diagram


1) Construct an ER Diagram for Patient-Doctor-Ward.
2) Construct an ER Diagram for Movie-Actor-Theatre.
3) Construct an ER Diagram Of Inventory Management System.
4) Suppose you are creating a database to help a university keep track of its course offerings. You might have the following entities in your database, since they are distinct items in real life that are related to each other in important ways: course, classroom, professor, and department. In the space below, draw an ER diagram with a box for each of these four entities and arrows between the boxes labeled with the relationships they denote.
5) Construct an ER Diagram for student can be involved in many projects and can work under the instruction of several teachers for any of these projects, and each teacher can instruct many students on any project.
6) The company you work for wants to digitize their time cards. You have been asked to design the database for submitting and approving time cards. Draw the database ER diagram with the following information:
A timecard should have hours worked and date submitted
Each timecard is associated with exactly one employee
Each timecard should have a unique id
Each timecard has a status: it is either approved, not approved, or pending
Each employee has a unique id
Each employee has a name and address.
Each employee submits a time card every pay period. i.e. In 1 year, they will submit multiple time cards
Each employee either has direct deposit or physical check as their method of payment
Each employee is associated with exactly one manager
Each manager has a unique id and a name
Each manager is in charge of multiple employees
Each manager approves time cards for multiple employees
If you feel that you must make some assumptions, please state them clearly so that they are easily understood by the graders. Remember to indicate the key for each entity, as well as the multiplicity of each relationship (e.g. one-to-many) using the appropriate notation.

7) Construct an ER Diagram Of Auction Management System.
8) Construct an ER Diagram for a company Department who sponsors 0 or many project to the employee, which is handle or monitor by employees.
9) Construct an ER Diagram Of Voting System.
10) Construct an ER Diagram for order which is placed to the customer in any location, customer pay the amount after receiving the order.

Sunday, March 13, 2011

Basic Programs

1.wap to enter the radius of a circle and print  the area……….

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
cout<<"";
cout<<"submitted by gaurav gupta";
float a,b;
cout<<"enter the radius of a circle";
cin>>a;
b=(3.14*a*a);
cout<<"area="<<b;
getch();
}




2.wap to enter the radius of a circle and print the circumference………..

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
cout<<" ";
cout<<" submitted by gaurav gupta";
float a,b;
cout<<" enter the radius of a circle";
cin>>a;
b=(2*3.14*a);
cout<<"circumference="<<b;
getch();
}


3.wap to enter the radius and height of the circle and print the volume of cylinder……..

#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr();
cout<<" ";
cout<<" submitted by gaurav gupta";
float a,b,v;
cout<<" enter the radius of cylinder  ";
cin>>a;
cout<<" enter he height of cylinder  ";
cin>>b;
v=(3.14*a*a*a*b)/3;
cout<<"volume of a cylinder is ="<<v;
getch();
}

4.wap o enter P,R,T and calculate the simple interest…

#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr();
cout<<" ";
cout<<" submitted by gaurav gupta";
float p,r,t,si;
cout<<" enter p ";
cin>>p;
cout<<" enter r ";
cin>>r;
cout<<" enter t";
cin>>t;
si=(p*r*t)/2;
cout<<"simple interest="<<si;
getch();
}


5.wap to enter he distance in km and convert it into m and cm……….

#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr();
cout<<" ";
cout<<" submitted by gaurav gupta";
float p,r,t,si;
cout<<" enter p ";
cin>>p;
cout<<" enter r ";
cin>>r;
cout<<" enter t";
cin>>t;
si=(p*r*t)/2;
cout<<"simple interest="<<si;
getch();
}


6.wap to enter the value and print the square and cube of number…..

#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr();
cout<<" ";
cout<<" submitted by gaurav gupta";
float a,b,c;
cout<<" enter he value of a ";
cin>>a;
b=(a*a);
c=(a*a*a);
cout<<"square="<<b<<"cube="<<c;
getch();
}


7.wap to enter a number and print he square root of the number…..

#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
cout<<" ";
cout<<"submitted by gaurav gupta";
float a,b;
cout<<"enter a";
cin>>a;
b=sqrt(a);
cout<<b;
getch();
}






8.wap to enter the sides of a triangle and calculate the area by heros formula………….

#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
cout<<" ";
cout<<" submitted by gaurav gupta";
float a,b,c,S,A;
cout<<" enter the value of a,b,c";
cin>>a>>b>>c;
S=(a+b+c)/2;
A=sqrt(S*(S-a)*(S-b)*(S-c));
cout<<"area="<<A;
getch();
}




9.wap to enter the bredth and height of a triangle and calculate the area……..

#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr();
cout<<" ";
cout<<" submitted by gaurav gupta";
float a,b,c;
cout<<" enter the bredth of triangle ";
cin>>a;
cout<<" enter the  of height of triangle ";
cin>>b;
c=(a*b)/2;
cout<<"area="<<c;
getch();
}



10.wap to enter a 3 digit number and print the sum………

#include<iostream.h>
#include<conio.h>
void main()
{
cout<<" ";
cout<<" submitted by gaurav gupta";
int a,b,sum=0;
cout<<" enter the value of a";
cin>>a;
b=a%10;
a=a/10;
sum=sum+b;
b=a%10;
a=b/10;
sum=sum+a+b;
cout<<sum;
getch();
}


11. wap to enter 3 digit number and print the reverse of the number….

#include<iostream.h>
#include<conio.h>
void main()
{
cout<<" ";
cout<<" submitted by gaurav gupta";
int a,b,rew=0;
cout<<" enter the value of a";
cin>>a;
b=a%10;
a=a/10;
rew=rew+b*100;
b=a%10;
a=b/10;
rew=rew+b*10+a;
cout<<rew;
getch();
}

Thursday, November 18, 2010

New DBMS Practical List (2011-12) for CSE Vth sem

Write SQL syntax and statement for the following(Two example for each)
1) Create
2) Insert
3) Select
4) Alter
5) Update
6) Delete
7) Drop
8) Order By clause
9) Aggregate Functions
10) Group By and Having Clause
11) Inner Join
12) Outer join and its type
13) Natural Join
14) Cartesian Product
15) View
16) Rollback
17) Commit
18)Grant
19) Revoke
20) Distinct
21)Trigger
22) Cursor

Submission Date-  22-11-2010

Monday, November 15, 2010

Assignment for CSE V sem

Q1- What is distributed database system?How it is differ from the centralized database system.Explain the use of distributed system.Also explain the advantages and disadvantages.

Q2. Explain the following
a) Data Fragmentation b) Data Replication c) Data Allocation

Q3. Write short note on data mining vs data warehousing.

Q4.Write short note on object-oriented database system.Also explain pros and cons.

Q5.Write short notes on the following
a) Temporal
b) Deductive
c) Multimedia
d) Web and Mobile Databases




Submission date---22 nov 2010

Monday, June 28, 2010

Practical List of .net

1. Create a console Application to Print the Message “Trinity is the best college of Bhopal”.


2. Write a program to add two numbers and display the result.

3. Display the message in message box.

4. Perform the arithmetic operations on two numbers and display the result.

5. Implementation of Button Control.

6. Write a program to get the image size of the picture.

7. Implementation of Check box.

8. Implementation of Radio button.

9. Implementation of User Defined Control.

10. Implementation of ProgressBar Control.

Ashutosh Kumar Dubey
TITR Bhopal