gabrieldarezzo / aceite-online

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Box-Dados

O que é?

Um sistema desenvolvido na linguagem C.
Possibilitando o operador:

  • Listar / Cadastrar / Atualizar / Excluir => Funcionario (Pode ser Gerente ou não)
  • Listar / Cadastrar / Atualizar / Excluir => Clientes
  • (ToDo) Relatorio: Listar custo mensal da empresa

Conceitos abordados:

  • Conditional / Loop
  • Functions
  • Structs
  • References
  • Correção de acentuação no Windows (setLocale is Sux!)
  • I/O Files Persistir em (.csv)

Copilar e Executar (local) ?!

Execute o comando

gcc -o binary worker.c && binary

Copilar e Executar no Windows via terminal ?!

Execute o comando

gcc -o dist/box-dados.exe worker.c
dist\box-dados.exe

Executar modo Windows?

Baixe o arquivo executável:
https://github.com/gabrieldarezzo/aceite-online/blob/main/dist/aceite-online.exe

Abrir
E clique 2x no arquivo box-dados.exe

Acentuação do DevC++

Problemas com acentuação ao Run/Compile via 'DevC++' ?

Na função main altere:

De:

system("chcp 65001");
// setlocale(LC_ALL, "Portuguese");

Para:

// system("chcp 65001");
setlocale(LC_ALL, "Portuguese");

Fluxograma

Fluxograma Geral
Fluxograma Menus

GoogleDrive:

https://app.diagrams.net/#G1qRgqKxPBZyYuL1YDv5Tw2RoON5Od_gRE

Static-File:

Ou uma versão estatica: docs/fluxo_drawio.xml

Planilha de dados (storage/persons.csv)

https://docs.google.com/spreadsheets/d/1eMlOSFpCK09SJYl4bYadGosuIpcc6fSVmUAPV1VW3GI/edit?usp=sharing

Planilha de Dados (persons.csv)

Estrutura principal:

struct Person
---------------------------------------------
int id;
char name[250];
char cpf[14];
int person_type;
char gender[1];
float salary;
int is_deleted;

Dicas:

In VSCode:
Utilizar Doxygen (Extensão para criar docBlock, Ex:)

/**
 * @brief Pass a cpf as a string to delete them from struct Person (Global Person)
 * 
 * @global persons
 * @param cpfPersonToDelete 
 * @return struct Person 
 */
struct Person deletePerson(char *cpfPersonToDelete) {
    struct Person personTemp;
    ...
    ...
    return personTemp;
}

Generate .exe inside of Linux/Mac

x86_64-w64-mingw32-g++ -o dist/box-dados.exe exercicios/menu_simple.c

Topicos para estudar:

Graphs:

gcc graph.c pbPlots.c supportLib.c -lm
./a.out
open graph.png

More examples: https://github.com/InductiveComputerScience/pbPlots/tree/master/C

About


Languages

Language:C 100.0%