Members BookmarksPolls Fresher Jobs Funny Photos B.Tech Projects New Member FAQ  



My Profile
Active Members
TodayLast 7 Days more...



Awards & Gifts
Online Exams

Fresher Jobs


Our fresher job section is exclusively for fresh graduates! Find jobs for freshers in major Indian cities including Bangalore, Chennai, Hyderabad, Pune or Kochi

Resources


Find educational articles, blogs, discussion threads and other resources.

Colleges


Find details about any college in India or search for courses.

Advertisements


website counter



C++ programming


Posted Date: 29 Jan 2008    Resource Type: Articles/Knowledge Sharing    Category: Computer & Technology

Posted By: satish       Member Level: Gold
Rating:     Points: 2



Lab Sheet 3:

1. A hotel has 100 single and 200 double rooms at a basic charge of Rs. 3000 and Rs. 5000 per night respectively. The government levies an expenditure tax at 10% and a luxury tax at 30% of the basic charge on all rooms occupied. The hotel wants to calculate the total tax to be paid at the end of each day. Using (a) no friend functions and (b) friend functions, write a program to calculate this tax.
2. An organisation has 1000 employees. The organisation pays a salary to each employee. Also an employee can have other sources of income that includes agricultural income, consulting income and interest income. The accounts department computes tax for each employee at a flat rate of 30% if the income from all sources is above Rs. 50,000 per annum. Using (a) no friend functions and (b) friend functions, write a program to calculate this tax.
3. “A friend function violates the basic principles of O-O programming.” If it really does so, then why is it introduced in a C++? Which principles does it violate and how?




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: C++ Constructors
Previous Resource: C++ Inheritance
Return to Discussion Resource Index
Post New Resource
Category: Computer & Technology


Post resources and earn money!
 
Related Resources


Contact Us    Privacy Policy    Terms Of Use   

SpiderWorks Technologies Pvt Ltd. 2006 - 2007 All Rights Reserved.