AIM To write a program to find the rational form of rational number.
ALGORITHM
1. Start the program. 2. Declare the class name as rational and assign num, den as two parameters. 3. Declare constructor as rational and numerator and denominator as parameter. 4. Then write to string () method to print the rational class object as a string. 5. To get the GCD value using static method use GCD (int m, int n) method. 6. Get the num and den from the user by using string[]. 7. The error by using try, catch blocks. 8. Stop the program.
DATE CLASS IN JAVA
AIM To develop a date class in java similar to the one in java.util.package using java doc commands.
ALGORITHM 1. Start the program 2. Define a class myDate that inherits the Date class from java.util.package. 3. Declare the variables required to store the information regarding data and time. 4. Override the methods to access the date and time properties of the system. 5. Use to string() method to efficiently display the class in string representation. 6. Use java doc commands to create documentation of the program. 7. Stop the program.
IMPLEMENTATION OF LISP-LIKE LIST
AIM To write a java program to execute LISP-LIKE LIST in java.
ALGORITHM 1. Start the program. 2. Create a class to implement the LISP-LIKE LIST and its operation. 3. Get an array of input from the user and store it in the zeroth index of LISP-LIKE LIST, Next data in first index and so on. 4. When the index is given by the user as input display the address in which the indexed data are stored. 5. On users request for the given index display all the data stored array format. 6. Stop the program.
JAVA INTERFACE FOR ADT STACK
AIM To write a java program to design a java interface for ADT stack.
ALGORITHM
Array List Class 1. Start the program. 2. Declare the class named ArrayList Example and create an object named arrlist. 3.