Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include "Clothes.hpp"
- #include "Shoes.hpp"
- #include "Make_up.hpp"
- #include "Electronics.hpp"
- using namespace std;
- Clothes clothes[5];
- Shoes shoes[4];
- Electronics electronics[4];
- Make_up make_up[4];
- void AddInfo();
- int main() {
- cout << "Welcome to " << "Star shop" << "!" << endl;
- cout << "Press 1 to sign-in or Press 2 to create a new account" << endl;
- cout << "For buying Clothes press 3 " << endl;
- cout << "For buying Shoes press 4 " << endl;
- cout << "For buying Make-up press 5" << endl;
- cout << "For buying Electronics press 6" << endl;
- char command;
- cin >> command;
- if (command == '1') {
- cout << "Username: " << endl;
- char userName[50];
- cin >> userName;
- cout << "Password: " << endl;
- char password[50];
- cin >> password;
- cout << "You are signed-in! " << endl;
- }
- if (command=='2'){
- cout << "Enter email adrres: " << endl;
- char email[50];
- cin >> email;
- cout << "Select user name: " << endl;
- char userName[50];
- cin >> userName;
- cout << "Create a password: " << endl;
- char password[50];
- cin >> password;
- cout << "Re-enter the password: " << endl; {
- char password[50];
- cin >> password;
- cout << "You have succesfuly created a new account! Welcome !" << endl;
- }
- }
- if (command == '3') {
- clothes[0].printClothes();
- clothes[1].printClothes();
- clothes[2].printClothes();
- clothes[3].printClothes();
- }
- else if (command == '4') {
- shoes[0].printShoes();
- shoes[1].printShoes();
- shoes[2].printShoes();
- shoes[3].printShoes();
- }
- else if (command == '5') {
- make_up[0].printMake_up();
- make_up[1].printMake_up();
- make_up[2].printMake_up();
- make_up[3].printMake_up();
- }
- else if (command == '6') {
- electronics[0].printElectronics();
- electronics[1].printElectronics();
- electronics[2].printElectronics();
- electronics[3].printElectronics();
- }
- return 0;
- }
- void AddInfo() {
- Clothes clothes1("T-shirt", "red", 10, "unisex", "XS");
- Clothes clothes2("Dress", "pink", 99.99, "women", "S");
- Clothes clothes3("Jacket", "green", 70, "men", "L");
- Clothes clothes4("Jeans", "blue", 49.99, "men", "XL");
- Clothes clothes5("Shirt", "yellow", 35, "women", "M");
- Shoes shoes1("Sneakers", "white", 150, "Nike", 45);
- Shoes shoes2("Sneakers", "black", 120, "Adidas", 42);
- Shoes shoes3("Heels", "blue", 99.99, "St.Oliver", 39);
- Shoes shoes4("Boots", "yellow", 180, "Timberland", 38);
- Electronics electronics1("Laptop", "black", 680, "HP");
- Electronics electronics2("Headphones", "white", 69.90, "Sony");
- Electronics electronics3("iPhone", "red", 1500, "Apple");
- Electronics electronics4("Speaker", "green", 189, "JBL");
- Make_up make_up1("Mascara", "black", 15, "waterproof");
- Make_up make_up2("Powder", "nude", 35, "matte");
- Make_up make_up3("Blush", "pink", 25, "matte");
- Make_up make_up4("Lipstick", "red", 10, "glossy");
- clothes[0] = clothes1;
- clothes[1] = clothes2;
- clothes[2] = clothes3;
- clothes[3] = clothes4;
- clothes[4] = clothes5;
- shoes[0] = shoes1;
- shoes[1] = shoes2;
- shoes[2] = shoes3;
- shoes[3] = shoes4;
- electronics[0] = electronics1;
- electronics[1] = electronics2;
- electronics[2] = electronics3;
- electronics[3] = electronics4;
- make_up[0] = make_up1;
- make_up[1] = make_up2;
- make_up[2] = make_up3;
- make_up[3] = make_up4;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement