Coder Social home page Coder Social logo

furniture-ordering-system's Introduction

Furniture Ordering System

Order is a program which produces an order for a furniture based on the current inventory of furniture parts

Updated: November 2021

Introduction

Order is a program which incorporates an inventory of used furniture parts. When a client requests a furniture, the program searches through the inventory to see if there are any combinations of furniture parts that can be assembled to make a complete, sell-able furniture. If multiple combinations are possible to meet client requirements, the program will suggest the lowest costing combination.

If no possible combinations are found, the program will suggest the client to reach out to manufacturers.

Installation

Start by cloning the repository into your local machine.

The Order program can be run in any directory which has a Java machine installed.

If you are working in the src directory, use the following command below to run the program:

javac -cp .;mysql-connector-java-8.0.23.jar;. edu/Order.java

followed by :

java -cp .;mysql-connector-java-8.0.23.jar;. edu/Order 

You now need to import an SQL database into the program, you can do so using the following command in an MySQL command line client.

source C:\Users\-path to-\inventory.sql

The code will now ask the user for username and password. Enter the MySQL credentials on your computer and the program will ask for a furniture request. After a successful order is created, an output text file (orderform.txt) will be created in the same directory as src. The user can update the MySQL database at anytime to get the most updated inventory.

The program user should follow the following conventions:

When the program asks the user for the category and type input, keep the first letter in upper case and the following letters in lowercase.

For example: Chair, Mesh, Desk,

When the program asks for items requested, enter a real number such as 1,3 and so on. After the successful order is created, the user can decide to make another order or exit.

Unit Testing

We recommend you running the unit tests in an IDE, where you can choose which tests to run individually. To set up the unit test environment we recommend creating a new project folder and copy paste the .java files in the new folder.

After each test, the user must update the database in MySQL for example by re-uploading the source using "source C:\Users-path-to-\inventory.sql". Every single test performed assumes that the original database is present, therefore if multiple tests are run consecutively, it is not a good representation of the performance of the unit tests.

Assuming you are still working in the src directory, to check if the program works in the terminal, use the following commands:

javac edu/Order.java  

followed by:

javac -cp .;junit-4.13.2.jar;hamcrest-core-1.3.jar;system-rules-1.19.0.jar edu/OrderTest.java

followed by:

java -cp .;junit-4.13.2.jar;hamcrest-core-1.3.jar;system-rules-1.19.0.jar org.junit.runner.JUnitCore edu.OrderTest

furniture-ordering-system's People

Contributors

mountainbikeryyc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.