-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustomer.h
55 lines (40 loc) · 1.57 KB
/
customer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/************************************************************************************
* *
* Code by : Group A *
* Code : Customer class. It inherits dataClass to acces data of the shop. *
* *
************************************************************************************/
#include <iostream>
#include <fstream>
#include <cstdio>
#include <cstring>
#include <iomanip>
#ifndef _CUSTOMER_H
#define _CUSTOMER_H
#include "dataClass.h"
using namespace std;
/* Class definition */
class customer : protected items {
public:
/* Getters */
/* to get item Code */
char* get_code () { return items::get_code (); }
/* to get item name */
char* get_name () { return items::get_name (); }
/* to get item price */
float get_price () { return items::get_price (); }
/* to get item quantity */
int get_quantity () { return items::get_quantity (); }
/* Setter */
/* to set item quantity */
void set_quantity (int quantity) { items::set_quantity (quantity); }
/* To display the object values */
void display_catalog ();
};
void customer::display_catalog () {
std::cout << std::endl;
std::cout << "\t\t" << std::setw (10) << items::get_code () << " ";
std::cout << std::setw (20) << items::get_name () << " ";
std::cout << std::setw (10) << items::get_price ();
}
#endif