-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e43329a
commit 2f68337
Showing
1 changed file
with
19 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,42 @@ | ||
# OBJECT ORIENTED PROGRAMMING USING JAVA (S3) | ||
# Questions | ||
# Questions in order of the repository file | ||
|
||
1. 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 class- | ||
es contains only the method numberOfSides( ) that shows the number of sides in the giv- | ||
en geometrical structures. | ||
|
||
2. Write a Java program that implements the binary search algorithm. | ||
|
||
3. 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. | ||
4. Sample program to create an object of the class. | ||
5. Write a Java program for the following: | ||
|
||
7. Sample program to create an object of the class. | ||
8. Write a Java program for the following: | ||
(i) Create a doubly linked list of elements. | ||
(ii) Delete a given element from the above list. | ||
(iii) Display the contents of the list after deletion. | ||
6. Write a Java program that shows the usage of try, catch, throws and finally. | ||
7. Write a Java Program to find the frequency of a given character in a string (without user input). | ||
8. Write a Java Program to find the frequency of a given character in a string (with user input). | ||
9. Write a Java program which creates a class named 'Employee' having the following | ||
9. Write a Java program that shows the usage of try, catch, throws and finally. | ||
10. Write a Java Program to find the frequency of a given character in a string (without user input). | ||
11. Write a Java Program to find the frequency of a given character in a string (with user input). | ||
12. 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 'print- | ||
Salary( )' which prints the salary of the Employee. Two classes 'Officer' and 'Manager' | ||
inherits the 'Employee' class. The 'Officer' and 'Manager' classes have data members 'spe- | ||
cialization' 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. | ||
10. Write a Java program to multiply two given matrices. | ||
11. Sample program to show method overriding. | ||
12. Write a Java program that checks whether a given string is a palindrome or not (without user input). | ||
13. Write a Java program that checks whether a given string is a palindrome or not (with user input). | ||
14. Write a Java program that checks whether a given string is a palindrome or not ( for numbers ). | ||
15. Sample program to concatenate two strings. | ||
16. A sample java program to calculate sum and average of numbers. | ||
17. Write a Java program that shows thread synchronization. | ||
18. Write a Java program that simulates a traffic light. The program lets the user select one of | ||
13. Write a Java program to multiply two given matrices. | ||
14. Sample program to show method overriding. | ||
15. Write a Java program that checks whether a given string is a palindrome or not (without user input). | ||
16. Write a Java program that checks whether a given string is a palindrome or not (with user input). | ||
17. Write a Java program that checks whether a given string is a palindrome or not ( for numbers ). | ||
18. Sample program to concatenate two strings. | ||
19. A sample java program to calculate sum and average of numbers. | ||
20. Write a Java program that shows thread synchronization. | ||
21. 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. | ||
19. A sample program to show try and catch. | ||
22. A sample program to show try and catch. |