You are currently browsing the tag archive for the ‘applet’ tag.
This applet program takes an Infix expression and converts it into an Post-fix expression.
Remember to give the Infix expression like this “a+b”, but not with the numbers like this “2+4″.
This applet program is much different from the previously posted applet programs.This applet program takes a string and gives the possible permutations with repetition of words and total number of permutations with repetition of words.
There are many ways to get permutation of a string with repetition of words, i have implemented it using the following algorithm :
//This is Countdown Quick-Perm Algorithm:
let a[] represent an arbitrary list of objects to permute
let N equal the length of a[]
create an integer array p[] of size N+1 to control the iteration
initialize p[0] to 0, p[1] to 1, p[2] to 2, ..., p[N] to N
initialize index variable i to 1
while (i < N) do {
decrement p[i] by 1
if i is odd, then let j = p[i] otherwise let j = 0
swap(a[j], a[i])
let i = 1
while (p[i] is equal to 0) do {
let p[i] = i
increment i by 1
} // end while (p[i] is equal to 0)
} // end while (i < N)
If you are not clear with the above description try it yourself, the program is below:
This applet program lets you to draw line,rectangle,rounded rectangle,eclipse with mouse.
The ‘ clear ‘ button, clears the previous drawn things.
We can do many things with applets, i am posting some of my works on it.
The below applet provides five colors with which you can write anything in desired color (it’s just same like the pencil tool in Microsoft paint).
This applet program can be modified in many ways to get desired things , i have just wrote the optimal code required for my expected output.

