Write a Java program that Implements stack ADT.
//Program to implement Stacks import java.util.*; import java.io.*; class Stack1 { int t; int a[]=new int[5]; Stack1() { t=-1; } boolean isempty() { return (t==-1); } boolean isfull() …
//Program to implement Stacks import java.util.*; import java.io.*; class Stack1 { int t; int a[]=new int[5]; Stack1() { t=-1; } boolean isempty() { return (t==-1); } boolean isfull() …
//Program to count number of lines,characters,and words in a text file import java.util.*; import java.io.*; class Cfile { public static void main(String args[])throws IOException { int nl=1,nw=0; char ch; Scanner scr=new Scanner(System.in); …
//Program to print the contents of the file along with line number import java.util.*; import java.io.*; class Rfile { public static void main(String args[])throws IOException { int j=1; char ch; Scanner scr=new Scanner(System.in);…
//Program to read a file and display its properties import java.io.*; import java.util.*; import javax.swing.*; class Fileproperties { public static void main(String args[])throws IOException { Scanner scr=new Scanner(System.in); System.out.print(“nEnter any file name: “); String str=scr.nextLine();…
//Program to print the read numbers and find sum import java.util.*; class Sumtoken { public static void main(String args[]) { Scanner scr=new Scanner(System.in); System.out.println(“nEnter sequence of integers with space b/w them and press enter : “); …
//Program to find matrix multiplication import java.util.*; class Matrixmul { public static void main(String args[]) { Scanner scr=new Scanner(System.in); int m,n,p,q; System.out.println(“nEnter the order of the Matrix A: “); m=scr.nextInt(); n=scr.nextInt(); int…
//Program to print prime numbers upto given integer import java.util.*; class Prime { public static void main(String args[]) { int n,f; Scanner scr=new Scanner(System.in); System.out.println(“nEnter n value: “); n=scr.nextInt(); System.out.println(“nPrimenumbers are : “);…
//Program to print nth value in the fibonacci series import java.util.*; class Function { void nrcf(int a,int b,int c,int n) { for(int i=1;i<=n-2;i++) { c=a+b; a=b; b=c; } a=b=1; System.out.println(“nth…
//Program to find roots of a quadratic equations import java.util.*; class Roots { public static void main(String args[]) { int a,b,c,d,f=0; Scanner scr=new Scanner(System.in); System.out.println(“nEnter the values of a ,b ,c : “); a=scr.nextInt();…
Motion capture is defined as “The creation of a 3D representation of a live performance.” The use of motion capture to animate characters on computers is relatively recent, it started in the 1970s, and now just beginning to spread.Motion capture…