Course Outcome (CO):
The students will be able to
COl:Understand Java programming language fundamentals and run time environment.
C02: Acquire knowledge and skill necessary towritejava programs.
C03: Learn the object oriented concepts and its implementation in Java
C04: Implement the multithreading and client side programming.
PARTA
1. a) Write a JAVA program to demonstrate Constructor Overloading and Method Overloading.
b) Write a JAVA program to implement Inner class and demonstrate itsAccess protection .
2. Write a program in Java for String handling which performs the following:
i) Checks the capacity of String Buffer objects.
ii) Reverses the contents of a string given on console and converts the resultant string in upper case.
iii) Reads a string from console and appends it to the resultant string of(ii).
3. a).WriteaJAVAprogramtodemonstratelnheritance.
b). Simple Program on Java for the implementation of Multiple inheritance using interfaces to calculate the area of a rectangle and triangle.
4. Write a JAVA program which has
i) A Class called Account that creates account with 500Rs minimum balance, a deposit()method to deposit amount, a withdraw() method to withdraw amount and also throws Less Balance Exception if an account holder tries to withdraw money which makes the balance become less than 500Rs.
ii) A Class called Less Balance Exception which returns the statement that says withdraw amount ( Rs) is not valid.
iii) A Class which creates 2 accounts, both account deposit money and one account tries to withdraw more money which generates a Less Balance Exception take appropriate action for the same.
5. Write a JAVA program using Synchronized Threads, which demonstrates Producer Consumer concept.
6. Write a JAVA program to implement a Queue using user defined Exception Handling (also make use of throw, throws).
7. Complete the following:
i. Create a package named shape.
ii. Create some classes inthe package representing some common shapes like Square, Triangle, and Circle. m. Import and compile these classes in otherprogram.
8. Write a JAVA program to create an enumeration Day of Week with seven values SUNDAY through SATURDAY. Add a method is Workday() to the DayofWeek class that returns true if the value on which it is called is MONDAY through FRIDAY. For example, the call DayOfWeek. SUNDAY.is WorkDay () returns false.
9. Write a JAVA program which has
i). A Interface class for Stack Operations
ii). A Class that implements the Stack Interface and creates a fixed length Stack.
iii). A Class that implements the Stack Interface and creates a Dynamic length Stack.
iv). A Class that uses both the above Stacks through Interface reference and does the Stack operations that demonstrates the runtime binding.
10. Write a JAVA program which uses FileInputStream/ FileOutPutStream Classes.
11. Write JAVA programs which demonstrate utilities of Linked List Class.
12. Write a JAVA program which uses Datagram Socket for Client Server Communication.
Note 1: In the practical Examination student has to execute one program from a lot of all the 12 questions and demonstrate Part B Mini Project.
Note 2: Change of program is not permitted in the Practical Examination.