Skip to content

Commit 7e341a5

Browse files
committed
doc: Improved README.md
1 parent e51f542 commit 7e341a5

File tree

6 files changed

+95
-25
lines changed

6 files changed

+95
-25
lines changed

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# jetbrain's ides
2+
.idea/
3+
4+
# vscode
5+
.vscode/
6+
17
# ignore ALL .csv, .bin, .cmake files
28
*.csv
39
*.bin

.vscode/settings.json

-8
This file was deleted.

README.md

+65-8
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
# Blockbuster
2-
This repository contains the source code of the Data Management Program for a Fictional Movie Rental Company, developed by:
2+
3+
This repository contains the source code of the data management terminal program of a fictional movie rental company, for the theory final project of the Programming II course of the Computer Science career at the Rafael Urdaneta University, located in Maracaibo, Venezuela.
34

45
## Developers
5-
Ramón Álvarez <a href="https://github.com/ralvarezdev">(ralvarezdev)</a>.
66

7-
Roberto Belmonte <a href="https://github.com/rb6422">(rb6422)</a>.
7+
- [ralvarezdev](https://github.com/ralvarezdev) - Ramón Álvarez
8+
- [rb6422](https://github.com/rb6422) - Roberto Belmonte
89

910
## Programming Languages
10-
Only C++.
11+
12+
- C++
1113

1214
## Installation
1315

1416
<ol>
1517
<li>Clone this repository to your local machine using the following command:
1618

17-
```git clone https://github.com/ralvarezdev/ProyectoTeoria_RR```
19+
```git clone https://github.com/ralvarezdev/uru-blockbuster```
1820
</li>
1921

20-
<li>Change your Current Working Directory to where the Repository was Cloned</li>
22+
<li>Change your Current Working Directory to where the repository was cloned</li>
2123

22-
<li>There are Two Ways to Compile the Program: </li>
24+
<li>There are two ways to compile the program: </li>
2325

2426
<ol>
25-
<li>With <strong>G++</strong> (You must have Installed <strong>MinGW Compiler</strong>). Use the following command:
27+
<li>With <strong>G++</strong> (you must have installed <strong>MinGW Compiler</strong>). Use the following command:
2628

2729
<details>
2830
<summary>Command for Windows</summary>
@@ -38,6 +40,61 @@ Only C++.
3840

3941
</details></li>
4042

43+
<li>With <strong>CMake</strong> (you must have installed <strong>CMake and Make</strong>). First, get to the <code>bin</code> folder inside the repository. Use the following command
44+
45+
<details>
46+
<summary>Command for Windows</summary>
47+
48+
```cmake -S ..\ -G "MinGW Makefiles" -B .\ && make```
49+
50+
</details>
51+
52+
<details>
53+
<summary>Command for Linux</summary>
54+
55+
```cmake -S ../ -G "MinGW Makefiles" -B ./ && make```
56+
57+
</details></li></ol>
58+
59+
<li>Run the program by clicking the <code>Blockbuster.exe</code>.</li></ol>
60+
61+
<strong>For a better User Experience, resize the terminal window to fullscreen mode</strong>
62+
63+
# Main Menu
64+
![Screenshot (942)](https://github.com/ralvarezdev/ProyectoTeoria_RR/assets/86166683/c6752013-1ccf-4bbd-9f6a-8292a630d209)
65+
66+
# Commands
67+
This is the full list of commands for each action in the program
68+
69+
# Parameters
70+
71+
![Screenshot (910)](https://github.com/ralvarezdev/ProyectoTeoria_RR/assets/86166683/d54ff36b-f7db-4977-abef-120e37a2ea70)
72+
73+
![Screenshot (911)](https://github.com/ralvarezdev/ProyectoTeoria_RR/assets/86166683/8fbf9b9c-f8ae-4be5-8da8-fa682cbbf92a)
74+
75+
![Screenshot (912)](https://github.com/ralvarezdev/ProyectoTeoria_RR/assets/86166683/a8070b60-02d7-4e09-988d-e5b54e1107f7)
76+
77+
![Screenshot (913)](https://github.com/ralvarezdev/ProyectoTeoria_RR/assets/86166683/ba759acc-8707-46b7-8d7d-25ea724913c9)
78+
79+
# View Movies Command Examples
80+
![Screenshot (905)](https://github.com/ralvarezdev/ProyectoTeoria_RR/assets/86166683/ffdd1479-94dc-4fd3-b8fd-6802297285a7)
81+
82+
# Filter Movies Command Examples
83+
![Screenshot (906)](https://github.com/ralvarezdev/ProyectoTeoria_RR/assets/86166683/942685c6-b9dd-4413-918b-9ae6a854439f)
84+
85+
# View Clients Command Examples
86+
![Screenshot (907)](https://github.com/ralvarezdev/ProyectoTeoria_RR/assets/86166683/b8018392-28f1-405c-a670-6a4329a07d76)
87+
88+
# Search Clients Command Examples
89+
![Screenshot (908)](https://github.com/ralvarezdev/ProyectoTeoria_RR/assets/86166683/b053d443-5842-44ba-9a88-7fd79a916174)
90+
91+
<details>
92+
<summary>Command for Linux</summary>
93+
94+
```g++ -o bin/Blockbuster.exe src/main.cpp src/lib/namespaces.h src/lib/clients/clientsOp.h src/lib/clients/clientsOp.cpp src/lib/data/dataOp.h src/lib/data/dataOp.cpp src/lib/datatables/output.h src/lib/datatables/output.cpp src/lib/movies/moviesOp.h src/lib/moviesOp.cpp src/lib/terminal/ansiEsc.h src/lib/terminal/ansiEsc.cpp src/lib/terminal/input.cpp src/lib/terminal/input.h```
95+
96+
</details></li>
97+
4198
<li>With <strong>CMake</strong> (You must have Installed <strong>CMake and Make</strong>). First, Get to the <code>bin</code> Folder inside the Repository. Use the following command
4299

43100
<details>

bin/Blockbuster.exe

2.34 KB
Binary file not shown.

src/lib/terminal/input.cpp

+23-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include <iostream>
22
#include <iomanip>
3+
#include <stdexcept>
34
#include <sstream>
45

56
// #define NDEBUG
@@ -178,10 +179,10 @@ void wrongClientData(invalidClient wrongData)
178179
// Function to Stop the Program Flow while the User doesn't press the ENTER key
179180
void pressEnterToCont(string message, bool warning)
180181
{
181-
string temp;
182+
string _temp;
182183

183184
printTitle(message, applyBgColor, applyFgColor, warning);
184-
getline(cin, temp);
185+
getline(cin, _temp);
185186
// ignoreInput();
186187
}
187188

@@ -198,10 +199,17 @@ int getInteger(string message, int low, int high)
198199
getline(cin, temp);
199200
amount = stoi(temp);
200201

201-
if (amount > low && amount <= high)
202-
return amount;
202+
// Check if the Number is Out of Range
203+
if (amount < low || amount > high)
204+
throw out_of_range("Amount Out of Range");
205+
206+
return amount;
207+
}
208+
catch (const invalid_argument &e)
209+
{
210+
pressEnterToCont("ERROR: Invalid Argument. It Must be an Integer", true);
203211
}
204-
catch (...)
212+
catch (const out_of_range &e)
205213
{
206214
ostringstream stream;
207215

@@ -225,10 +233,17 @@ double getDouble(string message, double low, double high, int precision)
225233
getline(cin, temp);
226234
amount = stod(temp);
227235

228-
if (amount > low && amount <= high)
229-
return amount;
236+
// Check if the Number is Out of Range
237+
if (amount < low || amount > high)
238+
throw out_of_range("Amount Out of Range");
239+
240+
return amount;
241+
}
242+
catch (const invalid_argument &e)
243+
{
244+
pressEnterToCont("ERROR: Invalid Argument. It Must be a Double", true);
230245
}
231-
catch (...)
246+
catch (const out_of_range &e)
232247
{
233248
ostringstream stream;
234249

src/main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ void changeCwdToData()
573573
}
574574
catch (...)
575575
{
576-
pressEnterToCont("Error: main.cpp File is not Inside 'lib' Folder", true);
576+
pressEnterToCont("Error: main.cpp File is not Inside 'src' Folder", true);
577577
}
578578
}
579579

0 commit comments

Comments
 (0)