C++ , school project 12th grade

Page 1

g : lin m il ra t b og ke pr ar m + C+ per m Su ste sy

Anu shk a S axe XII na SD


INDEX • • • • • • • • • •

Certificate Acknowledgement Objective Hardware and system requirements Program analysis Working of project Structure of program Source code Limitations Bibliography


Certificat e

This is to certify that ANUSHKA SAXENA of class XII Springdale has worked on the project “Supermarket billing system” to my full satisfaction

Date

Signature ( Preeti Katyal)


It is a pleasure to acknowledge many people who knowingly helped me complete my project. First and foremost, I would like to express my regards towards Sakshi Katyal, the honorable teacher of my school for her encouragement and guidance. I would also like to express my immense gratitude towards Himanee Datta, my partner for providing the invaluable cooperation and support extended during the completion of this project.

(Anushka Saxena)


Objective Objective of this software is to computerize any general store, so that all the transactions become fast and there should not be any error in transactions like calculation mistake. It replaces all the paper work. It keeps records of all the products in store and calculates bill.


Hardware & Software Requirements HARDWARE REQUIREMENTS 1. Pentium Processor or above 2. Color Monitor 3. Keyboard 4. 4 GB Hard Disk or above 5. 32 MB RAM or above 6. 1.44 MB Floppy disk drive 7. Speakers SOFTWARE REQUIREMENTS 1. Windows 9x or MS –DOS 6.22 2. Turbo C++ Compiler 3. Turbo C++ editor or any other text editor.


Program analysis One of the most difficult tasks of system analysis is developing a clear, in-depth. Understanding of the problem being investigated is very important, without which it becomes impossible to specify the requirements for a new project with any accuracy. Several questions should be posed for this. Some of those may be: •What is the Problem? •How complex is it? •Why is it important that the problem be solved? •What are possible solutions to the problem? •What types of benefits can be expected once the problem is solved? It takes considerable skill to determine the true cause of a systems problem. A systems analyst might begin to define the problem by determining if the problem can be classified according to one or more common types of systems problems. With knowledge of the common types of problems, the analyst can diagnose a problem by examining its characteristics. Organizations usually face problems or have opportunity due to the following: •A new product or plant or branch •A new market or new process •Failure of an existing system •Inefficiency of an existing system •Structural error in the existing system etc For identifying problems/opportunities, we scan the following: •The performance of the system •The information being supplied and its form •The economy of processing •The control of the information processing •The efficiency of the existing system •The security of the data and software •The security of the equipment and personnel etc.


After identification of the problem, it is defined and a general direction or method for solving this problem is also determined. Then project boundaries are defined. The management establishes the term of reference as well as the resources to be provided for the project. System development is an iterative process and the first identifiable stage of its Problem Definition, whose final output is Terms of Reference. The project “Supermarket billing system� has been taken into consideration on the basis of maintenance of records on regular basis in a general store. Since, many number of records are filed every day in a store, thus it becomes easier and efficient to computerize the records. We will be then able to arrange the records in a systematic and sequential manner in an easier way. In our project, we have tried to enter and store the records of products , view information of products and calculate the bill for any customer.


Working of project Main menu Shopping

Admin

Buy

Add product

View item list

Remove product

Display bill

Modify product Search product View item list


Elaborating the above visual representation:

The user can perform various operations such as : •Add a product. The user can enter the detailed information of a new product added to the stock of store. •Search a product The user can view the information of a product whose information already exists in the records of the store. •Modify a product The user can alter one or more parameters of the information of any product preexisting in the records of the store. •Calculating the bill. The user can calculate the bill for a customer. •View item list. The user can see the whole list of products in the store with all the information related to it like quantity and price.


Structure of the Program class item { int pid; char productname[40]; protected: float price; int quantity; public: int retprodid(); char*retproductname(); float retprice(); void getit(int); void putit(); void add(); void disp(); int check (int quant); void show() { cout << pid << "\t"<< productname << "\t"<< price;} void searchprodname(char*); void modify(); void delete1(); void select(); void updatequantity(int quant) { quantity=quantity-quant; } }ob;


Class item is for entering the details of the products which are present in the stock. It's member function's are: 1.int retprodid():To return pid(Product's ID). 2.char*retproductname():To return product's name. 3.float retprice:To return price of the product. 4.void getit():To initialise the data members of class item. 5.void putit():To show the values of the data members of the object of class item present in the given through void disp(). 6.void add():To add more products in the store. 7.void show():To show the details of the products bought by the customer. 8.void searchprodname(char*):To search a particular record from the stock.

9.void modify():To modify a particular record of the stock. 10.void delete1():To delete a particular record from the stock. 11.void select():To insert the values present in the stock in the data members of object ob. 12. void updatequantity(int): to update the quantity of product after a quantity is sold. 13. int check (int quant) : to check the availability of product being sold.


class procitem: protected item { int prquan; float procprice; void caldynprice() { procprice=prquan*price; } public: float retprocprice() { return procprice; } void getproc(); void disproc() { show(); cout << "\t" << prquan; cout << "\t" << procprice; }}; Class procitem inherits the members of class item protectedly.It is used for processing. of bill. It's member fuctions are: 1.void caldynprice():To calculate the total amount for one product(procprice). 2.void retprocprice():To return the value of procprice. 3.void getproc():Uses select() to initialise the value of price and to initialise prquan (quantity) & invoke caldynprice. 4.void disproc():To display the values of the inherited members & it's data members.


class bill { procitem data[size]; int top; float total; public: bill() { top=-1; } void buy(); void cancel(); void display(); };

Class bill has an array of objects of procitem(i.e.containership is used). It's member fucntion's are: 1.void buy():To purchase products. 2.void cancel():To cancel an order. 3.void display():To display the bill & to show the total bill to the customer(total).


void process() { bill s; int ch; char ans; do { clrscr(); cout << "BILL:\n1.Buy\n2.Cancel\n3.Display Bill\n4. Display items\nEnter choice: "; cin >> ch; switch(ch) { case 1: s.buy(); break; void process():It consists of an object of class bill thus,shopping case 2: processes is done s.cancel(); through this function.It break; has 4 options: 1.Buy. case 3: 2.Cancel(To cancel an s.display(); order). break; 3.Display(To display the bill). case 4: 4.Display items(To show ob.show(); the list of items available). break; } cout << "Do you want to continue (y/n): "; cin >> ans; } while(ans=='y' || ans=='Y'); getch(); }


In void main function,their is shopping,administrator's block & exit. In administrator's block,a password is required to access it. Password : 250116 This funtion can: 1.Add more products. 2.View all products available. 3.Modify a particular record. 4.Search a particluar record. 5.Delete a particular record. 6.Exit.

Limitations

1.This software does not provide customized billing reports, like list of bills between two dates. 2.No feature for discounts

Bibliography C++ for Class 12th (Sumita Arora)



Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.