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

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

kuch nahi hoga light chali jaye gey

tahir bhai tu so gaye

LAST HOUR !!!!!!!!!!!! COME ON GUYS ...........UPLOAD DA solution......anyONE.???? koi to correct solution upload kr dy...

pleeeeeeeeeeeez 

RSS

Latest Activity

Sheraz Ali posted a discussion
49 minutes ago
Imran Khan replied to +¢αяєℓєѕѕ gιяℓ's discussion CS506 - Web Design and Development Assignment No.1 Due Date Nov 15, 2019 in the group CS506 Web Design and Development
1 hour ago
Imran Khan joined + M.Tariq Malik's group
1 hour ago
+ ! ! ! ! Mehαr Mαh꧂ liked + M.Tariq Malik's discussion PSC401 Final Term Papers Spring 2019 (24 August ~ 04 September 2019) & All Solved Past Papers, Solved MCQs & Helping Material
1 hour ago
Hamza Hameed replied to + M.Tariq Malik's discussion CS611 Software Quality Engineering Assignment No 01 Fall 2019 Solution & Discussion Due Date: 15-11-2019 in the group CS611 Software Quality Engineering
3 hours ago
+Umar Amin+ replied to + M.Tariq Malik's discussion Criteria Required for Award Badges, Featured Members & Moderators
3 hours ago
+ !! SARAH replied to MIT's discussion Operating Systems(CS604) Assignment # 01 Deadline Date 16-11-2019 in the group CS604 Operating Systems
3 hours ago
+ !! SARAH joined + M.Tariq Malik's group
3 hours ago
November 2019 replied to + M.Tariq Malik's discussion CS401 Assignment No 01 Fall 2019 Solution & Discussion in the group CS401 Computer Architecture and Assembly Language Programming
3 hours ago
Hamza Hameed updated their profile
3 hours ago
Profile IconHamza Hameed, +.Ãŋɠɜʆḁ.+ and Aijaz khan joined + M.Tariq Malik's group
3 hours ago
Profile IconHamza Hameed and Purple Work joined + M.Tariq Malik's group
3 hours ago
Hamza Hameed joined + M.Tariq Malik's group
3 hours ago
Hamza Hameed joined + M.Tariq Malik's group
3 hours ago
Arham Shah replied to + M.Tariq Malik's discussion CS401 Assignment No 01 Fall 2019 Solution & Discussion in the group CS401 Computer Architecture and Assembly Language Programming
3 hours ago
Arham Shah joined + M.Tariq Malik's group
3 hours ago
khurram us salam replied to + M.Tariq Malik's discussion MGT402 Cost & Management Accounting Online Quiz No 01 Fall 2019 Solution Discussion in the group MGT402 Cost & Management Accounting
3 hours ago
khurram us salam joined + M.Tariq Malik's group
3 hours ago
+ ! ! ! ! ! ! ! ! ! AG liked + ! ! ! ! ! MySterIouS's blog post + Beginning +
4 hours ago
+ ! ! ! ! ! ! ! ! ! AG liked Mani Siddiqui BS VIII's discussion Kash Main Doure Payamber
4 hours ago

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

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