-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPohanePinninti_LA1_Invoice.cpp
117 lines (117 loc) · 2.47 KB
/
PohanePinninti_LA1_Invoice.cpp
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
//#include <iostream>
//#include <string>
//using namespace std;
//
//class Invoice {
//private:
// string partNumber;
// string partDescription;
// int quantity;
// int price;
//public:
// Invoice(string = "0000", string = "Default Part", int = 1, int = 1);
// void setPartNumber(string);
// void setPartDescription(string);
// void setQuantity(int);
// void setPrice(int);
// string getPartNumber();
// string getPartDescription();
// int getQuantity();
// int getPrice();
// int getInvoiceAmount();
//};
//
//Invoice::Invoice(string x, string y, int z, int a) {
// partNumber = x;
// partDescription = y;
// quantity = z;
// price = a;
//};
//
//void Invoice::setPartNumber(string i) {
// partNumber = i;
//};
//
//void Invoice::setPartDescription(string j) {
// partDescription = j;
//};
//
//void Invoice::setQuantity(int k) {
// if (k > 0) {
// quantity = k;
// }
// else
// quantity = 0;
//};
//
//void Invoice::setPrice(int p) {
// if (p > 0) {
// price = p;
// }
// else
// price = 0;
//};
//
//string Invoice::getPartNumber() {
// return partNumber;
//};
//
//string Invoice::getPartDescription() {
// return partDescription;
//};
//
//int Invoice::getQuantity() {
// return quantity;
//};
//
//int Invoice::getPrice() {
// return price;
//};
//
//int Invoice::getInvoiceAmount() {
// return quantity * price;
//};
//
//int main() {
//
// Invoice shaadi;
// Invoice somila;
//
// string partN;
// cout << "Enter part number: ";
// cin >> partN;
// string partD;
// cout << "Enter part description: ";
// cin >> partD;
// int test;
// cout << "Enter part quantity: ";
// cin >> test;
// int joke;
// cout << "Enter part price: ";
// cin >> joke;
//
// shaadi.setPartNumber(partN);
// shaadi.setPartDescription(partD);
// shaadi.setQuantity(test);
// shaadi.setPrice(joke);
//
// cout << endl;
// cout << "Shaadi's invoice: " << endl;
// cout << shaadi.getPartNumber() << endl;
// cout << shaadi.getPartDescription() << endl;
// cout << shaadi.getQuantity() << endl;
// cout << shaadi.getPrice() << endl;
// cout << shaadi.getInvoiceAmount() << endl;
// cout << endl;
//
// cout << "Somila is default" << endl;
// cout << "Somila's invoice: " << endl;
// cout << somila.getPartNumber() << endl;
// cout << somila.getPartDescription() << endl;
// cout << somila.getQuantity() << endl;
// cout << somila.getPrice() << endl;
// cout << somila.getInvoiceAmount() << endl;
// cout << endl;
//
// return 0;
//}