Sedang Disiapkan

Pengaturcaraan C++ Job by Alkarlsf

You are to develop software for a simple online shopping situation. The entities in this scenario include the web shop, customers, products, orders and invoices. The shop has a list of products available. A customer logs in, selects products and adds them to his/her order. When the shopping is complete an invoice with unique invoice number is generated for the order. There are 10 products in this simple example and they should be stored in an array. Products can be added and deleted from an order.

Only one customer at a time need be considered.

You must model the order entity as a class. The products need not be read from a file they can be hard-coded into your source code. The webshop can simply be procedural code in the main program. An invoice can be generated by a simple function. Coding style; comments, meaningful names, indentation and use of functions may be poor in some places.

Product Data Structure

Typical data to be found in the file is as follows:

Chainsaw CS001 59.95

Each line is compose of a name <space> model_number <space> price

If you do not use a file then you may

1 use structures and hardcode data as below:

product prods[10]={{"Chainsaw","CS001",59.95},etc.

2 use a class and hardcode data as shown below :


Operation of your program

Your program should begin by offering a login prompt on screen. Once a username is accepted a customer can be created. At this point a menu of products should appear on screen. These products should either have been loaded from the file or have been hard-coded in the program. The user uses the menu to select products which are added to the order. A facility to quit this menu should be provided. The order thus far should then be displayed on screen. At this stage there should now be a facility to delete items in the order. This can be done on the basis of the name of the product. Once this phase is quit an invoice should be generated and displayed on screen. The program can then finish or the user logout.



-country string


-numProducts int







-name string

-address string

+createCust(string, string)

+Customer(string, string)



-name string

-model string

-price float


+createProduct(string, string, float)







-invoiceNumber int







Kemahiran: Pengaturcaraan C++

Lihat lebih lanjut: uses of data structures, uses of data structure, use of data structures, string in data structure, string data structure, some search string, search structures, search string in array, search data structures, search data structure, online shopping web address, list of data structures, list in data structures, list data structures, list data structure, example of array data structure, data structure uses, data structures list, data structures example, data structures array, data structure list, data structure in array, data structure example, data structure coding, data structure array

Tentang Majikan:
( 1 ulasan ) Guangzhou, Australia

ID Projek: #1558003

1 pekerja bebas membida secara purata $30 untuk pekerjaan ini


Hired by the Employer

$30 AUD dalam sehari
(0 Ulasan)