II Year – II SEMESTER T P C3+1 0 3JAVA PROGRAMMINGObjective: Implementing programs for user interface and application development using core javaprinciplesUNIT I:Objective: Focus on object oriented concepts and java program structure and its installationIntroduction to OOPIntroduction, Need of Object Oriented Programming, Principles of Object Oriented Languages, Procedurallanguages Vs OOP, Applications of OOP, History of JAVA, Java Virtual Machine, Java Features, Programstructures, Installation of JDK1.6UNIT II:Objective: Comprehension of java programming constructs, control structures in JavaProgramming ConstructsVariables , Primitive Datatypes, Identifiers- Naming Coventions, Keywords, Literals, Operators-Binary,Unary and ternary, Expressions, Precedence rules and Associativity, Primitive TypeConversion andCasting, Flow of control-Branching,Conditional, loops.,Classes and Objects- classes, Objects, Creating Objects, Methods, constructors-Constructor overloading,cleaning up unused objects-Garbage collector, Class variable and Methods-Static keyword, this keyword,Arrays, Command line argumentsUNIT III:Objective: Implementing Object oriented constructs such as various class hierarchies, interfaces andexception handlingInheritance: Types of Inheritance, Deriving classes using extends keyword, Method overloading, superkeyword, final keyword, Abstract classInterfaces, Packages and Enumeration: Interface-Extending interface, Interface Vs Abstract classes,Packages-Creating packages , using Packages, Access protection, java.lang packageExceptions & Assertions - Introduction, Exception handling techniques-try...catch, throw, throws, finallyblock, user defined exception, Exception Encapsulation and Enrichment, AssertionsUNIT IV:Objective: Understanding of Thread concepts and I/O in JavaMultiThreading : java.lang.Thread, The main Thread, Creation of new threads, Thread priority,Multithreading- Using isAlive() and join(), Syncronization, suspending and Resuming threads,Communication between ThreadsInput/Output: reading and writing data, java.io packageUNIT V:Objective: Being able to build dynamic user interfaces using applets and Event handling in javaApplets- Applet class, Applet structure, An Example Applet Program, Applet Life Cycle, paint(),update()and repaint()Event Handling -Introduction, Event Delegation Model, java.awt.event Description,Sources of Events,Event Listeners, Adapter classes, Inner classesUNIT VI:Objective: Understanding of various components of Java AWT and Swing and writing code snippetsusing themAbstract Window ToolkitWhy AWT?, java.awt package, Components and Containers, Button, Label, Checkbox, Radio buttons, Listboxes, Choice boxes, Text field and Text area, container classes, Layouts, Menu, Scroll barSwing:Introduction , JFrame, JApplet, JPanel, Components in swings, Layout Managers, JList and JScroll Pane,Split Pane, JTabbedPane, Dialog BoxPluggable Look and FeelTEXT BOOKS:1. The Complete Refernce Java, 8ed, Herbert Schildt, TMH2. Programming in JAVA, Sachin Malhotra, Saurabh choudhary, Oxford.3. JAVA for Beginners, 4e, Joyce Farrell, Ankit R. Bhavsar, Cengage Learning.4. Object oriented programming with JAVA, Essentials and Applications, Raj Kumar Bhuyya, Selvi, ChuTMH5. Introduction to Java rogramming, 7th ed, Y Daniel Liang, PearsonREFERENCE BOOKS:1. JAVA Programming, K.Rajkumar.Pearson2. Core JAVA, Black Book, Nageswara Rao, Wiley, Dream Tech3. Core JAVA for Beginners, Rashmi Kanta Das, Vikas.4. Object Oriented Programming Through Java, P. Radha Krishna, Universities Press.JAVA PROGRAMMING LAB1. Write a JAVA program to display default value of all primitive data types of JAVA2. Write a JAVA program that displays the roots of a quadratic equation ax2+bx+c=0. Calculate thediscriminent D and basing on the value of D, describe the nature of roots.3. Write a JAVA program to display the Fibonacci sequence4. Write a JAVA program give example for command line arguments.5. Write a JAVA program to sort given list of numbers.6. Write a JAVA program to search for an element in a given list of elements (linear search).7. Write a JAVA program to search for an element in a given list of elements using binary searchmechanism.8. Write a JAVA program to determine the addition of two matrices.9. Write a JAVA program to determine multiplication of two matrices.10. Write a JAVA program to sort an array of strings11. Write a JAVA program to check whether given string is palindrome or not.12. Write a JAVA program for the following- 1. Example for call by value. 2. Example for call by reference.13. Write a JAVA program to give the example for ‘this’ operator. And also use the‘this’ keyword asreturn statement.14. Write a JAVA program to demonstrate static variables, methods, and blocks.15. Write a JAVA program to give the example for ‘super’ keyword.16. Write a JAVA program that illustrates simple inheritance.17. Write a JAVA program that illustrates multi-level inheritance18. Write a JAVA program demonstrating the difference between method overloading and methodoverriding.19. Write a JAVA program demonstrating the difference between method overloading and constructoroverloading.20. Write a JAVA program that describes exception handling mechanism.21. Write a JAVA program for example of try and catch block. In this check whether the given array sizeis negative or not.22. Write a JAVA program to illustrate sub class exception precedence over base class.23. Write a JAVA program for creation of user defined exception.24. Write a JAVA program to illustrate creation of threads using runnable class.(start method start eachof the newly created thread. Inside the run method there is sleep() for suspend the thread for 500milliseconds).25. Write a JAVA program to create a class MyThread in this class a constructor, call the base classconstructor, using super and starts the thread. The run method of the class starts after this. It can beobserved that both main thread and created child thread are executed concurrently26. Write a JAVA program illustrating multiple inheritance using interfaces.27. Write a JAVA program to create a package named pl, and implement this package in ex1 class.28. Write a JAVA program to create a package named mypack and import it in circle class.29. Write a JAVA program to give a simple example for abstract class.30. Write a JAVA program that describes the life cycle of an applet.- Write a JAVA program to create a dialogbox and menu.- Write a JAVA program to create a grid layout control.31. Write a JAVA program to create a border layout control.32. Write a JAVA program to create a padding layout control.33. Write a JAVA program to create a simple calculator.34. Write a JAVA program that displays the x and y position of the cursor movement using Mouse.35. Write a JAVA program that displays number of characters, lines and words in a text file.