php hit counter

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
cs201 Introduction to Programming Assignment No. 03 Semester Spring June 2012
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#1
Assignment No. 03
Semester: Spring 2012

CS201: Introduction to Programming



Problem Statement: Calculating customer’s bill using classes



You are required to write a program for calculating the bill of a customer according to the amount spent on shopping. A customer will be an object of a class. Each object has a name, customer ID and amount spent on shopping, as its data members. You will calculate the total bill by adding tax in the spending and subtracting discount offered according to spending.



Detailed Description:



You are required to create a class named Customer.

It will have name, customer-ID and spending as its private data members.
You have to make two constructors for this class, i.e. default constructor and parameterized constructor.
Default constructor will initialize the name with “No name”, customer-id with “0” and spending with “0”;
Parameterized constructor will take three arguments i.e. name, customer-id and spending.
Create getter and setter functions for each data member of the class.
A friend function will calculate the total bill for each object of class Customer, passed to it as argument.
If total spending is less than 5000, then tax added on total spending is 5% and discount is 1%. If spending is more than 5000 and less than 10,000 then 10% tax and discount is 2% and if spending is more than 10,000 then 15% tax and 3% discount is applicable.
Remember that all this calculation will be done inside friend function.
In the main() function, create three customer type objects by using new operator. Initialize first object with default constructor, second with parameterized and take input from user for third object (use setter functions to set third object’s values taken from the user).
Calculate total bill for all three objects by passing them to friend function and then display the result of calculation as shown in example output.


Attached Files
.doc   Spring 2012_CS201_3.doc (Size: 255.5 KB / Downloads: 320)

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  CS301 Assignment # 4 Due Date: 02-Feb-2016 Vuhelper 0 2,372 02-03-2016, 05:38 PM
Last Post: Vuhelper
  CS703 – Advanced Operating Systems Assignment No.3 solution January 2016 Vuhelper 0 5,959 01-23-2016, 09:58 PM
Last Post: Vuhelper
  CS601 Data Communication Assignment No. 03 Solution 23rd January 2016 Vuhelper 1 1,991 01-23-2016, 06:09 PM
Last Post: Vuhelper
  CS403 Assignment No. 03 Solution 23rd January 2016 Vuhelper 2 1,230 01-23-2016, 03:18 PM
Last Post: Vuhelper
  CS506 Web Design and Development Assignment no 3 Solution 3rd January 2016 Vuhelper 0 2,296 01-23-2016, 03:16 PM
Last Post: Vuhelper
  CS724 Software Process Improvement Assignment No 01 Solution 20th January 2016 Vuhelper 0 2,027 01-20-2016, 06:26 PM
Last Post: Vuhelper
  CS711 Software Design Assignment No 01 Solution Due Date Feb 12, 2016 Vuhelper 0 1,716 01-20-2016, 06:24 PM
Last Post: Vuhelper
  CS709 Formal Methods for Software Engineering Assignment No 01 Solution January 2016 Vuhelper 0 1,855 01-20-2016, 06:22 PM
Last Post: Vuhelper
  cs703 assignment no 3 Solution 20th January 2016 Vuhelper 0 1,753 01-20-2016, 06:20 PM
Last Post: Vuhelper
  CS704 Assignment No. 01 Solution January 2016 Vuhelper 0 4,854 01-20-2016, 06:19 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support