This project was developed for the discipline Software Quality at CEFET MG.
Professor: Kecia Aline Marques Ferreira
Student: Matheus Thiago de Souza Ferreira
The project was developed with the intention of applying software patterns learned in the classroom.
The Software Specification (in pt-BR), can be found at: Docs/SoftwareSpecification.pdf
The Class Diagram (in pt-BR), can be found at: Docs/ClassDiagram.pdf
The system uses prompt, for a simple implementation.
The project is divided into components, each one its controller and objects, separated into folders with their respective files. The orginize of files and folders, is part of the idea of Software Patterns.
The Items
represent the objects drawn on the system, in its folder, there is the Objects\Item.java
, the Item abstraction, and the Controllers\ItemController.java
, which is responsible for managing all the Items and persisting them to the DataBase.
The Response.java
is an enumerative class, which is responsible for issuing responses and communicating with all components of the system. It helps to standardize and better understand the service status of each component.
The Rules
represent the conditions applied to a draw, in its folder, there is the Objects\RuleObjects.java
, the Rule abstraction, and the Controllers\RuleController.java
, which is responsible for managing all the Rules and persisting them to the DataBase.
The Sweepstakes
represent the draws performed in the system, in its folder, there is the Objects\Sweepstake.java
, the abstraction of the draw, and the Controllers\SweepstakeController.java
, which is responsible for managing all the draws and persisting them in the DataBase.
Users contains all the user types on the system, Common
and Manager
, and the generalized User
.
The Objects\User.java
is the generalized abstraction of User, and the Controllers\UserController.java
is responsible for managing authentication and session for all user types.
The Objects\Common.java
is the standard user abstraction, and the Controllers\CommonController.java
is responsible for managing the operations performed for standard users.
The Objects\Manager.java
is the abstraction of the administrator user, and the Controllers\ManagerController.java
is responsible for managing the operations performed for the administrator users.
The Index.java
is responsible for starting the system.
The SMS.java
is responsible for starting all the controllers and showing the system prompts.
The Database\Database.java
is a test facilitator, it instantiates the users
and rules
list, with some default data. There is no real database implemented.
Default User List:
Manager:
Name: Administrador
User: admin
Password: admin
Name: Administrador 2
User: admin2
Password: admin2
Common:
Name: comum
User: comum
Password: comum
Name: comum 2
User: comum2
Password: comum2
Default Rules List:
Name: Idade
Description: O participante deve ser maior de idade
Name: Localidade
Description: O participante deve residir no Brasil
Java was selected for its familiarity to students.
Step 1: Navigate to the /Project folder
javac Index.java
java Index
At the Sign-up prompt, if you want create a manager user, the hash code is ADMIN
, for common user, you can type any word in the hash.
At the Login prompt, you must use the registered credentials. The system will recognize the correct user type and redirect you to the panel.