Advertisement
Guest User

Untitled

a guest
Mar 31st, 2020
540
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.34 KB | None | 0 0
  1. #include <iostream>
  2. #include "Clothes.hpp"
  3. #include "Shoes.hpp"
  4. #include "Make_up.hpp"
  5. #include "Electronics.hpp"
  6.  
  7. using namespace std;
  8.  
  9. Clothes clothes[5];
  10.  
  11. Shoes shoes[4];
  12.  
  13. Electronics electronics[4];
  14.  
  15. Make_up make_up[4];
  16.  
  17. void AddInfo();
  18. int main() {
  19.  
  20.  
  21. cout << "Welcome to " << "Star shop" << "!" << endl;
  22. cout << "Press 1 to sign-in or Press 2 to create a new account" << endl;
  23.  
  24. cout << "For buying Clothes press 3 " << endl;
  25. cout << "For buying Shoes press 4 " << endl;
  26. cout << "For buying Make-up press 5" << endl;
  27. cout << "For buying Electronics press 6" << endl;
  28.  
  29. char command;
  30. cin >> command;
  31.  
  32. if (command == '1') {
  33. cout << "Username: " << endl;
  34. char userName[50];
  35. cin >> userName;
  36.  
  37. cout << "Password: " << endl;
  38. char password[50];
  39. cin >> password;
  40.  
  41. cout << "You are signed-in! " << endl;
  42. }
  43.  
  44. if (command=='2'){
  45. cout << "Enter email adrres: " << endl;
  46. char email[50];
  47. cin >> email;
  48.  
  49. cout << "Select user name: " << endl;
  50. char userName[50];
  51. cin >> userName;
  52.  
  53. cout << "Create a password: " << endl;
  54. char password[50];
  55. cin >> password;
  56.  
  57. cout << "Re-enter the password: " << endl; {
  58. char password[50];
  59. cin >> password;
  60.  
  61. cout << "You have succesfuly created a new account! Welcome !" << endl;
  62. }
  63. }
  64.  
  65. if (command == '3') {
  66.  
  67. clothes[0].printClothes();
  68. clothes[1].printClothes();
  69. clothes[2].printClothes();
  70. clothes[3].printClothes();
  71.  
  72. }
  73. else if (command == '4') {
  74.  
  75.  
  76. shoes[0].printShoes();
  77. shoes[1].printShoes();
  78. shoes[2].printShoes();
  79. shoes[3].printShoes();
  80. }
  81. else if (command == '5') {
  82. make_up[0].printMake_up();
  83. make_up[1].printMake_up();
  84. make_up[2].printMake_up();
  85. make_up[3].printMake_up();
  86. }
  87. else if (command == '6') {
  88. electronics[0].printElectronics();
  89. electronics[1].printElectronics();
  90. electronics[2].printElectronics();
  91. electronics[3].printElectronics();
  92. }
  93.  
  94. return 0;
  95. }
  96. void AddInfo() {
  97.  
  98. Clothes clothes1("T-shirt", "red", 10, "unisex", "XS");
  99. Clothes clothes2("Dress", "pink", 99.99, "women", "S");
  100. Clothes clothes3("Jacket", "green", 70, "men", "L");
  101. Clothes clothes4("Jeans", "blue", 49.99, "men", "XL");
  102. Clothes clothes5("Shirt", "yellow", 35, "women", "M");
  103.  
  104. Shoes shoes1("Sneakers", "white", 150, "Nike", 45);
  105. Shoes shoes2("Sneakers", "black", 120, "Adidas", 42);
  106. Shoes shoes3("Heels", "blue", 99.99, "St.Oliver", 39);
  107. Shoes shoes4("Boots", "yellow", 180, "Timberland", 38);
  108.  
  109. Electronics electronics1("Laptop", "black", 680, "HP");
  110. Electronics electronics2("Headphones", "white", 69.90, "Sony");
  111. Electronics electronics3("iPhone", "red", 1500, "Apple");
  112. Electronics electronics4("Speaker", "green", 189, "JBL");
  113.  
  114. Make_up make_up1("Mascara", "black", 15, "waterproof");
  115. Make_up make_up2("Powder", "nude", 35, "matte");
  116. Make_up make_up3("Blush", "pink", 25, "matte");
  117. Make_up make_up4("Lipstick", "red", 10, "glossy");
  118.  
  119. clothes[0] = clothes1;
  120. clothes[1] = clothes2;
  121. clothes[2] = clothes3;
  122. clothes[3] = clothes4;
  123. clothes[4] = clothes5;
  124.  
  125. shoes[0] = shoes1;
  126. shoes[1] = shoes2;
  127. shoes[2] = shoes3;
  128. shoes[3] = shoes4;
  129.  
  130. electronics[0] = electronics1;
  131. electronics[1] = electronics2;
  132. electronics[2] = electronics3;
  133. electronics[3] = electronics4;
  134.  
  135. make_up[0] = make_up1;
  136. make_up[1] = make_up2;
  137. make_up[2] = make_up3;
  138. make_up[3] = make_up4;
  139.  
  140. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement