Skip to content

FaizArifUP/Java-Programs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Object Oriented Programming Lab

2nd Semester MCA (2022) Lab Program codes.


Course Level Assessment Questions

Course Outcome 1 (CO1):

  1. Define a class ‘product’ with data members pcode, pname and price. Create 3 objects of the class and find the product having the lowest price.
  2. Read 2 matrices from the console and perform matrix addition.
  3. Add complex numbers
  4. Read a matrix from the console and check whether it is symmetric or not.
  5. Create CPU with attribute price. Create inner class Processor (no. of cores, manufacturer) and static nested class RAM (memory, manufacturer). Create an object of CPU and print information of Processor and RAM.

Course Outcome 2 (CO2)

  1. Program to Sort strings
  2. Search an element in an array.
  3. Perform string manipulations
  4. Program to create a class for Employee having attributes eNo, eName eSalary. Read n employ information and Search for an employee given eNo, using the concept of Array of Objects.

Course Outcome 3(CO3):

  1. Area of different shapes using overloaded functions
  2. Create a class ‘Employee’ with data members Empid, Name, Salary, Address and constructors to initialize the data members. Create another class ‘Teacher’ that inherit the properties of class employee and contain its own data members department, Subjects taught and constructors to initialize these data members and also include display function to display all the data members. Use array of objects to display details of N teachers.
  3. Create a class ‘Person’ with data members Name, Gender, Address, Age and a constructor to initialize the data members and another class ‘Employee’ that inherits the properties of class Person and also contains its own data members like Empid, Company_name, Qualification, Salary and its own constructor. Create another class ‘Teacher’ that inherits the properties of class Employee and contains its own data members like Subject, Department Teacherid and also contain constructors and methods to display the data members. Use array of objects to display details of N teachers.
  4. Write a program has class Publisher, Book, Literature and Fiction. Read the information and print the details of books from either the category, using inheritance.
  5. Create classes Student and Sports. Create another class Result inherited from Student and Sports. Display the academic and sports score of a student.
  6. Create an interface having prototypes of functions area() and perimeter(). Create two classes Circle and Rectangle which implements the above interface. Create a menu driven program to find area and perimeter of objects.
  7. Prepare bill with the given format using calculate method from interface.

Course Outcome 4 (CO4):

  1. Create a Graphics package that has classes and interfaces for figures Rectangle, Triangle, Square and Circle. Test the package by finding the area of these figures.
  2. Create an Arithmetic package that has classes and interfaces for the 4 basic arithmetic operations. Test the package by implementing all operations on two given numbers
  3. Write a user defined exception class to authenticate the user name and password.
  4. Find the average of N positive integers, raising a user defined exception for each negative input.
  5. Define 2 classes; one for generating multiplication table of 5 and other for displaying first N prime numbers. Implement using threads. (Thread class)
  6. Define 2 classes; one for generating Fibonacci numbers and other for displaying even numbers in a given range. Implement using threads. (Runnable Interface)
  7. Producer/Consumer using ITC
  8. Program to create a generic stack and do the Push and Pop operations.
  9. Using generic method perform Bubble sort.
  10. Maintain a list of Strings using ArrayList from collection framework, perform built-in operations.
  11. Program to remove all the elements from a linked list
  12. Program to remove an object from the Stack when the position is passed as parameter
  13. Program to demonstrate the creation of queue object using the PriorityQueue class
  14. Program to demonstrate the addition and deletion of elements in deque
  15. Program to demonstrate the creation of Set object using the LinkedHashset class
  16. Write a Java program to compare two hash set
  17. Program to demonstrate the working of Map interface by adding, changing and removing elements.
  18. Program to Convert HashMap to TreeMap

Course Outcome 5 (CO5):

  1. Program to draw Circle, Rectangle, Line in Applet.
  2. Program to find maximum of three numbers using AWT.
  3. Find the percentage of marks obtained by a student in 5 subjects. Display a happy face if he secures above 50% or a sad face if otherwise.
  4. Using 2D graphics commands in an Applet, construct a house. On mouse click event, change the color of the door from blue to red.
  5. Implement a simple calculator using AWT components.
  6. Develop a program that has a Choice component which contains the names of shapes such as rectangle, triangle, square and circle. Draw the corresponding shapes for given parameters as per user’s choice.
  7. Develop a program to handle all mouse events and window events
  8. Develop a program to handle Key events.

Course Outcome 6 (CO6):

  1. Program to list the sub directories and files in a given directory and also search for a file name.
  2. Write a program to write to a file, then read from the file and display the contents on the console.
  3. Write a program to copy one file to another.
  4. Write a program that reads from a file having integers. Copy even numbers and odd numbers to separate files.
  5. Client server communication using Socket – TCP/IP
  6. Client Server communication using DatagramSocket - UDP

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages