

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Instructions for assignment 5 of cs201: introduction to programming, where students are required to overload stream insertion and extraction operators for a customer class. The objective is to gain hands-on experience with manipulators in c/c++. A problem statement, guidelines, and a detailed description of the assignment.
Typology: Exercises
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Assignment No. 05 Semester: Spring 2012 CS201: Introduction to Programming
Total Marks: 20
Due Date:05/07/
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
Detailed Description:
Use the same Customer class you implemented in Assignment#. 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.
object of Customer class.
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.