Sponsored Links

Results 1 to 1 of 1

Thread: cs201 Introduction to Programming Assignment No. 03 Semester Spring June 2012

  1. #1
    Administrator Vuhelper's Avatar Users Flag!
    Join Date
    Apr 2011

    18 cs201 Introduction to Programming Assignment No. 03 Semester Spring June 2012

    Sponsored Links

    Assignment No. 03
    Semester: Spring 2012

    Sponsored Links

    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 Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 04-14-2012, 04:30 PM
  2. Replies: 19
    Last Post: 11-04-2011, 10:48 PM
  3. Replies: 63
    Last Post: 01-11-2011, 10:52 PM
  4. Replies: 2
    Last Post: 11-20-2010, 04:25 PM
  5. Replies: 2
    Last Post: 05-07-2010, 12:43 PM

Visitors found this page by searching for:

assignment no. 03 semester: fall 2012 cs201: introduction to programming

introduction of assignment programming

solution assignment no. 04 semester: fall 2012 cs201: introduction to programming

assignment no. 04 semester: fall 2012 cs201: introduction to programming solution 2013

cs201 introduction programming assignment 3

Assignment No. 03 Semester: Fall 2013 CS201: Introduction to Programming complete solutions

assignment no 03 semester fall 2012 cs201 introduction to programming solution

assignment no. 03 cs 201

introduction to programming assignments

assigment introduction of programming

assignment for introduction to programming

CS201: Introduction to Programming Assignment

assignment of Introduction to Programming

How to do an introduction For an programming assignments

introduction to programming assignment

cs201 introduction to programming assignment 3

SEO Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
-: Vuhelp Disclaimer :-
None of the files shown here are hosted or transmitted by this server. The links are provided solely by this site's users. The administrator's or staff of Vuhelp.net cannot be held responsible for what its users post, or any other actions of its users. You may not use this site to distribute or download any material when you do not have the legal rights to do so. It is your own responsibility to adhere to these terms. If you have any doubts about legality of content or you have any suspicions, feel free to contact us.
Online Education | JhelumSoft