Skip to content

S3-OOPS-Lab-Programs (KTU 2019 SCHEME): A repository containing Object-Oriented Programming (OOPS) lab programs for Semester 3 under the KTU syllabus. The programs are written in Java, covering fundamental OOPS concepts like classes, inheritance, polymorphism, and more

Notifications You must be signed in to change notification settings

mathewjosephta/KTU-S3-OOPS-LAB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

S3-OOPS Lab Programs (KTU 2019 SCHEME)

This repository contains the Object-Oriented Programming (OOPS) lab programs for Semester 3, as per the KTU syllabus(2019 scheme). The programs are implemented in Java and cover various fundamental OOPS concepts.

About

The programs in this repository demonstrate core OOPS concepts, including:

  • Classes and Objects
  • Inheritance
  • Polymorphism
  • Abstract Classes
  • Exception Handling
  • File Handling etc.

Program List

  1. Program 1: Write a Java program that checks whether a given string is a palindrome or not. Ex: MALAYALAM is palindrome. Click Here

  2. Program 2: Write a Java Program to find the frequency of a given character in a string.Click Here

  3. Program 3: Write a Java program to multiply two given matrices.Click Here

  4. Program 4: Write a Java program which creates a class named 'Employee' having the following members: Name, Age, Phone number, Address, Salary. It also has a method named 'printSalary( )' which prints the salary of the Employee. Two classes 'Officer' and 'Manager' inherits the 'Employee' class. The 'Officer' and 'Manager' classes have data members 'specialization' and 'department' respectively. Now, assign name, age, phone number, address and salary to an officer and a manager by making an object of both of these classes and print the same. (Exercise to understand inheritance).Click Here

  5. Program 5: Write a java program to create an abstract class named Shape that contains an empty method named numberOfSides( ). Provide three classes named Rectangle, Triangle and Hexagon such that each one of the classes extends the class Shape. Each one of the classes contains only the method numberOfSides( ) that shows the number of sides in the given geometrical structures. (Exercise to understand polymorphism).Click Here

  6. Program 6: Write a Java program to demonstrate the use of garbage collector.Click Here

  7. Program 7: Write a file handling program in Java with reader/writer.Click Here

  8. Program 8: Write a Java program that read from a file and write to file by handling all file related exceptions.Click Here

  9. Program 9: Write a Java program that reads a line of integers, and then displays each integer, and the sum of all the integers (Use String Tokenizer class of java.util).Click Here

  10. Program 10: Write a Java program that shows the usage of try, catch, throws and finally.Click Here

  11. Program 11: Write a Java program that implements a multi-threaded program which has three threads. First thread generates a random integer every 1 second. If the value is even, second thread computes the square of the number and prints. If the value is odd the third thread will print the value of cube of the number.Click Here

  12. Program 12: Write a Java program that shows thread synchronization.Click Here

  13. Program 13: Write a Java program that works as a simple calculator. Arrange Buttons for digits and the + - * % operations properly. Add a text field to display the result. Handle any possible exceptions like divide by zero. Use Java Swing.

  14. Program 14: Write a Java program that simulates a traffic light. The program lets the user select one of three lights: red, yellow, or green. When a radio button is selected, the light is turned on, and only one light can be on at a time. No light is on when the program starts.

  15. Program 15: Write a Java program to display all records from a table using Java Database Connectivity (JDBC).

  16. Program 16 : Write a Java program for the following: ** 1) Create a doubly linked list of elements. 2) Delete a given element from the above list. 3) Display the contents of the list after deletion.

  17. Program 17 :Write a Java program that implements Quick sort algorithm for sorting a list of names in ascending order.

  18. Program 18 : Write a Java program that implements the binary search algorithm.

How to Use

  1. Clone the repository:
    git clone https://github.com/mathewjosephta/KTU-S3-OOPS-LAB.git
  2. Navigate to the folder containing the desired program and run it using:
    javac [ProgramName].java
    java [ProgramName]

This repository serves as a collection of my OOPS lab programs for future reference.

About

S3-OOPS-Lab-Programs (KTU 2019 SCHEME): A repository containing Object-Oriented Programming (OOPS) lab programs for Semester 3 under the KTU syllabus. The programs are written in Java, covering fundamental OOPS concepts like classes, inheritance, polymorphism, and more

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages