#include<iostream.h>
#include<conio.h>
class empdata
{
private :
int empno, salary;
float age;
char sex;
public :
void getdata ();
void putdata ();
};
void empdata :: getdata ()
{
cout<<"Employeee number : ";
cin>>empno;
cout<<"Age : ";
cin>>age;
cout<<"Sex : ";
cin>>sex;
cout<<"Salary : ";
cin>>salary;
}
void empdata :: putdata ()
{
cout<<"Employee number : "<<empno<<endl;
cout<<"Age : "<<age<<endl;
cout<<"Sex : "<<sex<<endl;
cout<<"Salary : "<<salary<<endl;
}
int main ()
{
class empdata obj;
class empdata *ptr;
ptr = &obj;
clrscr ();
cout<<"Enter the record "<<endl;
ptr -> getdata ();
cout<<"The entered data is : "<<endl;
ptr -> putdata ();
getch();
return 0;
}
Home       |      About Us       |     Portfolio       |      Services       |       Career        |    Contact Us       |      Industrial Training        |      Achievement 
Corporate Services
  Web Design and development
  Web Promotion (SEO)
  Multimedia/CD Presentation
  Software development

  E.Commerce

Training@balujalabs

  Software Courses
  Hardware Courses
  Networking.Courses
  Mobile Repairing Courses
  UGC Degrees
Student Corner
 Programming & Projects
 Placement Papers
 Project Ideas
 Synopsis Ideas

  Franchise Section

 Administrator
Franchise Inquiry
 
 

.Program to enter an employee’s data and display it using pointer toto class objects

 

 

 

 

 

 

 

 

 

                                                                                                                                         

1 To enter and display the record of a booking using all member function inside the class.
2 To enter and display the records of a book using all the member functions outside the class.
3 To program various arithmetic operations on the entered number and display their results.
4 To input records of n books and display then using classes and arrays.
5 To input records of employees and display the records.
6 To input data of a student and display it using indirection operator.
7 To enter data of a student and display it using structure operator.
8 To find highest of two numbers using nesting of member functions.
9 To demonstrate the use of static data members.
10 Passing & returning objects to and from the classes.
11 To demonstrate inline functions.
12 Program to input data and d check for its validity using classes.
13 Program to find the sum of two entered complex numbers.
14 Write a program in which a class has three data members, name, roll no, marks of 5 subjects and member function to assign stream on the basis of table given below.

Average marks Stream

96% or more computers

91%-95% Electrons

86%-90% Mechanical

81%-85% Electrical

76%-80% chemical

71%-75% Civil

15

Program to store price list of n items and to print the largest price asWell as the sum of all prices

16

Program to enter an employee’s data and display it using pointer to class objects.

17

Define a class to represent a book in a library. Include the following Members:
Data Members:
Book number; book name; author; publisher; price; No.copies; No of Copies issued.
Members Function:
To assign initial values

18

Define a class employee with the following specifications:
Private members of class employee
Employ integer
Ename 20 character
Basic, hra, dafloat
Net pay float
Calculate ( ) A function to find basic +hra +da with float
Return type.
Public member function of class employee
Have data ( ) function to accept value for empno, ename,basic, hra,
Da, and invoke calculate ( ) to calculate netpay.
Dispdate ( ) function to display all the members on the screen

19

Write a c++ program using and objects to simulate result preparation System for 20 students. The data available for each student includes roll no: name and marks in 3 subjects

20

Write a C++ program to simulate an arithmetic calculator for Integers. The program should be able to produce the result calculated And the numbers of arithmetic operators performed so far. Any Wrong operation is to be reported

21

Imagine a ticket selling booth at a fair.People by are requested to Purchase a ticket. A ticket is priced as Rs.2.50/the booth keeps track  The number of people that have visited the booth and, of the total  Amount of money collected. Model this ticket selling booth with a  Class called tic booth including following members.

Data members
Numbers of people visited
Total amount of money collected
Member function:

To assign initial values (assign 0 to both data members)
To increment people total as well as amount if a ticket is sold out.
To display the two totals
To display the numbers of ticket sold out ( a ticket one)
Include the program to test this class

 

     
Home       |      About Us       |     Portfolio       |      Services       |       Career        |    Contact Us       |      Industrial Training        |      Achievement