Giter Site home page Giter Site logo

java-contact-management-starter-kit's Introduction

Introduction

This is a skeleton project structure which will help you start solving the problem right away.

Tools available to you.

  • Java 17
  • Apache Ant - A build tool to simplify the build process.
  • JUnit5 - Unittesting framework to help you write and run unittests.

Structure

  • src/main/java is where all your java source files should be written to. Already has a Main.java file that contains the driver code.
  • src/test/java is where all your unit test files should be written. Make sure all your test files end with Tests.java. Example: CartTests.java, OrderTests.java.
  • lib contains the jar files for the IDE to provide code suggestion capabilities on external dependecies. Like JUnit5.
  • build.xml is a build config file. You don't need to worry about this or edit this.

How to run unittests

  • We have already configured everything for you to get started with running and writing unittests rightaway.
  • Run the command ant test in the terminal to run unittests.
  • ant test will detect all test files inside src/test/java and build and run the tests.
  • All test files needs to end with Tests.java. Example: BooksTests.java, BooksRepoTests.java.

How to build your solution

  • Ant task have already been configured for you.
  • Run ant dist to generate the dist.jar file. This can be found inside dist/lib/ folder.

Checking for correctness

  • You can simply opt to do a Geektrust > Run Tests from the editor menu, which will run your solution against some preconfigured inputs and show you the output.
  • If you want to build & run the dist.jar file from the terminal to check against custom inputs see Running the dist.jar file section.

Running the dist.jar file

  • After building your solution as per How to build your solution you can now run the dist.jar against inputs.

  • To run, issue the command java -jar dist/lib/dist.jar '[cmd [options...]' 'cmd [options...]'...] where

    • cmd is a valid problem specific command.
    • options are optional cmd specific options.

    Example: java -jar dist/lib/dist.jar 'ADD APPLE 2' 'ADD ORANGE 3' 'SHOW'

    Note: Each full command should be wrapped in single quotes(').

Ant tasks available to you.

You can run these following commands on the terminal.

  • ant clean - will clean the older builds.
  • ant dist - will compile your code and build the dist.jar file inside dist/lib folder.
  • ant test - will build and run all your unittests. The test files are expected to reside inside src/test/java.

java-contact-management-starter-kit's People

Contributors

dhanush avatar linkwithjoydeep avatar dragonbuilder avatar

Watchers

 avatar  avatar

Forkers

geektrust

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.