Session 1 : OOP Introduction


OOP(Object Oriented Programming)
                                                                                      Programming in Large Scale
* What is done here ??
OO analysis and design
You will be able to answer following questions.
What is object oriented approach ?
How to think in terms of object and classes ?
How can we model the programs here in OO ?
Learning Part ?
We learn Java syntax here
We learn how to code, test and debug Java programs here.





Overall this designed specially for Java Exam Test Preparation. Here I try to give the summarized version of the all the key concepts and topics.

Java Environment
Java Basic Concepts
Java Inheritence

Java Collection Framework

Java Generics

Java Exceptions

Java IO








*Java GUI
*Java Threads

* Topic Not covered in this slide


                                        

Q? What is the most used programming paradigms and what are the difference between them.
Answer :
1. Procedural Paradigms : ex: C programming
2. Object-Oriented Paradigms : ex: Java

Problem in Procedural programming :
/> we have no constraints on read/write relationships
so any external functions can read/write vector's data
/> And on the long run this leads to a growing number of relationships i.e. each functions having relation with each other . And later on source code becomes difficult to design and maintain.
Spaghetti code” problem ;
/>Solution : Object-Oriented approach :
Q? why OO Paradigms is better.
/> here we create Objects and this object has encapsulated (data + procedures operating on data)
/> This very property of encapsulation is the reason which helps us to manage very large programs even by a single person.
/> we can use/reuse the code without knowing the clear picture .
/> we can build more complex system in this approach

Q? what is UML
/> We use Unified Modelling Language to graphicaly specify, visualize, construct and document an object-oriented system.
/> we can draw several diagrams here :
Class Diagram – Activity Diagram – Use Case Diagram – Sequence Diagram – Statecharts
/> Tools for Class diagram : ObjectAid , EclipseUML from Omondo etc. .. Check it out and try .

Q? what is the reation between object and class
/> Class is a Type definition : and the objects are created from this class :
/> Instantiation : process of creation of object
/> Instance : created object
/> the created object is independent of each other and we can create unlimited objects

Q? how do objects communicate with each other
/> they communicate by “message passing” and which is not “procedural call ” or not “direct access to objects local data”

Q? what is interface
/> it is just the subset of methods that “Rest of the Program” are allowed to call
/> the benefit of encapsulation is used by interface : i.e. no knowledge of internal are necessary

Q?what is method
/> operations that can be performed on an object
/> it helps to operate on or acces to the attributes

Q? what is and why of using inheritance
/> when subclass inherits superclass, the subclass inherites all the methods and fields of the superclass.
/> the subclass can override the inherited methods + they can also add other new methods to their class
/> we use inheritance cos a new class is sometimes barely a change of a class i.e. many methods are repeated.

Comments

Popular Posts