I just started my assignment for the group and I need help with these.
The question is based on here: http://sdrv.ms/16292hI
I'm new to this, but I've only learned up to 'Chapter 10: Decision Making'.
It's a lot of coding for this assignment and it's incomplete:
// Stationery Ordering System.cpp : How much sales Writers Depot get for selling stationery.
//
/*
ICT1101 ASSIGNMENT 2 - GROUP
C++ code
*/
#include "stdafx.h"
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main ()
{
// output variables
float SaleBP, SaleNB, SaleFD, SalePL; // Sale amount of Blue pen 1.0 point, One inch thick notebook, Two-pocket plastic folder, and 200-pages blank planner respectively.
float PaidBP, PaidNB, PaidFD, PaidPL; // Paid amount of Blue pen 1.0 point, One inch thick notebook, Two-pocket plastic folder, and 200-pages blank planner respectively.
float UnpaidBP, UnpaidNB, UnpaidFD, UnpaidPL; // Unpaid amount of Blue pen 1.0 point, One inch thick notebook, Two-pocket plastic folder, and 200-pages blank planner respectively.
float TotalPaid; // Total paid amount.
float TotalUnpaid; // Total unpaid amount.
float NetProfit; // Net profit gained.
// process variables
float Profit; // Profit margin of an item.
float Discount; // Discount per order.
// input variables
char Option; // Choosing an option.
char ItemOption; // Chossing an item.
int BluePen; // Quantity of Blue pen 1.0 point.
int Notebook; // Quantity of One inch thick notebook.
int Folder; // Quantity of Two-pocket plastic folder.
int Planner; // Quantity of 200-pages blank planner.
// input
cout<< "Welcome to Writers Depot's Stationery Ordering System. Choose an option: \n" ;
cout<< "a. Enter order details \n" ;
cout<< "b. Display monthly report \n" ;
cout<< "c. Exit the system \n" ;
cout<< "Your option: " ;
cin>> Option ;
if (Option == 'a')
{
cout<< "------------------------MENU------------------------ \n" ;
cout<< " ITEM COST PER UNIT \n" ;
cout<< "a. Blue pen 1.0 point RM 0.20 \n" ;
cout<< "b. One inch thick notebook RM 2.50 \n" ;
cout<< "c. Two-pocket plastic folder RM 0.50 \n" ;
cout<< "d. 200-pages blank planner RM 2.50 \n" ;
cout<< "Choose an item: " ;
cin>> ItemOption ;
if (ItemOption == 'a')
{
// Enter quantity of Blue pen 1.0 point
cout<< "You choose to buy Blue pen 1.0 point. \n" ;
cout<< "How many units you want to buy? \n" ;
cout<< "Quantity: " ;
cin>> BluePen ;
}
if (ItemOption == 'b')
{
// Enter quantity of One inch thick notebook
cout<< "You choose to buy One inch thick notebook. \n" ;
cout<< "How many units you want to buy? \n" ;
cout<< "Quantity: " ;
cin>> Notebook ;
}
if (ItemOption == 'c')
{
// Enter quantity of Two-pocket plastic folder
cout<< "You choose to buy Two-pocket plastic folder. \n" ;
cout<< "How many units you want to buy? \n" ;
cout<< "Quantity: " ;
cin>> Folder ;
}
if (ItemOption == 'd')
{
// Enter quantity of 200-pages blank planner
cout<< "You choose to buy 200-pages blank planner. \n" ;
cout<< "How many units you want to buy? \n" ;
cout<< "Quantity: " ;
cin>> Planner ;
}
else
{
cout<< "Sorry, no item option in the system. Please select again."<<endl;
}
}
if (Option == 'b')
{
// process
TotalPaid = PaidBP + PaidNB + PaidFD + PaidPL ; // Total paid amount.
TotalUnpaid = UnpaidBP + UnpaidNB + UnpaidFD + UnpaidPL ; // Total unpaid amount.
// output
cout<< "a. Total quantity ordered for each item:" <<endl;
cout<< " Blue pen 1.0 point : "<< BluePen <<endl;
cout<< " One inch thick notebook : "<< Notebook <<endl;
cout<< " Two-pocket plastic folder : "<< Folder <<endl;
cout<< " 200-pages blank planner : "<< Planner <<endl<<endl;
cout<< "b. Sale amount for each item:" <<endl;
cout<< " Blue pen 1.0 point : "<< SaleBP <<endl;
cout<< " One inch thick notebook : "<< SaleNB <<endl;
cout<< " Two-pocket plastic folder : "<< SaleFD <<endl;
cout<< " 200-pages blank planner : "<< SalePL <<endl<<endl;
cout<< "c. Paid amount for each item:" <<endl;
cout<< " Blue pen 1.0 point : "<< PaidBP <<endl;
cout<< " One inch thick notebook : "<< PaidNB <<endl;
cout<< " Two-pocket plastic folder : "<< PaidFD <<endl;
cout<< " 200-pages blank planner : "<< PaidPL <<endl<<endl;
cout<< "d. Unpaid amount for each item:" <<endl;
cout<< " Blue pen 1.0 point : "<< UnpaidBP <<endl;
cout<< " One inch thick notebook : "<< UnpaidNB <<endl;
cout<< " Two-pocket plastic folder : "<< UnpaidFD <<endl;
cout<< " 200-pages blank planner : "<< UnpaidPL <<endl<<endl;
cout<< "e. Total paid amount:"<< TotalPaid <<endl;
cout<< "f. Total unpaid amount:"<< TotalUnpaid <<endl;
cout<< "g. Net profit gained:"<< NetProfit <<endl;
}
if (Option == 'c')
{
system("pause");
}
else
{
system("pause");
}
return 0;
}
And also, it says that the items are only ordered in the multiple of 100. If is not multiple of 100, the user has to re-input.