This is a program in Java that will run an Array List with Integers and sort in proper order. There is 2 tests here, the First program "ARGS" is sorting the integers, the Second test is testing 5 different outcomes of arraylists of Integers. You have will 3 files to work with.
- First step is to clone the repo "git clone https://github.com/JOJO840/uppgift1/" in the terminal.
- You will see a package called "src" go in here and you will see 2 other packages.
- Enter the Sorter package, here is 2 files named SortMain and Sorter.
- Open up the SortMain file, in here you will have to enter the array arguments "args" in the configurations.
- Click Run > Edit configurations enter the selected arguments you wish. Press Apply.
- Run the SortMain file by pressing SHIFT + F10.
- The program will sort this numbers in proper order.
I have made a program that will run 5 tests of different arrays of ints. if the tests are running as they should, you will see a "OK" in the terminal. If it doesn´t work as should, then you will get an error "Expected array{1,2,3,4,5}" "You got {1,2,3,4}.
- Go into src package.
- Open SortTest package, here you will see SortTest Java File, double-click it.
- Onced uponed run the program with SHIFT + F10.
- The program will now run the 5 different tests.
- if every test is good, meaning expected results are the same as the result, you will get an "OK".