Skip to main content

Posts

Candidate Elimination Algorithm in Kannada | VTU Machine Learning Lab Pr...

Recent posts

File Structure Lab Manual with Algorithms_Program3

Program 3. Write a program to read and write and student objects with variable-length records using any suitable record structure. Implement pack(), unpack(), modify() and search() methods. Algorithm: Step 1: Start Step 2: Enter the choice            1.Write 2. Display 3. Search 4. Modify 5.Exit            case 1: write() //Read the name, usn, age, sem, branch            case 2: unpack()                        display()            case 3: unpack()                        search()            case 4: unpack()                       search()                        modify() Step 3: Stop Algorithm...

File Structure Lab Manual with Algorithms_Program2

Prg2. Write a program to read and write and student objects with fixed-length records and the fields delimited by “|”. Implement pack(), unpack(),modify() and search() methods. Algorithm: Step 1: Start Step 2: Enter the choice            1.Write 2. Display 3. Search 4. Modify 5. Exit             case 1: write() //Read the name, usn, age, sem, branch             case 2: unpack()                         display()             case 3: unpack()                         search()             case 4: unpack()                         search()                         modify() Step 3: Stop Algori...

File Structure Lab Manual with Algorithms_Program1

Program 1. Write a program to read series of names, one per line, from standard input and  write these names spelled in reverse order to the standard output using I/O  redirection and pipes. Repeat the exercise using an input file specified by the user  instead of the standard input and using an output file specified by the user instead of  the standard output. _ Algorithm: Step 1: Start Step 2: Enter your choice 1. From standard I/O 2. From Files Step 3: Select the choice- 1: Using Standard file 2: Using Files             Case 1: [using standard I/O]                          Enter the number of names to be read                          Read the value of N                          a. Read one name at a time        ...

Write a program for congestion control using leaky bucket algorithm

import java.util.*; public class LBA {        public static void main(String[] args ) {              // TODO Auto-generated method stub              int op ;              Scanner s = new Scanner(System. in );              int bktcap =0;              int remain =0;              int pkt []= new int [10];              System. out .println( "Enter Bucket size" );              bktcap = s .nextInt();         ...

Write a program for simple RSA algorithm to encrypt and decrypt the data.

import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.InetAddress; import java.net.ServerSocket; import java.net.Socket; import java.util.*; public class RSA{        public static void main(String[] args) {              // TODO Auto-generated method stub              Scanner s=new Scanner(System.in);              RSA r=new RSA();              System.out.println("Enter value for p");              int p=s.nextInt();              System.out.println("Enter value for...