Santhosh-KrishnanM / Programs

0 stars 0 forks source link

Java Lab #1

Open Santhosh-KrishnanM opened 2 months ago

Santhosh-KrishnanM commented 2 months ago

Ex 1 and 2 Classes_and_objects_Batch1_1724495224773.docx Arrays_and_Strings_Batch1_1724495191265.docx

Santhosh-KrishnanM commented 2 months ago

Inheritance programs.docx Classes_and_objects_Batch2_docx_1724495241374.docx Arrays_and_Strings_Batch2_docx_1724495208569.docx

Santhosh-KrishnanM commented 1 month ago

Exer IV batch 2.docx

Santhosh-KrishnanM commented 4 weeks ago

Batch 2– Exercise V Object Class and Lambda Expression Ex-5

  1. Write a Java program to design class Employee (empId,name,designation,deparment,salary). Design methods for the following a. Override equals() method to check is there any duplicate employee object. b. Override toString method to display the output as [empId,name,designation,deparment,salary] c. Override hashCode() method to find the hashvalue of the object and use it for indexing the student object created. The index must be used to store the input into an array of object.

  2. Write the following methods that return a lambda expression for the following operations: a. Convert a list of strings to uppercase if the string length is even and to lowercase if the string length is odd b. Sort the strings based on their lengths in ascending order c. Remove duplicates from a list of String

Santhosh-KrishnanM commented 4 weeks ago

ex5.txt

Santhosh-KrishnanM commented 4 weeks ago

import javax.swing.; import java.awt.; //import java.awt.Event.*;

class Studentpersonaldet{ public static void main(String[] args){ JFrame f = new JFrame("Student Details"); f.setSize(400,180); f.setDefaultCloseOperation(f.EXIT_ON_CLOSE); JPanel p1,p2; p1 = new JPanel(); p1.setLayout(new GridLayout(4,2)); p1.setBorder(BorderFactory.createTitledBorder("Personal Details")); p1.add(new JLabel("Student Name: ")); p1.add(new JTextField(25)); p1.add(new JLabel("Date of Birth: ")); p1.add(new JTextField(15)); p1.add(new JLabel("Age: ")); p1.add(new JTextField(5)); p1.add(new JLabel("Gender: ")); JRadioButton jb1 = new JRadioButton(); jb1.addItem("Male"); jb1.addItem("Female"); p1.add(jb1); f.add(p1);

    p2 = new JPanel();
    p2.setLayout(new GridLayout(4,2));
    p2.setBorder(BorderFactory.createTitledBorder("Academic Details"));
    p2.add(new JLabel("Department: "));
    p2.add(new JTextField(10));
    p2.add(new JLabel("Year: "));
    JRadioBu
    JRadioButton jb2 = new JRadioButton();
    jb2.addItem("I");
    jb2.addItem("II");
    jb2.addItem("III");
    jb2.addItem("IV");
    p2.add(jb2);
    p2.add(new JTextField(5));
    p2.add(new JLabel("Semester: "));
    p2.add(new JTextField(5));
    p2.add(new JLabel("CGPA: "));
    p2.add(new JTextField(10));
    f.add(p2);

        JPanel p3 = new JPanel();
    p3.setLayout(new FlowLayout());
    p3.add(new JButton("Save"));
    p3.add(new JButton("Cancel"));
    f.add(p3);

    f.setLocationRelativeTo(null);
    f.setVisible(true);
    }

}

Santhosh-KrishnanM commented 4 weeks ago

import javax.swing.; import java.awt.; //import java.awt.Event.*;

class Studentpersonaldet{ public static void main(String[] args){ JFrame f = new JFrame("Student Details"); f.setSize(400,180); f.setDefaultCloseOperation(f.EXIT_ON_CLOSE); JPanel p1,p2; p1 = new JPanel(); p1.setLayout(new GridLayout(4,2)); p1.setBorder(BorderFactory.createTitledBorder("Personal Details")); p1.add(new JLabel("Student Name: ")); p1.add(new JTextField(25)); p1.add(new JLabel("Date of Birth: ")); p1.add(new JTextField(15)); p1.add(new JLabel("Age: ")); p1.add(new JTextField(5)); p1.add(new JLabel("Gender: ")); JRadioButton jb1 = new JRadioButton(); jb1.addItem("Male"); jb1.addItem("Female"); p1.add(jb1); f.add(p1);

    p2 = new JPanel();
    p2.setLayout(new GridLayout(4,2));
    p2.setBorder(BorderFactory.createTitledBorder("Academic Details"));
    p2.add(new JLabel("Department: "));
    p2.add(new JTextField(10));
    p2.add(new JLabel("Year: "));
    JRadioBu
    JRadioButton jb2 = new JRadioButton();
    jb2.addItem("I");
    jb2.addItem("II");
    jb2.addItem("III");
    jb2.addItem("IV");
    p2.add(jb2);
    p2.add(new JTextField(5));
    p2.add(new JLabel("Semester: "));
    p2.add(new JTextField(5));
    p2.add(new JLabel("CGPA: "));
    p2.add(new JTextField(10));
    f.add(p2);

        JPanel p3 = new JPanel();
    p3.setLayout(new FlowLayout());
    p3.add(new JButton("Save"));
    p3.add(new JButton("Cancel"));
    f.add(p3);

    f.setLocationRelativeTo(null);
    f.setVisible(true);
    }

}

Santhosh-KrishnanM commented 2 weeks ago

AICTE - SLA.pdf

Santhosh-KrishnanM commented 1 week ago

Exercise IX collection Batch 1 and 2.docx

Santhosh-KrishnanM commented 5 days ago

https://spoken-tutorial.org/participant/login/