jshen96 / ComcastCodeChallenge

code challenge for comcase

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Comcast code challenge

Prog that takes in a string and returns the sum of its digits according to set parameters

Getting Started

Download a copy into your local computer

Prerequisites

You need to have java installed

Building

Once java is installed, run : javac MyProg.java
this will build the MyProg class To run , java MyProg

Running the tests

To test compile the Testing class javac Testing.java
To run tests after compilation is successful,
java Testing the testing class has different methods to enable testing. Each method has comments that explain functionality

  • testProgSystemIn(String line, String input,String expOut,String name)
  • testProg(String line, String expRes, String testName)
  • testErr(String line, String expRes,String testName) To add custom test, please use these methods in the main function in the testing class

Arguments

  • -f file.txt --> takes in a file path after the parameter
  • -x --> sets the hex flag so that digits are evaluated in hex

Program will indicate if arguments are not set correctly / if there are any alien arguments

Built With

  • Java

Authors

  • Jie Shen Ong

About

code challenge for comcase


Languages

Language:Java 100.0%