Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

Assignment No. 05
Semester: Spring 2012

CS201: Introduction to Programming

Total Marks: 20


Due Date:05/07/2012



Please read the following instructions carefully before submitting assignment. It should be clear that your assignment will not get any credit if:


  • The assignment is submitted after due date.
  • The submitted assignment does not open or file is corrupt.
  • Assignment is copied(partial or full) from any source (websites, forums, students, etc)


Note: You have to upload only .cpp file. Assignment in any other format (extension) will not be accepted and will be awarded with zero marks. For example, if you submit code in .doc (Word document) or .txt files, no reward will be given in any case.





The objective of this assignment is to provide hands on experience of:


  • Using manipulators in C/C++
  • Overloading stream insertion and extraction operators





  • Code should be properly indented and well commented.
  • Follow C/C++ rules while writing variable names, function names etc
  • Use only dev-C++ for this assignment.















Problem Statement:     Customer Bill Information     


Write a program that takes customer’s information from user i.e. name, ID and spending and displays the same customer information plus total bill on the screen. You will use the same Customer class implemented in Assignment#3. You need to overload stream insertion and stream extraction >> operators for the Customer class.


Detailed Description:


  • Use the same Customer class you implemented in Assignment#3.
  • This time you don’t need the friend function for calculation of total bill according to spending.
  • You can modify the class (add or delete some functions) as per program requirement.
  • You will overload extraction operator >> for getting input for an object of Customer class.
  • You will also overload insertion operator for displaying the customer information on screen.
  • On calling extraction operator in main() e.g. cin>>obj where obj is an object of Customer class, information about customer name, ID and spending should be taken from the user.
  • Take a look at the sample output for better understanding.












  • On calling insertion operator in main() e.g. coutobj, the output in the following format should be displayed.





  • You must use the formatting manipulators setw() and setfill() for formatting the text as shown in the output.
  • All the formatting of text should be implemented inside overloaded function for extraction operator
  • The main() function of your solution should contain only these instructions


    Customer obj;

    cin >> obj;

    cout obj;



Views: 1976


Replies to This Discussion

Please Discuss here about this assignment.Thanks

Note: You don’t need to go any other site for this assignment/GDB/Online Quiz solution, Because All discussed data of our members in this discussion are going from here to other sites. You can judge this at other sites yourself. So don’t waste your precious time with different links.

Dear Fellows,

All of you are requested, Please post Only One Discussion For Current Assignment/GDB/Online Quiz and everyone reply/share/discussed his/her data on that same discussion, so that all members get solution & discuss easily on Current Assignment/GDB/Online Quiz.

So please don’t post two or more discussions for one Current Assignment/GDB/Online Quiz, hope you’ll understand and cooperate with us.

Our main purpose here discussion not just Solution. 

Yes Tariq you are right I got 20, out of 20 marks in each assignment so far with the help of your solution but i do not follow the Copy Past role, so we should do our best to get good marks instead of depending on others......

yes u right tariq is corect

sir ap k pass agar cs201 5th assignment solution hy to please send me


Please discuss about assignment!!!!!!!!!!!!!!!!

etniiii mushkilll assignment hy :'(

mushkil khan hy yr adhi to sir ny bta dy k main function main sirf 3 lines likhny hain baqi dekh lo ap

setw() tau sahi hai, setfill() pe error aa raha ha ke primary extention lage gi kuch ... :(

2nd ye ke tax or discount ka function kese implement kerna ha? wo b main me nahi balke ostream& operator me

tahir me ko b solution send kar den ..plzz

sir ap k pass agar cs201 5th assignment solution hy to please send me


Looking For Something? Search Below

VIP Member Badge & Others

How to Get This Badge at Your Profile DP


Management: Admins ::: Moderators

Other Awards Badges List Moderators Group

Latest Activity

Ammara Sabir liked Z@¥¥@N R@JPuT's discussion ✓hum Sirf✓
35 minutes ago
Z@¥¥@N R@JPuT liked Honey Chaudhary's video
2 hours ago
Z@¥¥@N R@JPuT liked + ! ! !★ "Areena"★✓'s discussion Ap kya chaho gy?
2 hours ago
Z@¥¥@N R@JPuT liked 刀のの尺's discussion ˜”*°•.˜”*°• Badla •°*”˜.•°*”˜
2 hours ago
Z@¥¥@N R@JPuT posted a discussion
3 hours ago
Ammara Sabir posted a status
"aag the ibtidā-e-ishq meñ❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️ ham ab jo haiñ ḳhaak intihā hai ye"
7 hours ago
MUSAFIR replied to + ! ! !★ "Areena"★✓'s discussion Ap kya chaho gy?
7 hours ago
Ammara Sabir posted a status
"Ab kr k famosh tu nashad kro gy❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️,,,,,,,,,pr hm jo na hon gy tu bht yad kro gy"
7 hours ago

© 2021   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service