You are on page 1of 4

SpringBoot with Microservices

class will start @ 07:35 PM IST


========================
OOPS:- Object Oriented Programming System
1. Abstraction
2. Encapsulation
3. Inheritance
4. Polymorphism
Abstraction:- it is a process of getting required data and hiding unnecessary data
Data Abstraction
Method Abstraction
Application:-Gather the data depending on requirement
we need to apply abstraction
Caststudy:- dev an appn for a college to maintain student,emp,course,dept
identify variables and methods
apply Data Abstraction
Encapsulation:- Binding or Wrapping ior Grouping of related variables and methods
in a single container
no cid
sname cname
age duration
gender fees
phno dno
emailid dname
address
eno
ename
bsal
da
hra
tsal
==============
class Student class Employee
{ {
int sno; int eno;
String sname; String ename;
int age; double bsal;
int per; double da,hra,tsal;
char grade; double address;
void setStudent() void setEmp()
{ } { }
void calTotal() voidcalTsal()
{ } { }
void getPer() }
{ }
}
==================================
class:- class is a userdefined refernce type datatype which consists of variables
and methods
class consists iof variables and methods
variable:- store the value
method:- perform some operation
object creation:-memory allocation for instance variables
Reference variable:-accessability (Invoking the methods)
core java:- Developer will manually create object by using new keyword and
developer will assign the object to reference
A a1=new A();
Adv Java :- server will create object
server will return the object by invoking Factory Method
Q)what is factory method?
any method that will return object then that method is called as factory method
Method will have return type
Returntype may be void or Datatype
if the returntype is void method will not return any value
if the returntype is datatype then method will return some value
Returntype Returnvalue
void nothing
int return 10;
String return "sathya";
class return object or reference
superclass return subclass object
interface return implemented class object
=================================================================
class A
{
void set() String getStr()
{ {
S.o.pln("hello sathya"); return "babu";
} }
int get() float getfloat()
{ {
S.o.pln("hello sathya"); return 2.3f;
} }
int getInt() void setv()
{ {
return 10; return 10;
} }
======================Kannababu================================
class A class X class Test
{ { {
int x=5; public static A getObject() static void main()
int y=3; { {
public int getSum() A a1=X.getObject();
{ return new A(); int sum=a1.getSum();
return x+y; } S.o.pln(sum);
} }
} }
}
========================Kannababu================================
Spring MVC,SpringBoot:-
object was created by interface reference
class HC interface ISL interface IDAO
{ { {
ISL is;
} }
class SL implenets ISL class DAO implenets IDAO
} { {
IDAO idao; JDBCTemplate jd;
} }

======================)==================
in appn development we will write Different types of Logics inside Method
1. Presentation Logic
2. Business Logic
3. Database connectivity code
4. Integration Logic
5. DB Validation Logic
6. Authetication Logic
7. Transaction Logic
====================
in appn development
class consists of either variables or methods
in SpringMVC the application Logic was divided into different layers
Models:-
Model is a class which consists of private variables and public setter and getter
methods
Purpose of Model class:-
1. store the html values in model object
2. Transfer the Model object between the Layers
Q)what is the prupose of constructor Parameters?
in spring MVC we use To constructor Parameters to Establish the connectivity
between the layers
Q)what is the purpose of Method Parameters?
The purpose of Method Parameters is to transfer the model object between
the layers
=================

==================

====================================
kannababu

You might also like