Baixe o app para aproveitar ainda mais
Prévia do material em texto
ANEXO CODIGO FONTE #include <iostream> #include <string.h> #include <cstdlib> #include <conio.h>//para utilizar o getch() #include <ctype.h>//para utilizar o isdigit() #include <fstream> #define MAX_CLIENTES 50 using namespace std; struct cliente // struct para armazenar os clientes { string Nome; string Endereco; string Telefone; string Cep; int codigo; int ver; }cliente1[MAX_CLIENTES], clientecomp, cliente2[50]; // variavel do tipo clientes, com para parametro de armazenamento definido pela constante struct Pizzas { // struct para criação das pizzas string nome; string tamanho; string ingredientes; string preco; int compra; // argumentos para facilitar o armazenamento e tambem para trabalhar com os dados da struct void insere(string stnome, string sttamanho, string stingredientes, string stpreco, int stcompra) { nome = stnome; tamanho = sttamanho; ingredientes = stingredientes; preco = stpreco; compra = stcompra; } // argumentos para facilitar o armazenamento e tambem tambem para trabalhar com os dados da struct void mostra1() { cout << "NOME...............: " << nome << "\n\n"; cout << "INGREDIENTES.......: " << ingredientes << "\n\n"; cout << "TAMANHO............: " << tamanho << "\n\n"; cout << "PRECOS.............: " << preco << "\n\n"; } // argumentos para facilitar o armazenamento e tambem tambem para trabalhar com os dados da struct void mostra2() { cout << "NOME...............: " << nome << "\n\n"; cout << "INGREDIENTES.......: " << ingredientes << "\n\n"; cout << "CODIGO PARA COMPRA.: " << compra << "\n\n"; } // argumentos para facilitar o armazenamento e tambem tambem para trabalhar com os dados da struct void mostra3() { cout << "NOME...............: " << nome << "\n\n"; cout << "TAMANHO............: " << tamanho << "\n\n"; cout << "PRECOS.............: " << preco << "\n\n"; } // argumentos para facilitar o armazenamento e tambem tambem para trabalhar com os dados da struct void mostra4() { cout << "NOME...............: " << nome << "\n\n"; cout << "CODIGO PARA COMPRA.: " << compra << "\n\n"; } }; struct Bebidas { string tipo; string nome1; string ml; string sabor1; string preco1; int compra1; int precocomp; // argumentos para facilitar o armazenamento e tambem tambem para trabalhar com os dados da struct void insere2(string sttipo, string stnome1, string stml, string stsabor1, string stpreco1, int stcompra1, int stprecocomp) { tipo = sttipo; nome1 = stnome1; ml = stml; sabor1 = stsabor1; preco1 = stpreco1; compra1 = stcompra1; precocomp = stprecocomp; } // argumentos para facilitar o armazenamento e tambem tambem para trabalhar com os dados da struct void mostrabebidas() { cout << "NOME...............: " << nome1 << "\n\n"; cout << "TIPO...............: " << tipo << "\n\n"; cout << "ML.................: " << ml << "\n\n"; cout << "SABOR..............: " << sabor1 << "\n\n"; cout << "PRECOS.............: " << preco1 << "\n\n"; cout << "CODIGO PARA COMPRA.: " << compra1 << "\n\n"; } // argumentos para facilitar o armazenamento e tambem tambem para trabalhar com os dados da struct void mostrabebidas1() { cout << "NOME...............: " << nome1 << "\n\n"; cout << "ML.................: " << ml << "\n\n"; cout << "SABOR..............: " << sabor1 << "\n\n"; cout << "PRECOS.............: " << preco1 << "\n\n"; } }; // variaveis do novo tipo criado por struct Bebidas CocaCola, Fanta, Fanta1, Kuat, CocaCola1, CocaCola2, Skol, Brahma, Heineken, Imperio; // variaveis do novo tipo criado por struct Bebidas bebc[10]; // variaveis do novo tipo criado por struct Pizzas Dacasa, Marguerita, Baiana, Bauru, Calabresa, Frangocatupiry, Mussarela, Brocolis, Lombo, Escarola, Quatroqueijos, Portuguesa; struct Login { char username[20]; char Passoword[10]; int Codigol; }; Login login, login1;// Variavael do tipo login // STRUCT PARA TRABALHO COM FUNCIONARIOS struct funcionario { string nome; string funcao; string data; int pizzaria; void insfun(string stnome1, string stfuncao, string stdata, int stpizzaria) { nome = stnome1; funcao = stfuncao; data = stdata; pizzaria = stpizzaria; } }; // VARIAVEIS DO TIPO FUNCIONARIO funcionario funcionarios[10]; funcionario PEDRO, JOAO, MARIA, LEONARDO; funcionario PAULO, LUCAS, JOANA, CARLOS; funcionario MATHEUS, ROGERIO, MARTA, DAVI; // STRUCT PARA CONTROLE DE ESTOQUE struct estoque { string nome3; string validade; float quantidade; int codigoins; // argumentos para facilitar o armazenamento e tambem tambem para trabalhar com os dados da struct void insere3(string stnome, float stquantidade, string stvalidade, int stcodigoins) { nome3 = stnome; validade = stvalidade; quantidade = stquantidade; codigoins = stcodigoins; } // argumentos para facilitar o armazenamento e tambem tambem para trabalhar com os dados da struct void mostraest() { cout << "............................................................................"; cout << "\nNOME :" << nome3 << "\n"; cout << "\nVALIDADE :" << validade << "\n"; cout << "\nQUANTIDADE :" << quantidade << "\n"; cout << "............................................................................\n\n"; } // argumentos para facilitar o armazenamento e tambem tambem para trabalhar com os dados da struct void mostraest1() { cout << "............................................................................"; cout << "\nNOME :" << nome3 << "\n"; cout << "\nCODIGO DO PRODUTO :" << codigoins; cout << "............................................................................\n\n"; } }; // STRUCT PARA CONTROLE DE ESTOQUE // ABATENDO A QUANTIDADE CORRETA CONFORME A VENDA struct custos { string produtofinal; string precosprodutos; string fichatecnica; // argumentos para facilitar o armazenamento e tambem tambem para trabalhar com os dados da struct void ins(string stprodutofinal, string stprecoprodutos, string stfichatecnica) { produtofinal = stprodutofinal; precosprodutos = stprecoprodutos; fichatecnica = stfichatecnica; } // argumentos para facilitar o armazenamento e tambem tambem para trabalhar com os dados da struct void mos() { cout << "Ingredientes da massa : " << produtofinal << "\n\n"; cout << "Preco dos ingredientes : " << precosprodutos << "\n\n"; } }; custos Massa, MassaM, MassaP, MassaG, dacasa, dacasaP, dacasaG, marguerita, margueritaP, margueritaG, baiana, baianaP, baianaG, bauru, bauruP, bauruG, calabresa, calabresaP, calabresaG; custos frangocatupiry, frangocatupiryP, frangocatupiryG, mussarela, mussarelaP, mussarelaG, brocolis, brocolisP, brocolisG, lombo, lomboP, lomboG; custos escarola, escarolaP, escarolaG, quatroqueijos, quatroqueijosP, quatroqueijosG, portuguesa, portuguesaP, portuguesaG; estoque MOLHODETOMATE, MUSSARELA, PRESUNTO, OVOS, TOMATE, CEBOLA, CATUPIRY, AZEITONAS, PARMESAO, MANJERICAO, CALABRESA, FRANGO, BROCOLIS, BACON, LOMBO, ALHOFRITO, ESCAROLA, PROVOLONE, PALMITO; estoque COCACOLA, FANTA, FANTA1, KUAT, COCACOLA1, COCACOLA2, SKOL, BRAHMA, HEINEKEN, IMPERIO; estoque MASSA, FARINHA, ACUCAR, FERMENTO, SAL, OLEO, MANTEIGA; // STRUCT PARA OBSERVAÇÕES E PEDIDOS MEIO A MEIO struct pedido { string Obs; string Adicionais; }; // VARIAVEIS GLOBAIS int pizza1; int pizzac; int bebidasc; int tamanho1 = 0; int tamanho12 = 0; int numero1 = 0; int numero = 0; float numero2 = 0; int comprab = 0; int mostrapedido[12]; int mostrapedido2[10]; int j; // PROTOTIPAÇÃO DAS FUNÇÕES UTILIZADAS void comprar(int venda, Pizzas teste[], Pizzas pz[]); void comprar2(int venda1, Bebidas bebc[10], Bebidas be[]); void cadastrar(int qtd, cliente cl[]); void mostrar(int qtd, cliente cl[]); void aceitarnum(); void aceitarnum1(); void grava(); int clientes(int qtd, cliente cl[]); int insereEstoque(int qtd2, estoque Estoque[40], estoque est[]); int mostrafun(); int cadastrafun(int qtd1, funcionario fn[]); int moscli(); #define LIMPA_BUFFER cin.ignore(INT_MAX, '\n') //FUNÇÃO PRINCIPAL int main() { int qtd = 0; // ACEITAR CARACTERES ESPECIAIS setlocale(LC_ALL, "Portuguese"); // STRUCT PIZZAS Dacasa.insere("A MODA DA CASA", "PEQUENO - MEDIO - GRANDE", "MOLHO DE TOMATE FRESCO, MUSSARELA, PRESUNTO, OVOS, CEBOLA, CATUPIRY, OREGANO E AZEITONAS PRETAS", "PEQUENO R$ : 10,00, MEDIO R$ : 15,00, GRANDE R$ : 25,00 ", 1); Marguerita.insere("MARGUERITA", "PEQUENO - MEDIO - GRANDE", "MOLHO DE TOMATE FRESCO, MUSSARELA, RODELAS DE TOMATE, PARMESAO, MANJERICAO, OREGANO E AZEITONAS PRETAS", "PEQUENO R$ : 10,00, MEDIO R$ : 15,00, GRANDE R$ : 25,00 ", 2); Baiana.insere("BAIANA", "PEQUENO - MEDIO - GRANDE", "MOLHO DE TOMATE FRESCO, MUSSARELA, CALABRESA MOIDA LEVEMENTE APIMENTADA, OVOS COZIDOS PICADOS, CEBOLA, OREGANO E AZEITONAS PRETAS", "PEQUENO R$ : 10,00, MEDIO R$ : 15,00, GRANDE R$ : 25,00 ", 3); Bauru.insere("BAURU", "PEQUENO - MEDIO - GRANDE", "MOLHO DE TOMATE FRESCO, MUSSARELA, PRESUNTO, RODELAS DE TOMATE,OREGANO E AZEITONAS PRETAS", "PEQUENO R$ : 10,00, MEDIO R$ : 15,00, GRANDE R$ : 25,00 ", 4); Calabresa.insere("CALABRESA", "PEQUENO - MEDIO - GRANDE", "MOLHO DE TOMATE FRESCO, MUSSARELA, CALABRESA FATIADA, CEBOLA, OREGANO E AZEITONAS PRETAS", "PEQUENO R$ : 10,00, MEDIO R$ : 15,00, GRANDE R$ : 25,00 ", 5); Frangocatupiry.insere("FRANGO COM CATUPIRY", "PEQUENO - MEDIO - GRANDE", "MOLHO DE TOMATE FRESCO, MUSSARELA, PEITO DE FRANGO DESFIADO LEVEMENTE TEMPERADO, CATUPIRY, OREGANO E AZEITONAS PRETAS", "PEQUENO R$ : 10,00, MEDIO R$ : 15,00, GRANDE R$ : 25,00 ", 6); Mussarela.insere("MUSSARELA", "PEQUENO - MEDIO - GRANDE", "MOLHO DE TOMATE FRESCO, MUSSARELA,OREGANO E AZEITONAS PRETAS", "PEQUENO R$ : 10,00, MEDIO R$ : 15,00, GRANDE R$ : 25,00", 7); Brocolis.insere("BROCOLIS", "PEQUENO - MEDIO - GRANDE", "MOLHO DE TOMATE FRESCO, MUSSARELA, BROCOLIS, BACON, CATUPIRY, OREGANO E AZEITONAS PRETAS", "PEQUENO R$ : 10,00, MEDIO R$ : 15,00, GRANDE R$ : 25,00", 8); Lombo.insere("LOMBO", "PEQUENO - MEDIO - GRANDE", "MOLHO DE TOMATE FRESCO, MUSSARELA, LOMBO, CATUPIRY, OREGANO E AZEITONAS PRETAS", "PEQUENO R$ : 10,00, MEDIO R$ : 15,00, GRANDE R$ : 25,00", 9); Escarola.insere("ESCAROLA", "PEQUENO - MEDIO - GRANDE", "MOLHO DE TOMATE FRESCO, MUSSARELA, ESCAROLA REFOGADA, ALHO, BACON, OREGANO E AZEITONAS PRETAS", "PEQUENO R$ : 10,00, MEDIO R$ : 15,00, GRANDE R$ : 25,00", 10); Quatroqueijos.insere("QUATRO QUEIJOS", "PEQUENO - MEDIO - GRANDE", "MOLHO DE TOMATE FRESCO, MUSSARELA, PROVOLONE, PARMESAO, CATUPIRY, OREGANO E AZEITONAS PRETAS", "PEQUENO R$ : 10,00, MEDIO R$ : 15,00, GRANDE R$ : 25,00", 11); Portuguesa.insere("PORTUGUESA", "PEQUENO - MEDIO - GRANDE", "MOLHO DE TOMATE FRESCO, MUSSARELA, PRESUNTO , CEBOLA, OVOS, PALMITO, OREGANO E AZEITONAS PRETAS", "PEQUENO R$ : 10,00, MEDIO R$ : 15,00, GRANDE R$ : 25,00", 12); // VETOR PIZZZAS Pizzas teste[12] = { Dacasa, Marguerita, Baiana, Bauru, Calabresa, Frangocatupiry, Mussarela, Brocolis, Lombo, Escarola, Quatroqueijos, Portuguesa }; // STRUCT CUSTOS Massa.ins("PARA 5KG DE MASSA\n", "\nFARINHA ANACONDA 5KG = R$ 11,00\n OVOS 30 UNIDADES = R$ 12,00\n SAL 1KG = R$ 3,00\nACUCAR 1KG = R$ 4,00\n OLEO DE SOJA = R$ 4,00\n MANTEIGA 5KG = R$ 150,00\n FERMENTO FRESCO 500gr = R$ 5,00\n", " 5kg de farinha\n 5 ovos\n 50 grs de sal\n 30gr de acucar\n 120ml de oleo\n 200gr de manteiga\n 50gr de fermento fresco\n"); MassaP.fichatecnica = ("300 gr de massa\n"); MassaM.fichatecnica = ("400 gr de massa\n"); MassaG.fichatecnica = ("500 gr de massa\n"); dacasa.ins("PIZZA DACASA\n", "\nMOLHO DE TOMATE 1KG = R$ 10,00\n MUSSARELA 1KG = R$ 20,00\n PRESUNTO 1KG = R$ 15,00\nOVOS 30 UNIDADES = R$ 12,00\n CEBOLA 1KG = R$ 5,00\nCATUPIRY 1KG = R$ 10,00\nAZEITONAS PRETAS 1KG = R$ 20,00\n", "\n100gr de molho de tomate\n100gr de mussarela\n100gr de presunto\n 2 unidades de ovos\n50gr de cebola\n100gr de catupiry\n50gr de azeitonas"); dacasaP.fichatecnica = ("\n50gr de molho de tomate\n50gr de mussarela\n50gr de presunto\n 1 unidades de ovos\n25gr de cebola\n50gr de catupiry\n25gr de azeitonas"); dacasaG.fichatecnica = ("\n200gr de molho de tomate\n200gr de mussarela\n200gr de presunto\n 4 unidades de ovos\n100gr de cebola\n200gr de catupiry\n100gr de azeitonas"); marguerita.ins("PIZZA MARGUERITA\n", "\nMOLHO DE TOMATE 1KG = R$ 10,00\n MUSSARELA 1KG = R$ 20,00\nTOMATE 1KG = R$ = 5,00\nPARMESÃO 1KG = R$ = 20,00\nMANJERIÇÃO 100gr = R$ 1,00\nAZEITONAS PRETAS 1KG = R$ 20,00\n", "\n100gr de molho de tomate\n100gr de mussarela\n100gr tomate rodela\n50gr de parmesão\n10gr manjericão\n50gr de azeitonas"); margueritaP.fichatecnica = ("\n50gr de molho de tomate\n50gr de mussarela\n50gr tomate rodela\n25gr de parmesão\n5gr manjericão\n25gr de azeitonas"); margueritaG.fichatecnica = ("\n200gr de molho de tomate\n200gr de mussarela\n200gr tomate rodela\n100gr de parmesão\n20gr manjericão\n100gr de azeitonas"); baiana.ins("PIZZA BAIANA\n", "\nMOLHO DE TOMATE 1KG = R$ 10,00\n MUSSARELA 1KG = R$ 20,00\nCALABRESA 1KG = R$ = 10,00\n OVOS 30 UNIDADES = R$ 12,00\nCEBOLA 1KG = R$ 5,00\nAZEITONAS PRETAS 1KG = R$ 20,00\n", "\n100gr de molho de tomate\n100gr de mussarela\n100gr de calabresa\n 2 unidades de ovos\n50gr de cebola\n50gr de azeitonas"); baianaP.fichatecnica = ("\n50gr de molho de tomate\n50gr de mussarela\n50gr de calabresa\n 1 unidades de ovos\n25gr de cebola\n25gr de azeitonas"); baianaG.fichatecnica = ("\n200gr de molho de tomate\n200gr de mussarela\n200gr de calabresa\n 4 unidades de ovos\n100gr de cebola\n100gr de azeitonas"); bauru.ins("PIZZA BAURU\n", "\nMOLHO DE TOMATE 1KG = R$ 10,00\n MUSSARELA 1KG = R$ 20,00\nPRESUNTO 1KG = R$ 15,00\nTOMATE 1KG = R$ = 5,00\nAZEITONAS PRETAS 1KG = R$ 20,00\n", "\n100gr de molho de tomate\n100gr de mussarela\n100gr de presunto\n100gr tomate rodela\n50gr de azeitonas"); bauruP.fichatecnica = ("\n50gr de molho de tomate\n50gr de mussarela\n50gr de presunto\n50gr tomate rodela\n25gr de azeitonas"); bauruG.fichatecnica = ("\n200gr de molho de tomate\n200gr de mussarela\n200gr de presunto\n200gr tomate rodela\n100gr de azeitonas"); calabresa.ins("PIZZA CALABRESA\n", "\nMOLHO DE TOMATE 1KG = R$ 10,00\n MUSSARELA 1KG = R$ 20,00\nCALABRESA 1KG = R$ = 10,00\nCEBOLA 1KG = R$ 5,00\nAZEITONAS PRETAS 1KG = R$ 20,00\n", "\n100gr de molho de tomate\n100gr de mussarela\n100gr de calabresa\n50gr de cebola\n50gr de azeitonas"); calabresaP.fichatecnica = ("\n50gr de molho de tomate\n50gr de mussarela\n50gr de calabresa\n25gr de cebola\n25gr de azeitonas"); calabresaG.fichatecnica = ("\n200gr de molho de tomate\n200gr de mussarela\n200gr de calabresa\n100gr de cebola\n100gr de azeitonas"); frangocatupiry.ins("PIZZA FRANGO COM CATUPIRY\n", "\nMOLHO DE TOMATE 1KG = R$ 10,00\n MUSSARELA 1KG = R$ 20,00\nPEITO DE FRANGO 1KG = R$ 10,00\nCATUPIRY 1KG = R$ 10,00\nAZEITONAS PRETAS 1KG = R$ 20,00\n", "\n100gr de molho de tomate\n100gr de mussarela\n100gr de peito de frango\n100gr de catupiry\n50gr de azeitonas"); frangocatupiryP.fichatecnica = ("\n50gr de molho de tomate\n50gr de mussarela\n50gr de peito de frango\n50gr de catupiry\n25gr de azeitonas"); frangocatupiryG.fichatecnica = ("\n200gr de molho de tomate\n200gr de mussarela\n200gr de peito de frango\n200gr de catupiry\n100gr de azeitonas"); mussarela.ins("PIZZA MUSSARELA\n", "\nMOLHO DE TOMATE 1KG = R$ 10,00\n MUSSARELA 1KG = R$ 20,00\nAZEITONAS PRETAS 1KG = R$ 20,00\n", "\n100gr de molho de tomate\n200gr de mussarela\n50gr de azeitonas"); mussarelaP.fichatecnica = ("\n50gr de molho de tomate\n100gr de mussarela\n25gr de azeitonas"); mussarelaG.fichatecnica = ("\n200gr de molho de tomate\n400gr de mussarela\n100gr de azeitonas"); brocolis.ins("PIZZA DE BROCOLIS\n", "\nMOLHO DE TOMATE 1KG = R$ 10,00\n MUSSARELA 1KG = R$ 20,00\nBROCOLIS 1KG = R$ 10,00\nBACON 1KG = R$ 20,00\nCATUPIRY 1KG = R$ 10,00\nAZEITONAS PRETAS 1KG = R$ 20,00\n", "\n100gr de molho de tomate\n100gr de mussarela\n100gr de brocolis\n100gr de bacon\n100gr de catupiry\n50gr de azeitonas"); brocolisP.fichatecnica = ("\n50gr de molho de tomate\n50grde mussarela\n50gr de brocolis\n50gr de bacon\n50gr de catupiry\n25gr de azeitonas"); brocolisG.fichatecnica = ("\n200gr de molho de tomate\n200gr de mussarela\n200gr de brocolis\n200gr de bacon\n200gr de catupiry\n100gr de azeitonas"); lombo.ins("PIZZA DE LOMBO", "\nMOLHO DE TOMATE 1KG = R$ 10,00\n MUSSARELA 1KG = R$ 20,00\nLOMBO 1KG = R$ 10,00\nCATUPIRY 1KG = R$ 10,00\nAZEITONAS PRETAS 1KG = R$ 20,00\n", "\n100gr de molho de tomate\n100gr de mussarela\n100gr de lombo\n100gr de catupiry\n50gr de azeitonas"); lomboP.fichatecnica = ("\n50gr de molho de tomate\n50gr de mussarela\n50gr de lombo\n50gr de catupiry\n25gr de azeitonas"); lomboG.fichatecnica = ("\n200gr de molho de tomate\n200gr de mussarela\n200gr de lombo\n200gr de catupiry\n100gr de azeitonas"); escarola.ins("PIZZA DE ESCAROLA", "\nMOLHO DE TOMATE 1KG = R$ 10,00\n MUSSARELA 1KG = R$ 20,00\nESCAROLA 1KG = R$ 5,00\nALHO FRITO 1KG = R$ 10,00\nBACON 1KG = R$ 20,00\nAZEITONAS PRETAS 1KG = R$ 20,00\n", "\n100gr de molho de tomate\n100gr de mussarela\n100gr de escarola\n50gr de alho frito\n100gr de bacon\n50gr de azeitonas"); escarolaP.fichatecnica = ("\n50gr de molho de tomate\n50gr de mussarela\n50gr de escarola\n25gr de alho frito\n50gr de bacon\n25gr de azeitonas"); escarolaG.fichatecnica = ("\n200gr de molho de tomate\n200gr de mussarela\n200gr de escarola\n100gr de alho frito\n200gr de bacon\n100gr de azeitonas"); quatroqueijos.ins("PIZZA DE QUATRO QUEIJOS", "MOLHO DE TOMATE 1KG = R$ 10,00\n MUSSARELA 1KG = R$ 20,00\nPROVOLONE 1KG = R$ 30,00\nPARMESÃO 1KG = R$ = 20,00\n\nCATUPIRY 1KG = R$ 10,00\nAZEITONAS PRETAS 1KG = R$ 20,00\n", "\n100gr de molho de tomate\n100gr de mussarela\n50gr de provolone\n50gr de parmesão\n100gr de catupiry\n50gr de azeitonas"); quatroqueijosP.fichatecnica = ("\n50gr de molho de tomate\n50gr de mussarela\n25gr de provolone\n25gr de parmesão\n50gr de catupiry\n25gr de azeitonas"); quatroqueijosG.fichatecnica = ("\n200gr de molho de tomate\n200gr de mussarela\n100gr de provolone\n100gr de parmesão\n200gr de catupiry\n100gr de azeitonas"); portuguesa.ins("PIZZA PORTUGUESA", "\nMOLHO DE TOMATE 1KG = R$ 10,00\n MUSSARELA 1KG = R$ 20,00n PRESUNTO 1KG = R$ 15,00\nOVOS 30 UNIDADES = R$ 12,00\n CEBOLA 1KG = R$ 5,00\nPALMITO 1KG = R$ 20,00\nAZEITONAS PRETAS 1KG = R$ 20,00\n", "\n100gr de molho de tomate\n100gr de mussarela\n100gr de presunto\n 2 unidades de ovos\n50gr de cebola\n100gr de palmito\n50gr de azeitonas"); portuguesaP.fichatecnica = ("\n50gr de molho de tomate\n50gr de mussarela\n50gr de presunto\n 1 unidades de ovos\n25gr de cebola\n50gr de palmito\n25gr de azeitonas"); portuguesaG.fichatecnica = ("\n200gr de molho de tomate\n200gr de mussarela\n200gr de presunto\n 4 unidades de ovos\n100gr de cebola\n200gr de palmito\n25gr de azeitonas"); // struct estoque recebendo valores FARINHA.insere3("FARINHA\n", 4000, "30 DIAS\n", 1); ACUCAR.insere3("AÇUCAR\n", 4000, "30 DIAS\n", 2); FERMENTO.insere3("FERMENTO\n", 1000, "30 DIAS\n", 3); SAL.insere3("SAL\n", 1000, "30 DIAS\n", 4); OLEO.insere3("ÓLEO", 4000, "30 DIAS\n", 5); MANTEIGA.insere3("MANTEIGA\n", 1000, "30 DIAS\n", 6); // struct estoque recebendo valores MASSA.insere3("MASSA PRONTA\n", 0, "1 DIA\n", 0); MOLHODETOMATE.insere3("MOLHO DE TOMATE\n", 4000, "3 DIAS\n", 7); MUSSARELA.insere3("MUSSARELA\n", 6000, "3 DIAS\n", 8); PRESUNTO.insere3("PRESUNTO\n", 4000, "3 DIAS\n", 9); OVOS.insere3("OVOS\n", 100, "7 DIAS\n", 10); TOMATE.insere3("TOMATE\n", 4000, "3 DIAS\n", 11); CEBOLA.insere3("CEBOLA\n", 4000, "3 DIAS\n", 12); CATUPIRY.insere3("CATUPIRY\n", 4000, "3 DIAS\n", 13); AZEITONAS.insere3("AZEITONAS\n", 1000, "3 DIAS\n", 14); PARMESAO.insere3("PARMESÃO\n", 4000, "3 DIAS\n", 15); MANJERICAO.insere3("MANJERICÃO\n", 3000, "3 DIAS\n", 16); CALABRESA.insere3("CALABRESA\n", 4000, "3 DIAS\n", 17); FRANGO.insere3("PEITO DE FRANGO\n", 4000, "3 DIAS\n", 18); BROCOLIS.insere3("BROCOLIS\n", 4000, "3 DIAS\n", 19); BACON.insere3("BACON\n", 4000, "3 DIAS\n", 20); LOMBO.insere3("LOMBO\n", 4000, "3 DIAS\n", 21); ALHOFRITO.insere3("ALHO FRITO\n", 4000, "7 DIAS\n", 22); ESCAROLA.insere3("ESCAROLA\n", 4000, "3 DIAS\n", 23); PROVOLONE.insere3("PROVOLONE\n", 4000, "3 DIAS\n", 24); PALMITO.insere3("PALMITO\n", 4000, "3 DIAS\n", 25); // struct estoque recebendo valores COCACOLA.insere3("COCA-COLA\n", 100, "30 DIAS\n", 26); FANTA.insere3("FANTA LARANJA\n", 50, "30 DIAS\n", 27); FANTA1.insere3("FATA UVA \n", 50, "30 DIAS\n", 28); KUAT.insere3("KUAT GUARANA\n", 50, "30 DIAS\n", 29); COCACOLA1.insere3("COCA-COLA ZERO\n", 50, "30 DIAS\n", 30); COCACOLA2.insere3("COCA-COLA 2 LITROS\n", 100, "30 DIAS\n", 31); SKOL.insere3("CERVEJA SKOL\n", 50, "30 DIAS\n", 32); BRAHMA.insere3("CERVEJA BRAHMA\n", 50, "30 DIAS\n", 33); HEINEKEN.insere3("CERVEJA HEINEKEN\n", 50, "30 DIAS\n", 34); IMPERIO.insere3("CERVEJA IMPERIO\n", 50, "30 DIAS\n", 35); //criando vetor de estoque com todos os produtos estoque Estoque[40] = { MOLHODETOMATE, MUSSARELA, PRESUNTO, OVOS,TOMATE,CEBOLA,CATUPIRY,AZEITONAS,PARMESAO,MANJERICAO,CALABRESA,FRANGO,BROCOLIS,BACON,LOMBO,ALHOFRITO,ESCAROLA,PROVOLONE, PALMITO, COCACOLA, FANTA, FANTA1, KUAT, COCACOLA1,COCACOLA2, SKOL, BRAHMA, HEINEKEN, IMPERIO,MASSA,FARINHA,ACUCAR,FERMENTO,SAL,OLEO,MANTEIGA }; // struct bebidas recebendo valores CocaCola.insere2("REFRIGERANTE", "COCA COLA", "350 ML", "COLA", "R$ - 5,00 REAIS", 1, 5); Fanta.insere2("REFRIGERANTE", "FANTA", "350 ML", "LARANJA", "R$ - 5,00 REAIS", 2, 5); Fanta1.insere2("REFRIGERANTE", "FANTA", "350 ML", "UVA", "R$ - 5,00 REAIS", 3, 5); Kuat.insere2("REFRIGERANTE", "KUAT", "350 ML", "GUARANA", "R$ - 5,00 REAIS", 4, 5); CocaCola1.insere2("REFRIGERANTE", "COCA COLA ZERO", "350 ML", "COLA", "R$ - 5,00 REAIS", 5, 5); CocaCola2.insere2("REFRIGERANTE", "COCA COLA", "2 LITROS", "COLA", "R$ - 10,00 REAIS", 6, 10); Skol.insere2("CERVEJA", "SKOL", "350 ML", "PILSEN", "R$ - 5,00 REAIS", 7, 5); Brahma.insere2("CERVEJA", "BRAHMA", "350 ML", "PILSEN", "R$ - 5,00 REAIS", 8, 5); Heineken.insere2("CERVEJA", "HEINEKEN", "350 ML", "PURO MALTE", "R$ - 5,00 REAIS", 9, 5); Imperio.insere2("CERVEJA", "IMPERIO", "350 ML", "PURO MALTE", "R$ - 5,00 REAIS", 10, 5); Bebidas bebc[10] = { CocaCola, Fanta, Fanta1, Kuat, CocaCola1,CocaCola2, Skol, Brahma, Heineken, Imperio }; // adicionando a produção diaria da massa e abatendo as quantidades dos produtos do estoque MASSA.quantidade = MASSA.quantidade + 10000; if (MASSA.quantidade == 10000) { FARINHA.quantidade = FARINHA.quantidade - 10000; ACUCAR.quantidade = ACUCAR.quantidade - 60; OVOS.quantidade = OVOS.quantidade - 10; SAL.quantidade = SAL.quantidade - 100; OLEO.quantidade = OLEO.quantidade - 240; MANTEIGA.quantidade = MANTEIGA.quantidade - 400; FERMENTO.quantidade = FERMENTO.quantidade - 100; } //struct funcionario recebendo dados PEDRO.insfun("PEDRO HENRIQUE", "PIZZAIOLO", "03/06/2018", 1); JOAO.insfun("JOÃO DA SILVA", "PIZZAIOLO", "04/12/2017", 1); MARIA.insfun("MARIA DO CARMO", "CAIXA", "07/08/2017", 1); LEONARDO.insfun("LEONARDO HENRIQUE", "AUXILIAR", "09/03/2019", 1); PAULO.insfun("PAULO MARTINS", "PIZZAIOLO", "09/03/2019", 2); LUCAS.insfun("LUCAS SOUZA", "PIZZAIOLO", "12/05/2017", 2); JOANA.insfun("JOANA APARECIDA", "CAIXA", "08/08/2019", 2); CARLOS.insfun("CARLOS EDUARDO", "AUXILIAR", "02/12/2018", 2); MATHEUS.insfun("MATHEUS NASCIMENTO", "PIZZAIOLO", "15/08/2017", 3); ROGERIO.insfun("ROGERIO CASTRO", "PIZZAIOLO", "12/06/2018", 3); MARTA.insfun("MARTA DE SOUZA", "CAIXA", "09/08/2018", 3); DAVI.insfun("DAVI GOMES", "AUXILIAR", "07/05/2018", 3); // LENDO CLIENTES CADASTRADOS PARA O PROGRAMA INICIAR COM OS CLIENTES JÁ CADASTRADOS fstream clientetes; clientetes.open("clientes.txt", fstream::in | fstream::app); // abrindo o arquivo if (clientetes.is_open()) { // teste de arquivo aberto string linha; int numlinha = 1; while (getline(clientetes, linha)) {//Rotina de leitura if (numlinha % 6 == 1) { cliente2[j].Nome = linha; cliente1[j].Nome = cliente2[j].Nome; }// LEITURA DE CADA LINHA else if (numlinha % 6 == 2) { cliente2[j].Endereco = linha; cliente1[j].Endereco = cliente2[j].Endereco; } // LEITURA DE CADA LINHA else if (numlinha % 6 == 3) { cliente2[j].Telefone = linha; cliente1[j].Telefone = cliente2[j].Telefone; } // LEITURA DE CADA LINHA else if (numlinha % 6 == 4) { cliente2[j].Cep = linha; cliente1[j].Cep = cliente2[j].Cep; } // LEITURA DE CADA LINHA else if (numlinha % 6 == 5) { int n; n = atoi(linha.c_str()); cliente2[j].codigo = n; cliente1[j].codigo = cliente2[j].codigo; j++; } numlinha++; } } clientetes.close(); // LEITURA DE DADOS DO ARQUIVO PARA ATUALIZAÇÃO DE ESTOQUE, MESMO QUANDO O PROGRAMA É REINICIADO /* fstream Estoque3; // definido como fstream para trabalhar tanto com escrita como leitrura dentro do arquivo txt Estoque3.open("estoque3.txt",fstream::in| fstream::app); // abrindo o arquivo if(Estoque3.is_open()){ // teste de arquivo aberto string linha1; int numlinha1=1; while(getline(Estoque3,linha1)){//Rotina de leitura if(numlinha1%2== 1){ MOLHODETOMATE.quantidade = atof(linha1.c_str()); } numlinha1++; if(numlinha1%2== 1){ MUSSARELA.quantidade = atof(linha1.c_str()); } PRESUNTO, OVOS, TOMATE, CEBOLA, CATUPIRY, AZEITONAS, PARMESAO, MANJERICAO, CALABRESA, FRANGO, BROCOLIS, BACON, LOMBO, ALHOFRITO ESCAROLA, PROVOLONE, PALMITO; cliente2[j].Nome = linha; cout << cliente2[j].Nome << "\n"; cliente1[j].Nome=cliente2[j].Nome; } else if(numlinha%6 == 2){ cliente2[j].Endereco = linha; cout << cliente2[j].Endereco<<"\n"; cliente1[j].Endereco=cliente2[j].Endereco; } else if(numlinha%6 == 3){ cliente2[j].Telefone = linha; cout << cliente2[j].Telefone<<"\n"; cliente1[j].Telefone=cliente2[j].Telefone; } else if(numlinha%6 == 4){ cliente2[j].Cep = linha; cout << cliente2[j].Cep<<"\n"; cliente1[j].Cep=cliente2[j].Cep; } else if(numlinha%6 == 5){ int n; n= atoi(linha.c_str()); cliente2[j].codigo=n; cout << cliente2[j].codigo<<"\n"; cliente1[j].codigo=cliente2[j].codigo; j++; } numlinha++; } }else{ cout <<"Nao foi possivel abir o arquivo"<<endl; } Estoque3.close(); cout << MOLHODETOMATE.quantidade <<"\n"; cout << MUSSARELA.quantidade <<"\n"; */ // função para gravar dados pre-definidos no arquivo desiguinado grava(); // variveis para login de vendas int codAdm = 1; char loginAdm[] = "operadorvendas"; char PassaAdm[] = "123"; char senha[10]; // LOGIN GERENCIAL int codAdm1 = 2; char loginAdm1[] = "gerenteestoque"; char PassaAdm1[] = "123"; char senha1[10]; // PROGRAMA INICIADO APÓS A INSERÇÃO DE DADOS // PRIMEIRA TELA DO PROGRAMA cout << "\n" << endl; cout << "\t\t\t\t ____________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|====================================================|" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t| PROGRAMA INICIADO COM SUCESSO |" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|====================================================|" << endl; cout << "\t\t\t\t|____________________________________________________|" << endl; // CAMPO ONDE O USUÁRIO DIGITA O NOME DE USUÁRIO cout << "\t\t\t\t ____________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t| INSIRA O LOGIN PARA CONTINUAR |" << endl; cout << "\t\t\t\t|____________________________________________________|" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|DIGITE O NOME DO USUARIO : "; cin >> login.username; cout << "\t\t\t\t|____________________________________________________|" << endl; // SENHA DO USUÁRIO cout << "\t\t\t\t ____________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|DIGITE A SENHA DE ACESSO : "; // MASCARA DE SENHA int i; fflush(stdin); for (i = 0; i < 3; i++) { senha[i] = getch(); putchar('*'); login.Passoword[i] = senha[i]; } getch(); // LOGIN PARA NIVEL DE ACESSO cout << "\n\t\t\t\t|____________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << " \t\t\t\t|DIGITE A CODIGO DE ACESSO : "; cin >> login.Codigol; cout << "\t\t\t\t|____________________________________________________|" << endl; cout << "\n\n \t\t\t\t"; system("pause"); // LOGIN INVALIDO while (!(strcmp(login.username, loginAdm) == 0) || (!strcmp(login.Passoword, PassaAdm) == 0) || !(codAdm == login.Codigol)) { system("cls"); cout << "\n\n\n"; cout << "\t\t\t\t _____________________________________________________" << endl; cout << "\t\t\t\t| |" << endl; cout << "\n\n\t\t\t\t|=====================================================|" << endl; cout << "\t\t\t\t| **** USUÁRIO INVALIDO **** |" << endl; cout << "\t\t\t\t| -> PRESSIONE ENTER PARA RETORNAR AO LOGIN NOVAMENTE |" << endl; cout << "\t\t\t\t|_____________________________________________________|"; getch(); cin.clear(); cin.ignore(INT_MAX, '\n'); system("cls"); return main(); } // LOGIN VALIDO while ((strcmp(login.username, loginAdm) == 0) && (strcmp(login.Passoword, PassaAdm) == 0) && (codAdm == login.Codigol)) { cout << endl; system("cls"); cout << "\n\n\n"; cout << "\t\t\t\t _____________________________________________________" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|=====================================================|" << endl; cout << "\t\t\t\t| **** USUÁRIO CADASTRADO NO SISTEMA!! **** |" << endl; cout << "\t\t\t\t| -> PRESSIONE ENTER PARA ABRIR O MENU! |" << endl; cout << "\t\t\t\t|_____________________________________________________|" << endl; getch(); system("cls"); do { // TELA PRINCIPAL QUE CONTÉM TODAS AS FUNÇÕES cout << "\n" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t| PIZZARIA FAST |" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t| ESCOLHA A OPCAO DESEJADA |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| DIGITE [1] PARA - CADASTRAR CLIENTES |" << endl; cout << "\t\t\t\t|____________________________________________________________|"<< endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| DIGITE [2] PARA - REALIZAR UM PEDIDO |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| DIGITE [3] PARA - VISUALIZAR OS CARDAPIOS |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| DIGITE [4] PARA - ÁREA GERENCIAL |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| SELECIONE A OPÇÃO DESEJADA |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; aceitarnum(); // SELECIONANDO OPÇÃO } while (numero < 1 || numero > 4); // CADASTRO DE CLIENTES while (numero == 1) { do { system("cls"); cout << "\n\n\n\n"; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t| MENU PARA CADASTRO DE CLIENTES |" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| QUANTOS CLIENTES VÃO SER CADASTRADOS |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; aceitarnum(); qtd = numero; // OPÇÃO INVALIDA if (qtd == 0) { cout << "\n\n\n\n"; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| DIGITE UMA OPÇÃO VALIDA |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| MINIMO 1 E MAXIMO 2 CLIENTES POR VEZ |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; } // MINIMO E MAXIMO PARA O CADASTRO } while (qtd < 1 || qtd > 2); system("cls"); cliente* cl = new cliente[qtd]; cadastrar(qtd, cl); mostrar(qtd, cl); getch(); system("cls"); numero = 0; } // SEGUNDA FUNÇÃO while (numero == 2) { int client = 0; // SAIR DO LOOP SOMENTE COM OPÇÃO VALIDA do { system("cls"); int condicao = 0; cout << "\n\n\n\n"; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t| MENU DE PEDIDOS |" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| O CLIENTE JA ESTA CADASTRADO ? |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| DIGITE [1] - PARA SIM |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| DIGITE [2] - PARA NÃO |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; aceitarnum(); client = numero; } while (client < 1 || client > 2); // CLIENTE NÃO CADASTRADO if (client == 2) { cout << "\n\n\n\n"; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| REALIZE O CADASTRO NO SISTEMA |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; system("pause"); system("cls"); return main(); } else { cliente* cl = new cliente[qtd]; clientes(qtd, cl); // VARIFICAÇÃO DE CODIGO VALIDA cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| PRESSIONE ENTER PARA CONTINUAR |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; getch(); } // INICIO DO PEDIDO, CLIENTE VINCULADO AO PEDIDO system("cls"); cout << "\n\n\n\n"; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t| MENU DE PEDIDOS |" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| CARDAPIO DA PIZZARIA FAST |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| CARDAPIO DE PIZZAS |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| PRESSIONE ENTER PARA VISUALIZAR |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; getch(); system("cls"); // CARDAPIO DE PIZZAS int venda; int venda1; Dacasa.mostra2(); cout << "\n"; Marguerita.mostra2(); cout << "\n"; Baiana.mostra2(); cout << "\n"; Bauru.mostra2(); cout << "\n"; Calabresa.mostra2(); cout << "\n"; Frangocatupiry.mostra2(); cout << "\n"; Mussarela.mostra2(); cout << "\n"; Brocolis.mostra2(); cout << "\n"; Lombo.mostra2(); cout << "\n"; Escarola.mostra2(); cout << "\n"; Quatroqueijos.mostra2(); cout << "\n"; Portuguesa.mostra2(); cout << "\n"; int verif = 0; // SAIR DO LOOP SOMENTE QUANDO A QUANTIDADE FOR VALIDA do { cout << "\t\t\t\t ____________________________________________________________" << endl; cout << "\t\t\t\t| QUANTAS PIZZAS DESEJA PEDIR HOJE ? |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; aceitarnum(); venda = numero; numero = 0; system("cls"); // ULTRAPASSOU O VALOR MAXIMO if (venda > 20) { cout << "\n\n\n\n"; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t| MENU DE PEDIDOS |" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| ESTA QUANTIDADE NÃO ESTA INDISPONIVEL PARA A VENDA |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; system("pause"); system("cls"); } } while (venda == 21 || venda > 21); // VENDA SOMENTE COM BEBIDAS if (venda == 0) { do { system("cls"); cout << "\n\n\n\n"; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t| MENU DE PEDIDOS |" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| O PEDIDO SERÁ COMPOSTO SOMENTE POR BEBIDAS ? |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| DIGITE [1] - PARA SIM |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| DIGITE [2] - PARA NÃO |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; aceitarnum(); verif = numero; numero = 0; // VENDA VAZIA, NÃO PODE SER REALIZADA if (verif == 2) { system("cls"); cout << "\n\n\n\n"; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t| MENU DE PEDIDOS |" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| FORMA INVALIDA DE PEDIDO |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; return main(); } else if (verif == 1); } while (!(verif == 1 || verif == 2)); } else { } // FUNÇÃO PARA A COMPRA DAS PIZZAS, COM QUATIDADE DIFINIDA COMO PARAMETRO Pizzas* pz = new Pizzas[venda]; cin.clear(); cin.ignore(INT_MAX, '\n'); system("cls"); comprar(venda, teste, pz); // PEDIDO DE BEBIDAS cout << "\n\n\n\n"; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t| MENU DE PEDIDOS |" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| CARDAPIO DE BEBIDAS |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| PRESSIONE ENTER PARA VISUALIZAR |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; getch(); // CARDAPIO DE BEBIDAS system("cls"); CocaCola.mostrabebidas(); cout << "\n"; Fanta.mostrabebidas(); cout << "\n"; Fanta1.mostrabebidas(); cout << "\n"; Kuat.mostrabebidas(); cout << "\n"; CocaCola1.mostrabebidas(); cout << "\n"; CocaCola2.mostrabebidas(); cout << "\n"; Skol.mostrabebidas(); cout << "\n"; Brahma.mostrabebidas(); cout << "\n"; Heineken.mostrabebidas(); cout << "\n"; Imperio.mostrabebidas(); cout << "\n"; // QUANTIDADE DE BEBIDAS A SEREM INSERIDAS NO PEDIDO cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| QUANTAS BEBIDAS DESEJA PEDIR HOJE ? |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; aceitarnum(); venda1 = numero; numero = 0; system("cls"); // PEDIDO SEM BEBIDAS E SEM PIZZAS if (venda == 0 && venda1 == 0) { system("cls"); cout << "\n\n\n\n"; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t| MENU DE PEDIDOS |" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| FORMA INVALIDA DE PEDIDO |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| PRESSIONE ENTER PARA REALIZAR UM NOVO PEDIDO |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; getch(); system("cls"); return main(); } // FUNÇÃOPARA A COMPRA DAS BEBIDAS Bebidas* be = new Bebidas[venda1]; comprar2(venda1, bebc, be); // TODOS OS DADOS DO PEDIDO SÃO EXIBIDOS NESTE PONTO, CLIENTE PRODUTOS E O TOTAL DE COMPRA // É NECESSARIO REALIZAR A VERIFICAÇÃO DE PEDIDO int cliente; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t| MENU DE PEDIDOS |" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| A COMPRA FOI EFETUADA POR |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\n\n\n"; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| " << endl; cout << "\t\t\t\t| NOME: " << clientecomp.Nome << endl; cout << "\t\t\t\t| ENDERECO: " << clientecomp.Endereco << endl; cout << "\t\t\t\t| TELEFONE: " << clientecomp.Telefone << endl; cout << "\t\t\t\t| CEP: " << clientecomp.Cep << endl; cout << "\t\t\t\t| CODIGO: " << clientecomp.codigo << endl; cout << "\t\t\t\t|____________________________________________________________" << endl; for (int i = 0; i < venda; i++) { int j = 0; j = mostrapedido[i]; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| PIZZA COMPRADA NO PEDIDO |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; teste[j].mostra3(); } for (int i = 0; i < venda1; i++) { int k = 0; k = mostrapedido2[i]; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| BEBIDA COMPRADA NO PEDIDO |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; bebc[k].mostrabebidas(); } cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| VALOR TOTAL E : " << tamanho12 << " REAIS" << endl; cout << "\t\t\t\t|____________________________________________________________" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| DIGITE [1] - PARA SIM |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| DIGITE [2] - PARA NÃO |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; aceitarnum(); cliente = numero; numero = 0; // SE O PEDIDO ESTIVER CORRETO, O MENU DE PAGAMENTO É EXIBIDO if (cliente == 1) { cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| PROSSIGA PARA O MENU DE PAGAMENTO |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; // O PEDIDO NÃO ESTÁ CORRETO } else { cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| INICIE NOVAMENTE O PEDIDO DO CLIENTE |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; system("pause"); system("cls"); return main(); } cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t| MENU DE PAGAMENTOS |" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| VALOR TOTAL DA COMPRA É : " << tamanho12 << " REAIS " << endl; cout << "\t\t\t\t|____________________________________________________________" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| PRESSIONE ENTER PARA CONTINUAR |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; getch(); // VARIAVEIS PARA O PAGAMENTO int tamanho13 = 0; tamanho13 = tamanho12; bool pagOk = false; int pag; int pag1 = 0; // LOOP DO PAGAMENTO while (!pagOk) { tamanho12 = tamanho12 - tamanho12 + tamanho13; system("cls"); cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t| MENU DE PAGAMENTOS |" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| DIGITE A FORMA DE PAGAMENTO |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| DIGITE [1] - PARA CARTAO |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| DIGITE [2] - PARA DINHEIRO |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; aceitarnum(); pag = numero; numero = 0; pagOk = pag == 1 || pag == 2; } // PAGAMENTO COM CARTÃO, SIMULA A UTILIZAÇÃO DE UMA MAQUINA DE CARTÕES FORA DO PROGRAMA if (pag == 1) { cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t| MENU DE PAGAMENTOS |" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl;cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| REALIZE O PAGAMENTO UTILIZANDO A MAQUINA DE CARTÕES |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\n\n"; system("pause"); system("cls"); return main(); // PAGAMENTO EM DINHEIRO } else if (pag == 2) { do { system("cls"); int pag12 = 0; pag1 = pag1 - pag1 + pag12;//zerar variavel tamanho12 = tamanho12 - tamanho12 + tamanho13;//zerar variavel cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t| MENU DE PAGAMENTOS |" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| DIGITE O VALOR DE PAGAMENTO |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; aceitarnum(); pag1 = numero; numero = 0; tamanho12 = pag1 - tamanho12; // VALOR INSERIDO MAIOR DO QUE O VALOR DA COMPRA if (tamanho12 > 0) { cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| O VALOR DO SEU TROCO E : " << tamanho12 << " REAIS" << endl; cout << "\t\t\t\t|____________________________________________________________ " << endl; // VALOR INSERIDO MENOR DO QUE O VALOR DA COMPRA }if (tamanho12 < 0) { cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| VALOR INSUFICIENTE PARA A PAGAR A COMPRA |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| POR FAVOR, DIGITE OUTRO VALOR |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; system("pause"); } } while (tamanho12 < 0); } // PAGAMENTO EXATAMENTE IGUAL AO VALOR DA COMPRA if (tamanho12 == 0); { cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| PAGAMENTO REALIZADO COM SUCESSO |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| VOLTE SEMRE !!!!! |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\n\n\n"; system("pause"); } } // TERCEIRA FUNÇÃO DO PROGRAMA while (numero == 3) { // EXIBIR CARDAPIOS system("cls"); cout << "\n\n\n\n"; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t| CARDAPIO DA PIZZARIA FAST |" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| CARDAPIO DE PIZZAS |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| PRESSIONE ENTER PARA VISUALIZAR |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; getch(); system("cls"); // CARDAPIO DE PIZZAS Dacasa.mostra2(); cout << "\n"; Marguerita.mostra2(); cout << "\n"; Baiana.mostra2(); cout << "\n"; Bauru.mostra2(); cout << "\n"; Calabresa.mostra2(); cout << "\n"; Frangocatupiry.mostra2(); cout << "\n"; Mussarela.mostra2(); cout << "\n"; Brocolis.mostra2(); cout << "\n"; Lombo.mostra2(); cout << "\n"; Escarola.mostra2(); cout << "\n"; Quatroqueijos.mostra2(); cout << "\n"; Portuguesa.mostra2(); cout << "\n"; system("pause"); system("cls"); // MENU DE ESCOLHA cout << "\n\n\n\n"; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t| CARDAPIO DA PIZZARIA FAST |" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| DIGITE [1] - PARA VER O CARDAPIO DE BEBIDAS |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| DIGITE [2] - PARA RETORNAR AO MENU DE PEDIDOS |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; int cardap = 0; aceitarnum(); cardap = numero; // VISUALIZAR CARDAPIO DAS BEBIDAS if (cardap == 1) { system("cls"); cout << "\n\n\n\n"; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t| CARDAPIO DA PIZZARIA FAST |" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| CARDAPIO DE BEBIDAS |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| PRESSIONE ENTER PARA VISUALIZAR |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl;getch(); system("cls"); // CARDAPIO DAS BEBIDAS CocaCola.mostrabebidas(); cout << "\n"; Fanta.mostrabebidas(); cout << "\n"; Fanta1.mostrabebidas(); cout << "\n"; Kuat.mostrabebidas(); cout << "\n"; CocaCola1.mostrabebidas(); cout << "\n"; CocaCola2.mostrabebidas(); cout << "\n"; Skol.mostrabebidas(); cout << "\n"; Brahma.mostrabebidas(); cout << "\n"; Heineken.mostrabebidas(); cout << "\n"; Imperio.mostrabebidas(); cout << "\n"; system("pause"); system("cls"); } else { system("cls"); return main(); } // RETORNO AO LOGIN PRINCIPAL int irpedido = 0; // LOOP PARA OPÇÃO CORRETA do { system("cls"); cout << "\n\n\n\n"; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t| CARDAPIO DA PIZZARIA FAST |" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| GOSTARIA DE REALIZAR SEU PEDIDO AGORA |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| DIGITE [1] - PARA SIM |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| DIGITE [2] - PARA NÃO |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; aceitarnum(); irpedido = numero; if (irpedido == 2) { system("cls"); return main(); } else { cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| PRESSIONE ENTER PARA CONTINUAR |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; getch(); } } while (irpedido < 1 || irpedido > 2); } // AREA GERENCIAL while (numero == 4) { do { // LOGIN GERENCIAL system("cls"); cout << "\n" << endl; cout << "\t\t\t\t ____________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|====================================================|" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t| FUNÇÃO COM ACESSO RESTRITO |" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|====================================================|" << endl; cout << "\t\t\t\t|____________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t| INSIRA O LOGIN PARA CONTINUAR |" << endl; cout << "\t\t\t\t|____________________________________________________|" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|DIGITE O NOME DO USUARIO : "; cin >> login1.username; cout << "\t\t\t\t|____________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|DIGITE A SENHA DE ACESSO : "; int i; fflush(stdin); for (i = 0; i < 3; i++) { senha1[i] = getch(); putchar('*'); login1.Passoword[i] = senha[i]; } getch(); cout << "\n\t\t\t\t|____________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << " \t\t\t\t|DIGITE A CODIGO DE ACESSO : "; cin >> login1.Codigol; cout << "\t\t\t\t|____________________________________________________|" << endl; cout << "\n\n \t\t\t\t"; system("pause"); if (!(strcmp(login1.username, loginAdm1) == 0) || (!strcmp(login1.Passoword, PassaAdm1) == 0) || !(codAdm1 == login1.Codigol)) { system("cls"); cout << "\n\n\n"; cout << "\t\t\t\t _____________________________________________________" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|=====================================================|" << endl; cout << "\t\t\t\t| **** USUÁRIO INVALIDO **** |" << endl; cout << "\t\t\t\t| -> PRESSIONE ENTER PARA RETORNAR AO LOGIN NOVAMENTE |" << endl; cout << "\t\t\t\t|_____________________________________________________|"; getch(); cin.clear(); cin.ignore(INT_MAX, '\n'); system("cls"); } else { } } while (!(strcmp(login1.username, loginAdm1) == 0) || (!strcmp(login1.Passoword, PassaAdm1) == 0) || !(codAdm1 == login1.Codigol)); while ((strcmp(login1.username, loginAdm1) == 0) && (strcmp(login1.Passoword, PassaAdm1) == 0) && (codAdm1 == login1.Codigol)) { cout << endl; system("cls"); cout << "\n\n\n"; cout << "\t\t\t\t _____________________________________________________" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|=====================================================|" << endl; cout << "\t\t\t\t| **** USUÁRIO CADASTRADO NO SISTEMA!! **** |" << endl; cout << "\t\t\t\t| -> PRESSIONE ENTER PARA ABRIR O MENU! |" << endl; cout << "\t\t\t\t|_____________________________________________________|" << endl; getch(); system("cls"); // FUNÇÕES DISPONIBILIZADAS APOS O LOGIN GERENCIAL do { system("cls"); cout << "\n\n\n\n"; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t| ÁREA GERENCIAL |" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t| ESCOLHA A OPCAO DESEJADA |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout<< "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| DIGITE [5] PARA - CADASTRAR FUNCIONARIOS |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| DIGITE [6] PARA - VISUALIZAR FUNCIONARIOS CADASTRADOS |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| DIGITE [7] PARA - CONSULTAR O ESTOQUE E ADICIONAR PRODUTOS |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| DIGITE [8] PARA - LISTAR CLIENTES CADASTRADOS |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; aceitarnum(); system("cls"); } while (numero < 5 || numero > 8); while (numero == 5) { // CADASTRO DE FUNCIONARIOS int qtd1; cout << "\n\n\n\n"; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t| MENU PARA CADASTRO DE FUNCIONARIOS |" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| QUANTOS FUNCIONARIOS VÃO SER CADASTRADOS : |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; aceitarnum(); qtd1 = numero; if (qtd1 == 0) { cout << "\n\nDIGITE UMA OPÇÃO VALIDA\n"; system("pause"); system("cls"); return main(); } funcionario* fn = new funcionario[qtd1]; cadastrafun(qtd1, fn); } while (numero == 6) { // VISUALIZAR FUNCIONARIOS CADASTRADOS cout << "\n\n\n\n"; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t| MENU PARA VISUALIZAR FUNCIONARIOS CADASTRADOS |" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| PRESSIONE ENTER PARA VISUALIZAR OS FUNCIONARIOS |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; getch(); system("cls"); mostrafun(); } // FUNÇÃO DE CONTROLE DE ESTOQUE while (numero == 7) { int escolhaest = 0; int escolhaest1 = 0; //LOOP PARA OPÇÃO CORRETA do { system("cls"); int produto; int estoquebeb = 0; // MENU ESTOQUE cout << "\n\n\n\n"; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t| MENU DO ESTOQUE |" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| DIGITE [1] - PARA VISUALIZAR OS PRODUTOS DO ESTOQUE |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| DIGITE [2]- PARA ADICIONAR PRODUTOS AO ESTOQUE |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; aceitarnum(); produto = numero; numero = 0; system("cls"); // VISUALIZAÇÃO DE ESTOQUE while (produto == 1) { cout << "\n\n\n\n"; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t| MENU DO ESTOQUE |" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| QUANTIDADE DE PRODUTOS NO ESTOQUE |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| PRODUTOS PARA A PRODUÇÃO DAS PIZZAS |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; cout << "\t\t\t\t| PRESSIONE ENTER PARA VISUALIZAR |" << endl; cout << "\t\t\t\t|____________________________________________________________|" << endl; getch(); // PRODUTOS PARA A PRODUÇÃO DAS PIZZAS system("cls"); MASSA.mostraest(); FARINHA.mostraest(), ACUCAR.mostraest(), FERMENTO.mostraest(), SAL.mostraest(), OLEO.mostraest(), MANTEIGA.mostraest(); MOLHODETOMATE.mostraest(), PRESUNTO.mostraest(), OVOS.mostraest(), TOMATE.mostraest(), CEBOLA.mostraest(), CATUPIRY.mostraest(), AZEITONAS.mostraest(); PARMESAO.mostraest(), MANJERICAO.mostraest(), CALABRESA.mostraest(), FRANGO.mostraest(), BROCOLIS.mostraest(), BACON.mostraest(), LOMBO.mostraest(); ALHOFRITO.mostraest(), ESCAROLA.mostraest(), PROVOLONE.mostraest(), PALMITO.mostraest(); cout << "\n\n"; system("pause"); system("cls"); cout << "\n\n\n\n"; cout << "\t\t\t\t ____________________________________________________________ " << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|" << endl; cout << "\t\t\t\t| MENU DO ESTOQUE |" << endl; cout << "\t\t\t\t| |" << endl; cout << "\t\t\t\t|============================================================|"
Compartilhar