Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Program is to define a class as employee:
Write a program to define a class as employee and collect information about them by using classes and object
class employee
{
private:
char name[20];
int empno;
float basic,hra,da;
float netpay;
float calculate()
netpay=basic+hra+da;
return netpay;
}
public:
void readdata();
void dispdata();
};
void employee::readdata()
clrscr();
cout<<" enter your name "<<"\n";
gets(name);
cout<<" enter the empoyee number "<<"\n";
cin>>empno;
cout<<" enter the basic salary "<<"\n";
cin>>basic;
cout<<" enter the house rent allowance "<<"\n";
cin>>hra;
cout<<" enter the dearance allowance"<<"\n";
cin>>da;
void employee::dispdata()
cout<<" the name is :"< cout<<" the employee number is :"< calculate(); cout<<" the salary you get is : "< } void main() { clrscr(); employee info; info.readdata(); info.dispdata(); }
cout<<" the employee number is :"< calculate(); cout<<" the salary you get is : "< } void main() { clrscr(); employee info; info.readdata(); info.dispdata(); }
calculate();
cout<<" the salary you get is : "< } void main() { clrscr(); employee info; info.readdata(); info.dispdata(); }
void main()
employee info;
info.readdata();
info.dispdata();
1. Basic Heap: Each memory location in our model of the RAM will be an instance of type Memory: 2. typedef union Memory_u Memory; 3. union Memory_u{ 4. char character;
#padovan string in java program in java // aakash , suraj , prem sasi kumar kamaraj college program 1 : package test.padovanstring; public class PadovanStrin
Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve betw Solution:
The #define Directive The #define directive explains a macro which is a text string represented by a name. Whenever the pre-processor finds this name in the program, it is repl
For this program you will add and test 2 new member functions to the IntSLList class posted on the website. The two member functions are: insertByPosn(int el, int pos) Assuming t
Introduction to Classes Object-oriented programming (OOP) is a conceptual approach to design programs. It can be executed in many languages, whether they directly support OOP c
Define the Multi Dimensional Arrays? Consequently far we have considered arrays with only one dimension. It is as well possible to define an array which is having a 2-dimension
Write a program called plus that will display asterisks in the shape of a plus sign which has the height and width specified by the user. You must only allow entry of an odd numb
Question: (a) Explain a linked list. (b) Describe the three different types of linked list with the help of diagrams. (c) Give two advantages and two disadvantages
Given an integer n and a permutation of numbers 1, 2 ... , n-1, n write a program to print the permutation that lexicographically precedes the given input permutation. If the given
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd