Posts

Showing posts from April, 2017

Algorithm Simulation Application

Image
Hi Friends...... :) Today I'm going to share my 2nd year 1st semester project with you, an algorithm simulation Application. As we all know simulator is a substitution of something, which will do the same functionalities with less performance or with less features but won't omit the important functionalities. This algorithm simulator will handle 2 algorithms, Selection sort and Bubble sort. So let's start the game.  Algorithm Simulator is an application created for the users who are new to algorithm and sorting. When it comes to algorithm there are so many algorithms such as insertion, selection, bubble, heap, quick sort etc. In this application, selection sort and bubble sort have been demonstrated with the aid of animation, dry run and pseudo code. The user will get a basic yet clear idea of selection sort and bubble sort. 1. Selection Sort Selection sorting is conceptually the simplest sorting algorithm. This algorithm first finds the smallest element in the

JUnit Basic Testing

Image
Hi everyone !!! Today let's take a look at the very popular testing tool, JUnit. As the name suggests JUnit is a unit testing tool for Java. Without further a do let's jump into JUnit testing. Step 01 : Create a simple Java code in Eclipse. I have created a simple add and subtract method         inside Calculator class. This Calculator class lays inside Calculator package. Fig 1: Step 01 Step 02: Next create a JUnit test case by right clicking and selecting the JUnit test case under new option. Inside the test case implement method to assert (check) the expected outcome and the actual outcome of the methods which were implemented inside Calculator class. Fig 2: Step 02-a In CalculatorTest class I have created an object of Calculator class(the class which has the methods I'm going to test). Next I have implemented 2 methods to test the addNumbers and subtractNumbers methods in Calculator class. To make this as testing methods I have used @Test annotatio