JAVA
- 1. Core Java Complete TutorialPrepared by:LOKESH KAKKARMail me at : kakkar.lokesh@gmail.comFollow me at : www.facebook.com/kakkar.lokeshCall me at : 9815-9900-67 1
- 2. Core Java TutorialSr. No. Topic Name01 OOPS Concepts02 Java Evolution03 Class Object basic04 Class Object Constructor overloading05 Inheritance06 Array and String07 Final Abstract class and interfaces08 Exceptions09 Streams10 GUI Applications11 Applet Programming12 Network Programming and Java Sockets13 Java Treads 2
- 3. Introduction to Object Oriented Design 3
- 4. Overviewn Understand Classes and Objects.n Understand some of the key concepts/features in the Object Oriented paradigm.n Benefits of Object Oriented Design paradigm. 4
- 5. OOP: model, map, reuse, extend n Model the real world problem to user’s perceive; n Use similar metaphor in computational env. n Construct reusable components; n Create new components from existing ones. 5
- 6. Examples of Objects CAR BOY GIRL CLOCKVDU BOOK TREE TRIANGLE Figure 1.9: Examples of objects 6
- 7. Classes: Objects with the same attributes and behavior Person Objects Abstract Person Class Into Attributes: Name, Age, Sex Operations: Speak(), Listen(), Walk() Vehicle Objects Abstract Vehicle Class Into Attributes: Name, Model, Color Operations: Start(), Stop(), Accelerate() Polygon Objects Polygon Class Abstract Attributes: Vertices, Border, Into Color, FillColor Operations: Draw(), Erase(), Move() Figure 1.12: Objects and classes 7
- 8. Object Oriented Paradigm: Features Encapsulation Data Abstraction Single Inheritance Polymorphism OOP Paradigm Persistence Delegation Genericity Multiple Inheritance 8
- 9. Java’s OO Features Encapsulation Data Abstraction Single Inheritance Polymorphism OOP JavaParadigm Persistence Delegation Genericity Multiple Inheritance 9
- 10. Encapsulation n It associates the Encapsulation code and the data it Data Abstraction manipulates into a single unit; and Single Inheritance keeps them safe from external interference Polymorphism OOP and misuse.Paradigm Persistence Delegation Genericity Data Functions Multiple Inheritance 10
- 11. Data Abstraction Encapsulation n The technique of creating new data types Data Abstraction that are well suited to an application. Single Inheritance n It allows the creation of user defined data types, Polymorphism OOP having the properties ofParadigm built data types and a set Persistence of permitted operators. Delegation n In Java, partial support. n In C++, fully supported Genericity (e.g., operator overloading). Multiple Inheritance 11
- 12. Abstract Data Type (ADT)n A structure that contains both data and the actions to be performed on that data.n Class is an implementation of an Abstract Data Type. 12
- 13. Class- Exampleclass Account { private String accountName; private double accountBalance; public withdraw(); public deposit(); public determineBalance();} // Class Account 13