Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.


Assignment No. 01 Semester: Fall 2011 CS201: Introduction to Programming Total Marks: 20
Due Date:02/11/2011
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:
 Basic concepts of C/C++ language and Programming
 Dealing with Data types
 Conditional statements of C/C++ language
 Repetition Structures in C/C++ language
 Saving a program
 Compiling a program
 Executing the program

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.
 Use appropriate C/C++ structure i.e. if-else; switch statement etc to get inputs from user where required (Marks will be deducted if inappropriate structure will be used).



Assignment
Problem Statement: Virtual Restaurant
You are required to write a program for BILLING SYSTEM of a virtual restaurant. The basic idea is that by entering the meal price, your billing system will calculate the Sales Tax, Total amount and Complement offer upon that meal. The program will process the billing of undetermined number for customers. At the end, program will show sum of total amount of all the customers.
Detailed Description:
Billing System should work as under:
 You are required to take meal price as input from user.
 After getting this input, program will calculate the sales tax on it as given below:
Meal Price Sales Tax applicable
Less than or equal to 1000 No sales Tax on it.
Greater than 1000 and less than or equal to 2000 1% of meal price.
Greater than 2000 2% of meal price.
 After calculating the sales tax, program will calculate and display the total amount of the meal according to given formula:
Total Amount = Meal_Price + Sales_Tax
 Now, program will prompt to serve the complement sweet dish to customer on the basis of total amount as given below:

Total Amount Sweet Dishes
Less than 1000 Candies
Greater than or equal to 1000 and less than 2000 Sweet Bread
Greater than or equal to 2000 and less than 3000 Pudding
Greater than or equal to 3000 and less than 4000 Cake
Other amounts Trifle





 After displaying the information of one customer, the program should ask the user if he/she again wants to process the bill of another customer. The user will be given two options. If user selects “Y or y”, the program will start the processing of another customer. If user selects “N or n”, the billing system exits.
 Before exiting from billing system, this program should display the total number of customers it processed, and sum of total amount of all the customers.

Sample Output:

Views: 1653

Attachments:

Replies to This Discussion

Yaar switch statement use krna laazmi hai??

 Hei kar loo but remember swtich only works with integar value's no float....

Bhai mugy sy wo yes aur no wala kam nai ho raha aur jo end par total dekhna hai wo bi

bus baki sary program kam kar raha hai

bus bhai ap thori help kar do kay kay yes aur no waly kay liay kia karna hai

 

Dear, I have the program of Dev C++ version 4.9.9.2, which is new one and have missing the option of misc where we can formulate the default changes. I make the progm but it is unable to run. Can u please send that program which is reflected in lecture video. I think that is old. Please help

 

Dear Gohar Anwar

Plz Help the Assignment Solution C++ cs201

Billing System should work as under:
 You are required to take meal price as input from user.
 After getting this input, program will calculate the sales tax on it as given below:
Meal Price Sales Tax applicable
Less than or equal to 1000 No sales Tax on it.
Greater than 1000 and less than or equal to 2000 1% of meal price.
Greater than 2000 2% of meal price.
 After calculating the sales tax, program will calculate and display the total amount of the meal according to given formula:
Total Amount = Meal_Price + Sales_Tax
 Now, program will prompt to serve the complement sweet dish to customer on the basis of total amount as given below:

Total Amount Sweet Dishes
Less than 1000 Candies
Greater than or equal to 1000 and less than 2000 Sweet Bread
Greater than or equal to 2000 and less than 3000 Pudding
Greater than or equal to 3000 and less than 4000 Cake
Other amounts Trifle





 After displaying the information of one customer, the program should ask the user if he/she again wants to process the bill of another customer. The user will be given two options. If user selects “Y or y”, the program will start the processing of another customer. If user selects “N or n”, the billing system exits.
 Before exiting from billing system, this program should display the total number of customers it processed, and sum of total amount of all the customers.

Read more: CS201 1st Assignmnet, October2011 - Virtual University of Pakistan http://vustudents.ning.com/group/cs201introductiontoprogramming/for...

upload ker b do yaar jis ne assignment bna li hai.........

 

You are required to write a program for BILLING SYSTEM of a virtual restaurant. The basic idea is that by entering the meal price, your billing system will calculate the Sales Tax, Total amount and Complement offer upon that meal. 


#include
#include
int main()
{
int price; 
cout "Please enter meal price? ";
cin >> price;
float saleTax;
if(price<=100)
{
saleTax = 0.0 * price;
}
else if(price <= 200)
{
saleTax = 0.1 * price; 
}
else
{
saleTax = 0.2 * price;


int totalAmount;
totalAmount = price + saleTax; 
cout "The total price of Meal is = " totalAmount endl;
getch(); 
}

Tariq Bhai ap ko aik mail ki hai plz wo to check kar kay reply kar dain

Tariq bhai kaya ye question thek ha

 

Not complete ......

#include <iostream.h>
main()
    {
    int price;
    cout "Please enter meal price? " "\n";
    cin >> price;
    float saleTax;
    if(price<=100)
    {
    saleTax = 0.0 * price;
    }
    else if(price <= 200)
    {
    saleTax = 0.1 * price;
    }
    else
    {
    saleTax = 0.2 * price;
    }

    int totalamount;
    totalamount = price + saleTax;
    cout "The total price of Meal is = " totalamount "\n";
    system ("pause");
    }

 

 

tariq bhai app k solution ko theek kr deya hai app es programe ko run kr k check kre kya ye theek bn gaya hai..........!!!

solution

 

 

 

#include
#include
int main()
{
int price; 
cout "Please enter meal price? ";
cin >> price;
float saleTax;
if(price<=100)
{
saleTax = 0.0 * price;
}
else if(price <= 200)
{
saleTax = 0.1 * price; 
}
else
{
saleTax = 0.2 * price;


int totalAmount;
totalAmount = price + saleTax; 
cout "The total price of Meal is = " totalAmount endl;
getch(); 

 

RSS

Looking For Something? Search Below

VIP Member Badge & Others

How to Get This Badge at Your Profile DP

------------------------------------

Management: Admins ::: Moderators

Other Awards Badges List Moderators Group

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

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