CODE FOR + OPERATOR OVER LOADING C++

 PROBLEM STATEMENT: ADD 2 OBJECTS AND ADD INTO OTHER. CODE: #include<iostream> using namespace std; class Experience { private: int days; int month; double year; public: Experience() { } Experience(int a,int b,double c) { days = a; month = b; year = c; } Experience operator +(Experience E) { Experience E1; E1.days = days + E.days; E1.month = month + E.month; E1.year = year + E.year; return E1; } void display() { cout << "\nDAYS\t" << days << "\nMONTHS\t" << month << "\nYEAR\t" << year << endl; } }; int main() { Experience e1(2, 12, 2), e2(1, 12, 4), e3; e3 = e1 + e2; cout << "showing data of 1st Experience\n"; e1.display(); cout << "\n\n\n\n"; cout << "showing data of 2nd Experience\n"; e2.display(); cout << "\n\n\n\n"; cout << "showing data of sum of Experiences\

LIFE OF MIDDLE CLASS PERSON

 Life of a middle class boy/girl is difficult in each and every part  of their life.They have to take risks in their lives and to do hard work all the time to groom thier career and future.

A middle class boy faces these difficulties in his life i.e:



  1. TO GET A GOOD EDUCATION
  2. TO SAVE HIS POCKET MONEY FOR EVENTS
  3. AFTER GRADUATIION FIND A GOOD JOB
  4. TO FIND A GOOD LIFE PARTNER
  5. TO MANAGE HIS SALARY &INCOME
It is a dream of middle class & poor guys to gain a good education in well known and high ranked college of their city or country.
But thier parents dont have enough money to spend on education of their children,So they ask their children to leave government schools and colleges and earn some money to help the home financially,
In developing countries it is also a big problem due to low illetracy rate the ratio of educated people is very low and most of people dont know about science and education,
it is a famous quote that "LIFE IS NOT BED OF ROSES".
when i was 10 years old my elder cousins told me just pass your 8th standard and it will be ease for you in next class,I tried my best and passed the 8th class when I was in 9th class the subjects were advanced and high standard ,so they were difficult so i passed 9th class and reached at 10th at 10th class my teacher told me there is ease in college and college is easier than 10th so,I agreed and studied hard and passed the 10th standard then moved to college and choosed FSC and realized that if you move forward you have to make extra efforts and do hardwork.
Saving pocket money is also a big problem for middle class boy because parents give them monthly pocket money and they have to save it due to many events like parties with friends and cousins,marriages and outing and refreshment.
When the boy become an Adult and he start his professional life one main problem for him is to find a good job ,it is also a big problem for citizens of developing countries to find a good job because of high unemployment and population people cannot get job easily due to competeion.
AFTER getting a job his second goal is to marry a good and polite women ,So he get married and started his family life,before marriage he can save his money easily but after marriage it is difficult to save money but middle class man save little money for his children.His salary is not too much high but he has to manage his income to run his house and to support his family if his income ratio is less then monthly expenses this poor guy started extra jobs or parttime jobs to earn a good income.Maximum part of his income consumed into paying utility bills ,electricity gas bills,taxes,income taxes etc.
A middle class man always tries to collect money till his death .

 

Comments

Post a Comment

Popular posts from this blog

CODE FOR CAR AND BIKE MANAGEMENT USING(Virtual functions) C++

NESTED LOOPS IN C++