Shanmugasundari.files.wordpress.com



VELAMMAL COLLEGE OF ENGINEERING & TECHNOLOGY, MADURAI-625 009DEPARTMENT OF INFORMATION TECHNOLOGYDegreeB.Tech-ITCourse Code-Title CS8392 /Object Oriented ProgrammingCourse Component Professional CoreName of the InstructorMrs.N.Shanmuga SundariImportant Programs asked in previous year question paper:UQP-University Question paper programPractical-Lab program in syllabus1. Write a program to perform the following functions using classes, objects(Classes,Objects)-UQPi)Get as input of marks of 5 students in 5 subjectsii)Calculate the total and averageiii)Print the formatted result on the screen2. Write a JAVA program using classes to perform linear search on an array of ‘N’ numbers. Give the explanatory comments in your program. (Classes,Objects)-UQP3. Develop a Java application to generate Electricity bill. Create a class with the following members: Consumer no., consumer name, previous month reading, current month reading, and type of EB connection (i.e domestic or commercial). Compute the bill amount using the following tariff. (Classes,Objects)-PracticalIf the type of the EB connection is domestic, calculate the amount to be paid as follows: ? First 100 units - Rs. 1 per unit ? 101-200 units - Rs. 2.50 per unit ? 201 -500 units - Rs. 4 per unit ? > 501 units - Rs. 6 per unit If the type of the EB connection is commercial, calculate the amount to be paid as follows: ? First 100 units - Rs. 2 per unit ? 101-200 units - Rs. 4.50 per unit ? 201 -500 units - Rs. 6 per unit ? > 501 units - Rs. 7 per unit2. Write a program to perform the following functions(Basic JAVA)-UQPi) Find the row and column sumii) Interchange the rows and columns3. Given two dimensional arrays A and B sorted ascending order. Write a JAVA program to merge them into a single sorted array. See that it contains every item from array A and B,in ascending order. (Basic JAVA)-UQP4. Write a JAVA program to mimics a calculator. Input two real numbers and state the type of arithmetic operation between them through another keyboard input. (Basic JAVA)-UQP5. Write a JAVA program to multiply two 3X3 matrices(Basic JAVA)-UQP6. Develop a java program to maintain the books details like BookId, AccessionNumber, BookName, Author, Publication in books package and keep the journal details such as Journalid;JournalName;in journal package in main class use these two packages details for Staff and Student classes and display the books and journals information as requested by the user. (Packages)-UQP 7. Write java program for generating four threads to perform the following operations(Threading)-UQPi)Getting ‘N’ number as inputii)Printing the even numbersiii)Printing the odd numbersiv)Computing the average8. Write a java program that collects the input as a decimal number of integer type and converts it into a string of equivalent hexadecimal number (Basic JAVA)-UQP9. Write a JAVA program that arranges the given set of strings in the alphabetical order. Supply the strings through the command line(Basic JAVA)-UQP10. An analysis of examination results at a school gave the following distribution of grades for all subjects taken in one year(Event Handling)-UQPGradePercentageA10B25C45D20Write a JAVA program to represent the distribution of each grade in a pie chart,where each slice of pie is differently colored11.Write a JAVA program to plot the path of a small circle moving around the circumference of a large circle(Event Handling)-UQP12.Rotate a compass needle on the screen about a fixed point in response to the mouse being moved around the screen. (Event Handling)-UQP13.Write an exception class for a time of day that can accept only 24 hrs representation of clock hours (example 15:35).Write a JAVA program to input various formats of timings and throw suitable error messages. (Exception Handling)-UQP14. Design and write a JAVA program to display the buttons from digital phone. As a number is dialed, play the respective tone.After a six digit number is input the program should play a ringing tone.The termination of this call should be initiated after playing this tone for 20 seconds. (Event Handling)-UQP15. Create a JAVA class shape with constructor to initialize the one parameter “dimension”.Now create three sub classes of shape with following methods. (Inheritance)-UQPi) circle with methods to calculate the area and circumferences of the circle with the dimension as radiusii) Square with methods to calculate the area and length of the diagonal of the square with the dimension as length of one sideii) sphere with methods to calculate the volume and surface area of the sphere with the dimension as radius of the sphere.Write appropriate main method to create object of every class and test every method.16. Develop a Library interface which has drawbook(),returnbook()(with fine),checkstatus(),and reservebook() methods. All the methods are tagged with public in the following ways: (Interface)-UQP(i) Using draw book()-get the required book based on title(ii)Using checkstatus-user book returned date details(iii)Using with fine()-Whether failed to return the book within a time period charge-Rs.5/day(iv)Using reserve book()-block or reserve particular book for their account.17.Create a simple menu application that enables a user to select one of the following items. (Event Handling)-UQPRadio1 ,Radio 2,Radio3,Radio4,Radio5,Red Dragon Radio i)from the menu bar of the applicationii)from a pop up menuiii)from a toolbarAdd tooltips to each menu item that indicates some information about the radio station such as type of music and its broadcast frequency18. write a program to create interface named customer. In this keep the methods called information(),show() and also maintain in the Tax rate. Implement this interface in employee class and calculate the tax of the employee based on their Income(Interface)-UQPIncome Tax PercentageMaleFemale>=1,90,000NilNil>=2,00,00010%Nil>=5,00,000 20%10%<5,00,000 25%20%.19.Write a java code to simulate the way of stack mechanism works using Exception Handling.(Eg:Stack full msg when add new elements and stack enpty message when delete element) (Exception Handling)-UQP20.Write a JAVA program for inventory problem using threads(Threading)-UQP addstock() getstock()Producer--------------------> Stock-------------------->Consumer notify() wait()21. Develop a java application to implement currency converter (Dollar to INR, EURO to INR, Yen to INR and vice versa), distance converter (meter to KM, miles to KM and vice versa) , time converter (hours to minutes, seconds and vice versa) using packages. (Packages)-Practical22. Develop a java application with Employee class with Emp_name, Emp_id, Address, Mail_id, Mobile_no as members. Inherit the classes, Programmer, Assistant Professor, Associate Professor and Professor from employee class. Add Basic Pay (BP) as the member of all the inherited classes with 97% of BP as DA, 10 % of BP as HRA, 12% of BP as PF, 0.1% of BP for staff club fund. Generate pay slips for the employees with their gross and net salary. (Inheritance)-Practical 23. Design a Java interface for ADT Stack. Implement this interface using array. Provide necessary exception handling in both the implementations(Interface)-Practical24. Write a program to perform string operations using Array List. Write functions for the following (Strings)-Practicala. Append - add at end b. Insert – add at particular index c. Search d. List all string starts with given letter 25. Write a Java Program to create an abstract class named Shape that contains two integers and an empty method named print Area(). Provide three classes named Rectangle, Triangle and Circle such that each one of the classes extends the class Shape. Each one of the classes contains only the method print Area () that prints the area of the given shape. (Abstract Classes)-Practical26. Write a Java program to implement user defined exception handling. (Exception Handling)-Practical27. 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. (File Handling)-Practical28. Write a java program that implements a multi-threaded application that has three threads. First thread generates a random integer every 1 second and 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. (Threading)-Practical29. Write a java program to find the maximum value from the given type of elements using a generic function. (Generic functions)-Practical30. Design a calculator using event-driven programming paradigm of Java with the following options. (Event Handling)-Practicala) Decimal manipulations b) Scientific manipulations 31. Define a class named COMPLEX for representing complex numbers that contains necessary data members and member functions. A complex number has the general form a + ib, where a is the real part and b is the imaginary part (i stands for imaginary). Include methods for all the four basic arithmetic operators. (Classes and objects)-UQP32. Write a Java program that determines the number of days in a month (Classes and objects)-UQP33. Write a program?TestThreadMany.java?that takes a positive integer n from the command line and creates exactly n threads that print out their own name(Threading)-UQP34. Write a program to find whether the string is palindrome or not and Write a java program to concatenate and compare the two strings (String Handling)-UQP35. i)Write a java program to plot the path of small circle moving around the circumference of a larger circle. ii) Write a java program to draw polygon (Event Handling)-UQP36. Write a Java application for Banking transaction. It rises user defined exception while encountering errors during debit transaction and also solves the exception by using appropriate handling techniques (Exception Handling)-UQP ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download