PESIT Bangalore South Campus 15CS45 : OBJECT ORIENTED CONCEPTS Faculty : Prof. Sajeevan K, Prof. Hanumanth Pujar Course Description: No of Sessions: 56 This course introduces computer programming using the JAVA programming language with object-oriented programming principles. Emphasis is placed on event-driven programming methods, including creating and manipulating objects, classes, and using object-oriented tools such as the class debugger Prerequisites: Programming in C, Basics in Data Structures Course objectives: This course will enable students to Learn fundamental features of object oriented language and JAVA Set up Java JDK environment to create, debug and run simple Java programs. Create multi-threaded programs and event handling mechanisms. Introduce event driven Graphical User Interface (GUI) programming using applets and swings. Course Plan: Class Chapter Title Topics to be covered Book % of portion covered 1. Introduction to Object Oriented T2:1.1 Concepts: A Review of structures, Procedure Oriented Programming system 2. Object Oriented Programming System T2:1.2 3. Comparison of Object Oriented Language T1:2.1 with C, Console I/O 4. Module I variables and reference variables T2:1.3 5. Function Prototyping T1:2.2 6. Function Overloading T1:2.3 7. Class and Objects: Introduction T1:2.4 8. Member functions and data T1:1.3 9. Objects and functions, objects and arrays T1:1.3 10. Namespaces, Nested classes T1:1.4 20% 20% Cumulative
11. Constructors, Destructors. T1:1.4 12. Introduction to Java: Java s magic: the Byte code T2:3.1 13. Java Development Kit (JDK) T2:3.1 14 The Java Buzzwords T2:3.3 15. Module II Object-oriented programming; T2:3.4 16. Simple Java programs T1:4.1 20% 40% 17. Data types T1:4.2 18. Variables and Arrays T2:3.8 19. Operators T1:5.3 20. Control Statements.. T1:5.3 21. Classes, Inheritance, Exceptions, Packages and Interfaces: Classes, Classes fundamentals T2:4.1 22. Declaring objects T2:4.3 23. Constructors T2:4.5 24. T1:9.1 this keyword 25 T1:9.1 Module III Garbage collection 26. Inheritance: inheritance basics, using T1:9.2 20% 60% super 27. creating multi level hierarchy T1:9.2 28. method overriding T1:9.3 29. Exception handling: Exception handling T1:9.3 in Java 30. Packages T1:9.4 31. Access Protection T1:6.4. 32. Importing Packages, Interfaces. T1:6.4. 33. Multi Threaded Programming, Event Handling: Multi Threaded Programming T2:5.1 34. What are threads? T2:5.2 35. How to make the classes threadable T1:8.2 36. Extending Thread T1:8.2 37. Implementing Runnable T1:8.3 38. Synchronization, Changing state of the T1:8.4 thread 39. Bounded buffer problems, Read-write problem, Producer-Consumer problems T1:8.4 40. Module IV Event Handling: Two event handling T2:5.4 mechanisms, The delegation event model 20% 80% 41. Event classes, Sources of events T2:5.4 42. Event listener interfaces, Using the T2:5.9 delegation event model 43. Adapter classes, Inner classes T2:5.8 44. Module V The Applet Class: Introduction T2:7.1 20% 100%
45. Two types of Applets T1:12.1 46. Applet basics, Applet Architecture T1:12.1 47. An Applet skeleton T2:7.4 48. Simple Applet display methods T2:7.5 49. Requesting repainting T1:12.2 50. Using the Status Window, The HTML T1:12.2 APPLET tag; Passing parameters to Applets 51. T2:8.2, getdocumentbase() and getcodebase() T1:12.2 52. ApletContext and showdocument(); The T2:8.2 AudioClip Interface 53. The AppletStub Interface;Output to the T2:11.1 Console 54. Swings: Swing, The origins of Swing; T2:11.1 Two key Swing features; Components and Containers 55 The Swing Packages; A simple Swing T2:11.1 Application; Create a Swing Applet; Jlabel and ImageIcon 56 JTextField;The Swing Buttons; JTabbedpane; JScrollPane; JList; JComboBox; JTable Course Outcomes: After studying this course, students will be able to Explain the object-oriented concepts and JAVA. Develop computer programs to solve real world problems in Java. Develop simple GUI interfaces for a computer program to interact with users, and to understand the event-based GUI handling principles using Applets and swings. Graduate Attributes Programming Knowledge Design/Development of Solutions Conduct Investigations of Complex Problems Life-Long Learning Text Books: 1. Sourav Sahay, Object Oriented Programming with C++, Oxford University Press,2006 (Chapters 1, 2, 4) 2. Herbert Schildt, Java The Complete Reference, 7th Edition, Tata McGraw Hill, 2007. (Chapters 1, 2, 3, 4, 5, 6, 8, 9,10, 11, 21, 22, 29, 30) Reference Book: 1. Mahesh Bhave and Sunil Patekar, "Programming with Java", First Edition, Pearson
Education,2008, ISBN:9788131720806 2. Herbert Schildt, The Complete Reference C++, 4th Edition, Tata McGraw Hill, 2003. 3. Stanley B.Lippmann, Josee Lajore, C++ Primer, 4th Edition, Pearson Education, 2005. 4. Rajkumar Buyya,S Thamarasi selvi, xingchen chu, Object oriented Programming with java, Tata McGraw Hill education private limited. 5. Richard A Johnson, Introduction to Java Programming and OOAD, CENGAGE Learning. 6. E Balagurusamy, Programming with Java A primer, Tata McGraw Hill companies. QUESTION BANK: What do you know about Java? What are the supported platforms by Java Programming Language? List any five features of Java? Why is Java Architectural Neutral? How Java enabled High Performance? Why Java is considered dynamic? What is Java Virtual Machine and how it is considered in context of Java s platform independent feature? List two Java IDE s? List some Java keywords(unlike C, C++ keywords)? What do you mean by Object? Define class? What kind of variables a class can consist of? What is a Local Variable? What is a Instance Variable? What is a Class Variable? What is Singleton class? What do you mean by Constructor? List the three steps for creating an Object for a class? What is the default value of byte datatype in Java? What is the default value of float and double datatype in Java? When a byte datatype is used? What is a static variable? What do you mean by Access Modifier? What is protected access modifier? What do you mean by synchronized Non Access Modifier? According to Java Operator precedence, which operator is considered to be with highest precedence?
Variables used in a switch statement can be used with which datatypes? When parseint() method can be used? Why is String class considered immutable? Why is StringBuffer called mutable? What is the difference between StringBuffer and StringBuilder class? Which package is used for pattern matching with regular expressions? java.util.regex consists of which classes? What is finalize() method? What is an Exception? What do you mean by Checked Exceptions? Explain Runtime Exceptions? Which are the two subclasses under Exception class? When throws keyword is used? When throw keyword is used? How finally used under Exception Handling? What things should be kept in mind while creating your own exceptions in Java? Define Inheritance? When super keyword is used? What is Polymorphism? What is Abstraction? What is Abstract class? When Abstract methods are used? What is Encapsulation? What is the primary benefit of Encapsulation? What is an Interface? Give some features of Interface? Define Packages in Java? Why Packages are used? What do you mean by Multithreaded program? What are the two ways in which Thread can be created? What is an applet? An applet extend which class? Explain garbage collection in Java? Define immutable object? Explain the usage of this() with constructors? Explain Set Interface? Explain TreeSet? What is Comparable Interface? Difference between throw and throws? Explain the following line used under Java Program public static void main (String args[ ]) Define JRE i.e. Java Runtime Environment? What is JAR file? What is a WAR file? Define JIT compiler?
What is the difference between object oriented programming language and object based programming language? What is the purpose of default constructor? Can a constructor be made final? What is static block? Define composition? What is function overloading? What is function overriding? Difference between Overloading and Overriding? What is final class? What is NullPointerException? What are the ways in which a thread can enter the waiting state? How does multi-threading take place on a computer with a single CPU? What invokes a thread's run() method? Does it matter in what order catch statements for FileNotFoundException and IOException are written? What is the difference between yielding and sleeping? Why Vector class is used? How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters? What are Wrapper classes? What is the difference between a Window and a Frame? Which package has light weight components? What is the difference between the paint() and repaint() methods? What is the purpose of File class? What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy? Which class should you use to obtain design information about an object? What is the difference between static and non-static variables? What is Serialization and deserialization? What are use cases? Explain the use of sublass in a Java program? How to add menushortcut to menu item? Can you write a Java class that could be used both as an applet as well as an application? What is the difference between Swing and AWT components? What's the difference between constructors and other methods? Is there any limitation of using Inheritance? When is the ArrayStoreException thrown? Can you call one constructor from another if a class has multiple constructors? What's the difference between the methods sleep() and wait()? When ArithmeticException is thrown? What is a transient variable? What is synchronization? What is the Collections API? Does garbage collection guarantee that a program will not run out of memory? The immediate superclass of the Applet class? Which Java operator is right associative? What is the difference between a break statement and a continue statement?
If a variable is declared as private, where may the variable be accessed? What is the purpose of the System class? List primitive Java types? What is the relationship between clipping and repainting under AWT?Which class is the immediate superclass of the Container class? What class of exceptions are generated by the Java run-time system? Under what conditions is an object's finalize() method invoked by the garbage collector? How can a dead thread be restarted? Which arithmetic operations can result in the throwing of an ArithmeticException? Variable of the boolean type is automatically initialized as? Can try statements be nested? What are ClassLoaders? What is the difference between an Interface and an Abstract class? What will happen if static modifier is removed from the signature of the main method? What is the default value of an object reference declared as an instance variable? Can a top level class be private or protected? Why do we need wrapper classes? What is the difference between error and an exception? Is it necessary that each try block must be followed by a catch block? When a thread is created and started, what is its initial state? What is the Locale class? What are synchronized methods and synchronized statements? What is runtime polymorphism or dynamic method dispatch? What is Dynamic Binding(late binding)? Can constructor be inherited? What are the advantages of ArrayList over arrays? Why deletion in LinkedList is fast than ArrayList? How do you decide when to use ArrayList and LinkedList? What is a Values Collection View? What is dot operator? Where and how can you use a private constructor? What is type casting? Describe life cycle of thread? What is the difference between the >> and >>> operators? Which method of the Component class is used to set the position and size of a component? What is the range of the short type? What is the immediate superclass of Menu? Does Java allow Default Arguments? Which number is denoted by leading zero in java? Which number is denoted by leading 0x or 0X in java? Break statement can be used as labels in Java? Where import statement is used in a Java program? Explain suspend() method under Thread class>explain isalive() method under Thread class? What is currentthread()? Explain main thread under Thread class execution?
Life cycle of an applet includes which steps? Why is the role of init() method under applets? Which method is called by Applet class to load an image? Define code as an attribute of Applet?