Skip to content

An almost ideal solution to the Snacks Vending Machine assignment provided by Freightos company.

Notifications You must be signed in to change notification settings

wasem-ibrahim/VendingMachine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

VendingMachine

An almost ideal solution to the Snacks Vending Machine assignment provided by Freightos company.

Setup the environemt:

  • First of all, you need to install dependinces using the following command: npm install

  • In case you have any problems with "TS" dependences, you might need to do the following to run the code. Tou first need to use npm install -D typescript then npm install -D ts-node

  • After that you can run the directly by navigating to the "src" file and running the "Main.ts" file as in the following commands: cd src/ then ts-node Main.ts

Alternative ways:

  • In case you are having any problems with the above commands, you might want to install "ts-node" globally on your machine using the following command: sudo npm i typescript ts-node -g

  • If you feel like compiling the TS files to JS files and taking a loot at them, then you can do that by running: tsc in the main directory which will create a new file called "JSFiles", in which you can navigate to using cd JSFiles/ then running the code using node Main.js

To run the test cases:

  • You just need to run the following script which is: npm test and all of the tests will run directly in the terminal

The UML diagram for the prject is in the following PDF file:

Vending_UML.pdf

Tests running correctly:

Screen Shot 2022-11-24 at 11 50 32 AM

Output of the Main file when given some static data

Screen Shot 2022-11-24 at 11 52 02 AM

About

An almost ideal solution to the Snacks Vending Machine assignment provided by Freightos company.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published