We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

Assignment No. 05
Semester: Spring 2012

CS201: Introduction to Programming

Total Marks: 20

 

Due Date:05/07/2012

 

Instructions:

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.

 

 

Objective:

 

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

 

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

 

 

Guidelines:

 

  • 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.

 

 

 

 

 

 

 

 

 

 

 

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;

    system(“pause”);

 

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 1892

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Attachments:

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


j

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

RSS

Latest Activity

M_Asim left a comment for Aisha RD
17 minutes ago
Amjad Abbas posted a status
"thanks"
20 minutes ago
Profile IconAmjad Abbas, Nimra zahid, Aisha RD and 31 more joined Virtual University of Pakistan
22 minutes ago
+ Danial replied to +¢αяєℓєѕѕ gιяℓ's discussion Shadi Ho Rhi Hai Alhamdulillah.......... (^__^)!
23 minutes ago
+ Danial liked +¢αяєℓєѕѕ gιяℓ's discussion Shadi Ho Rhi Hai Alhamdulillah.......... (^__^)!
23 minutes ago
+ Iuuoɔǝut + posted videos
31 minutes ago
MUDASAR SHAKIL posted a status
"Mujhe Suspend kyon kar diya jata ha chat se yar"
33 minutes ago
ϝ ι ყ α replied to + "αяsαℓ " Ќąƶµяɨ •"'s discussion Happy Marriage to "Zee" & " Nomi weds Noor"....!
55 minutes ago
Aiman posted a status
"Hello students I am new please tell me their is any student of Bs Psychology I have a problem to make Isl201 assignment please help me"
58 minutes ago
Scorpio liked +¢αяєℓєѕѕ gιяℓ's discussion Shadi Ho Rhi Hai Alhamdulillah.......... (^__^)!
1 hour ago
Sidra Mustafa replied to + M.Tariq Malik's discussion MGT610 Business Ethics GDB Fall 2019 Solution & Discussion in the group MGT610 Business Ethics
1 hour ago
Sidra Mustafa joined + M.Tariq Malik's group
1 hour ago
Imran Khan replied to + M.Tariq Malik's discussion MTH601 Assignment No 01 Fall 2019 Solution & Discussion in the group MTH601 Operations Research
1 hour ago
Profile IconImran Khan, Hashim and Aakash Ahmed joined + M.Tariq Malik's group
1 hour ago
+ ! ! ! ! Mehαr Mαh꧂ replied to + M.Tariq Malik's discussion MGT201 Financial Management GDB Fall 2019 Solution & Discussion Last Date: 22-11-2019 in the group MGT201 Financial Management
1 hour ago
+ ! ! ! ! Mehαr Mαh꧂ liked + M.Tariq Malik's discussion MGT201 Financial Management GDB Fall 2019 Solution & Discussion Last Date: 22-11-2019
1 hour ago
+"Khwab Zaadi"+ liked + M.Tariq Malik's discussion MTH501 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 19-11-2019
1 hour ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to + M.Tariq Malik's discussion MGT201 Financial Management GDB Fall 2019 Solution & Discussion Last Date: 22-11-2019 in the group MGT201 Financial Management
1 hour ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to + M.Tariq Malik's discussion MGT201 Financial Management GDB Fall 2019 Solution & Discussion Last Date: 22-11-2019 in the group MGT201 Financial Management
1 hour ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to + M.Tariq Malik's discussion MGT201 Financial Management GDB Fall 2019 Solution & Discussion Last Date: 22-11-2019 in the group MGT201 Financial Management
1 hour ago

Today Top Members 

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

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