0% found this document useful (0 votes)
55 views5 pages

Important Questions

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views5 pages

Important Questions

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

Batch- I

1. Write an application in Java that prompts the user for the radius of a circle and uses a
method called circleArea to calculate the area of the circle and uses a method
circlePerimeter to calculate the perimeter of the circle.

2. Write an application in Java to create a super class Employee with information first
name & last name and methods getFirstName(), getLastName() derive the sub-
classes ContractEmployee and RegularEmployee with the information about
department, designation & method displayFullName() , getDepartment(), getDesig() to
print the salary and to set department name & designation of the corresponding sub-
class objects respectively.

3. Write an application in Java to create a super class Vehicle with information vehicle
number,insurance number,color and methods getConsumption()
displayConsumption(). Derive the sub-classes TwoWheeler and FourWheeler with
method maintenance() and average() to print the maintenance and average of vehicle.

4. Using Java create an abstract class Shape which calculate the area and volume of 2-d
and 3-d shapes with methods getArea() and getVolume(). Reuse this class to
calculate the area and volume of square ,circle ,cube and sphere.

5. In Java, create an abstract class Employee with methods getAmount() which displays
the amount paid to employee. Reuse this class to calculate the amount to be paid to
WeeklyEmployeed and HourlyEmployee according to no. of hours and total hours for
HourlyEmployee and no. of weeks and total weeks for WeeklyEmployee.
6. Create an Interface Vehicle with method getColor(),getNumber(), getConsumption()
calculate the fuel consumed, name and color for TwoWheeler and Four Wheeler By
implementing interface Vehicle.

7. Create an Interface StudentFee with method


getAmount(),getFirstName(),getLastName(), getAddress(), getContact(). Calculate the
amount paid by the Hostler and NonHostler student by implementing interface Student
Fee.

8. Write a Java program to create package called dept. Create four classes as CSE,
ECE, ME and CE add methods in each class which can display subject names of your
respect year. access this package classes from main class.

9. Create a class First (With display()), Second (With show()) in one package (myp),
create a class Third (With show()) in second package (mys). Create a class Test
(main()) & call all the methods in different classes.

10. Write a Java program to implement i) Null pointer exception, ii) String Index Out Of
Bounds Exception iii) FileNotFound and iv) InputMismatch Exception.

11. Create a class to handle a user defined exception (Name: Your preferred name), to
check if user can attend the university exam. If the user says he/she is tested corona
positive, user is not eligible to attend the exam. If the user says he/she is tested
corona negative, user is eligible to attend the exam.

12. Create an abstract class Eatable with an abstract method eat(), Create a child class
Fruit (Make it as abstract) add abstract method taste(), Create a child class to Fruit as
nameofFruit (class name) and call the methods eat, taste in a test class.
13. Develop a Java program for generating three threads to perform the following
Operations: i) Accept ‘N’ numbers ii) Print the greatest number and iii)Print the
smallest number.

14. Write a Java program to rethrow an exception – Define methods one() & two().
Method two() should initially throw an exception. Method one() should call two(), catch
the exception and rethrow it Call one() from main() and catch the rethrown.

15. Create an Interface payable with method getAmount ().Calculate the amount to be
paid to Invoice and Employee by implementing Interface.

Batch-II

1. Solve problem by using sequential search algorithms (Selection, insertion)

2. Solve problem by using binary search sorting algorithms (Selection, insertion)

3. Solve problem by using quadratic sorting algorithms. (Selection, insertion)

4. Develop stack and queue data structures using classes and objects.

5. Develop a java application with an employee class with members for generate pay

Slip using inheritance.

6. Write a java program to create abstract class for calculating area of different shape.

7. Write a java program to create interface for calculating area of different shape.

8. write a java program for implementing user defined exceptions handling.


9. write a java program for implementing multi-threaded application.

10. write a java program that reads a file name from the user, displays information about

whether the file exists, whether the file is readable, or writable, the type of file and the length of the
file in bytes.

11. write a java program for implementing generic class.

12. Design a calculator as a mini project using event driven programming paradigm of

java with the following options a) Decimal Manipulations b) Scientific Manipulations.

13. Develop queue data structures using classes and objects.

14. Write a Java Program to create an abstract class named sum of Two and sum of Three. Perform
addition of two numbers and addition of three numbers

15. Write a program to Check Prime Number using Interface.

16. Write a Java program to find the sum value of two given type of elements using a generic class.

17. Write a java program that implements a multithread application that has three threads. First thread
generates random integer every one second and if the value is odd, second thread computes the
square of the number and prints the value is even, the third will print the cube of the number.

18. Create a Java Application to calculate GPA for 5 subjects using the marks of the subject
and credits of the subject and implement a user defined exception for subject mark, credits,
subject name, and subject code.

19. Write Java programs to implementing Arithmetic exception and implementing Array
IndexOutOfBound exception.

20. Write a Java program that keeps a number from the user and generates an integer
between 1 and 12 and displays the name of the month.

You might also like