This is a database Project Management System (PMS) for a hypothetical company called 'Poised', which keeps track of the projects they work on. The program uses Java and MySQL to connect to a database called 'PoisePMS', and to read, write, update and delete data about projects and people associated with projects in the database.
The 'PoisePMS' database was designed with MySQL and contains the following 5 tables:
- Projects Table
- Architects Table
- Contractors Table
- Customers Table
- Managers Table To view the database and tables Entity Relationship Diagram (ERD), see the L3T7_ERD.pdf file.
The program contains 7 Classes with the following methods and functionality:
-
Main Class:
- reads, writes, updates and deletes data about projects and people in the database.
- getUserAction() method: prints an action menu for the user and returns the user's selection.
- main() method: calls getUserAction() method to get user's choice of action to take, then calls the related class' methods depending on the action selected.
-
Projects Class:
- reads, writes, updates and deletes data about projects and people in the database.
- constructor method for projects instances.
- assignProjectName() method: assigns a project name as (Building Type) + (Customer Surname) when the name is unknown.
- addNewProject() method: retrieves all the information required to create and add a new project to the database.
- updateProject() method: allows the user to update fields in any of the existing projects.
- deleteProject() method: deletes a project and its associated people if all people assigned to the project are not assigned to any other projects. If it's people are assigned elsewhere, only the project's data is deleted.
- finalizeProject() method: finalizes a project.
- getIncompleteProjects() method: finds and prints all incomplete projects.
- getOverdueProjects() method: finds and prints all overdue projects.
- getProjectByNameOrNumber() method: finds a project by getting either the project name or the project number from the user, and prints the project's full details.
-
PrintProjects Class:
- reads and prints data about projects and associated people in the database.
- getCurrentProjectConcise() method: gets the main details for the project being searched and prints a concise list of the project's details.
- getCurrentProjectFull() method: This method gets all details for the project being searched and prints a full list of the project's details.
- getAllProjectsConcise() method: gets the main details for all projects in the database and prints a concise list of all projects' details.
- getAllProjectsFull() method: gets all details for all projects in the database and prints a full list of all projects' details.
-
Architects Class:
- reads and prints data about the architects in the database.
- constructor method for architects instances.
- getArchitectsList() method: gets and prints all details for all architects in the database.
- chooseArchitect() method: gets the user's selection of an architect in the database.
-
Contractors Class:
- reads and prints data about the contractors in the database.
- contractor method for contractors instances.
- getContractorsList() method: gets and prints all details for all contractors in the database.
- chooseContractor() method: gets the user's selection of a contractor in the database.
-
Managers Class:
- reads and prints data about the project managers in the database.
- contractor method for project managers instances.
- getManagersList() method: gets and prints all details for all project managers in the database.
- chooseManager() method: gets the user's selection of a project manager in the database.
-
Customers Class:
- reads, writes and prints data about the customers in the database.
- contractor method for customers instances.
- getCustomersList() method: gets and prints all details for all customers in the database.
- chooseCustomer() method: gets the user's selection of a customer in the database.
- addCustomer() method: gets user input for customer details and adds a new customer to the database.
To view the methods called from the main class, you can view the JavaDocs API documentation, or you can navigate to each class/file in the src folder.
- You need to set up your own MySQL server and database for this project. See dev.mysql.com for instructions on how to do this.
- To recreate the database that I used, you can use the L3T7-SQL-Code.txt file as a guide, or the L3T7_ERD.pdf file for this project's ERD.
- This program is run using the JDBC. To set up the environment for running this program:
- Download and install the JDK. You can download it from here.
- Download and install the MySQL JDBC driver to access the MySQL database. You can download it from here.
- Optional: use an IDE of your choice to run the program (e.g. IntelliJ IDEA).
- Start your MySQL server.
- Clone the repo and open with your preferred IDE (e.g. IntelliJ IDEA).
- Navigate to the Main class and run the main() method. This will print a selection of actions you can take to search, update, add or delete projects and their associated people.
Made by Nichole Dobbin, for my HyperionDev course. Please see L3T7_References.txt for the list of references I used in this task.