Find Jobs
Hire Freelancers

A simple C++ Project

$2 AUD / hour

Скасований
Опублікований about 12 years ago

$2 AUD / hour

Overview of the problem 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. It should be fully Object Oriented with 4 classes. Products would be read from the file. Constructors/default parameters should be used where appropriate. Do a simple fstream rather than a sstream with infiles and all. Program should be faultless. Program descriptions should be present where appropriate. Responsibilities of objects The Order object is responsible for building a list of products ordered via adding from the list of all products or deleting from the list of ordered products. Thus there are two lists in this program viz. the complete list of products and the list of ordered ones. Some sort of search facility would normally be part of the Order class. The Product class should be able to provide details such as name and price to other classes such as the Order class. If a file is used then it should be able to read a record from the file and load the data. The Web_shop class should load the complete list of products from the file, allow customer login, provide the on-screen menus and generate invoices. The Customer class should be able to provide details such as name to other classes and to accept/create details from the login process. Operation Your program should begin by offering a login prompt on screen. Once a username and password is accepted a customer can be created. At this point a menu of products should appear on screen. These products should be loaded from the file. 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. Modelling Below are attributes and methods for the four classes. Below are suggested UML type diagrams representing the object types (classes): - Order -customer -country string -productList[] -numProducts int +createOrder(Customer) +add(product) +search(string) +delete(string) +display() - Customer -name string -address string +createCust(string, string) +Customer(string, string) +getName() - Product -name string -model string -price float +readRecord(ifstream&) +createProduct(string, string, float) +getPrice() +displayDetails() +getName() - Web_shop -customer -products[] -invoiceNumber int -order +Web_shop() +readProducts() +login() +runShop() +generateInvoice()
ID проекту: 1558465

Про проект

2 пропозицій(-ї)
Дистанційний проект
Активність 12 yrs ago

Хочете заробити?

Переваги подання заявок на Freelancer

Вкажіть свій бюджет та терміни
Отримайте гроші за свою роботу
Опишіть свою пропозицію
Реєстрація та подання заявок у проекти є безкоштовними
2 фрілансерів(-и) готові виконати цю роботу у середньому за $30 AUD/год.
Аватарка користувача
Hi, kindly check your inbox for my inquiries. Thanks.
$30 AUD за 1 день
4,9 (214 відгуки(-ів))
6,2
6,2
Аватарка користувача
confident to do this job. . . !!!
$30 AUD за 1 день
4,9 (32 відгуки(-ів))
4,6
4,6

Про клієнта

Прапор AUSTRALIA
Guangzhou, Australia
5,0
1
Спосіб оплати верифіковано
На сайті з квіт. 10, 2012

Верифікація клієнта

Дякуємо! Ми надіслали на вашу електронну пошту посилання для отримання безкоштовного кредиту.
Під час надсилання електронного листа сталася помилка. Будь ласка, спробуйте ще раз.
Зареєстрованих користувачів Загальна кількість опублікованих робіт
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Завантажуємо для перегляду
Дозвіл на визначення геолокації надано.
Ваш сеанс входу закінчився, і сеанс було закрито. Будь ласка, увійдіть знову.