Category Archives: Job

Class Object Example

Class
Object
– Earth is a software application where human and other thing is software objects.For creating object we need to create a human class. Humans have basic behaviors as well as some basic attributes age height inches etc.

 

Human,java

 

 

Earth.java

 

 

Interface Polymorphism Example

Robot.java

 

Human.java

 

Walkable.java it is interface

 

Application.java it is main class to print

Turning Application main class into lambda:

 

 

Java learned as so far:

Java variables,
Array, 2d array
Method
Different method invoking and return type
Class
– Class is actually a blueprint/specification/design
– A class can create as many as objects it needs to create
Object
– Earth is a software application where human and other thing is software objects.For creating object we need to create a human class
– Objects do particular behavior in a class
– Object exist only in application runtime actually when application is running
– Objects have identity,state and behavior

this keyword – it represent current object
Instance
Constructor – The costructor is a special method with the same name as the class and it’s used to instantiate objects from that class
– Every class has a by default constructor if we don’t put it manually
– The constructor is special method containing instructions for object creation. it can be said it is so called birth method. It has instructions for how the object will be born when the application starts up
Static keyword
Stack and heap memory
Garbage collection
Object oriented Programming = better organizing of code, it is a way to organize our code from multiple files by creating objects
Local variable
Reference variable
Instance variable
Inheritance
– Inheritance is the approach to get/transfer behaviour of one class to another
– We use extends keyword for inheriting, in inheritance we inherit from parent class which known as base class and the class which needs inheritation is known as child class or sub class/derived class
super keyword it extract constructor and it’s variable from parent class but reverse is not possible
Overrides
– Same method name with different purpose
– Same method name in parent class but in child class the method name is same but with different purpose
– Overrides means replace
– Override is not a good idea sometimes so we go for interface
Interfaces
– Interface is a contract with a class. The class needs to implements that method of the interface according to contract
– Interface has a method which does not need body, so it is just only to define, it is called as abstract method
– one parent class
– We use implements keyword while putting interface in a class
Abstract class
– When you don’t need all methods to invoke you can use abstract method, you can not make object from abstract class. Abstract method needs to be in abstract class. We use abstract keyword for both method and object to define abstract class and methods
– you can only extend abstract class but can not instantiate abstract class
– We can define abstract class as a type while creating object
Polymorphism

Loops
Exception Handling

Collection Framework
Wrapper class
Threading
Concurrency
Database

Jshell
Functional Interfaces
Lambda expressions

-Lambda helps us to use separate from associated object
– it can run without class
– We need to use lot of interfaces for this

Streams

Ei bold kora jayga diye project banaye banaye clear korte hobe
Italic kora jaygagula motamuti clear asey In Sha Allah, Alhamdulillah
The source is : Imtiaz Ahmed’s complete Java course

OOP Design New Course:

Association: It defines relationship between classes, it defines how the software will behave
Dependency Association: For example from code:

A driver receives a vehicle reference only as driver then only he can drive or accelerate

Composition: A particular object . It imply ownership
for example in this code:

Aggregation Association: It does not imply ownership

Here Department to SpanishCourse relation is composite

But Course to Student relationship is not composite because it does not imply ownership a student can take many courses or not

We find this relationship from above diagram, the block diamond and white diamond is the part of UML diagram

Forming Association between objects:

has a relationship in customer .

Now when to stop delivery

Overview of software deisgn:
For example: Hospital Employee Management System
Task of the software:
Hire and Terminate Employees
Print Reports(XML,CSV Formats)

Problem Statement:
Current status of the software

Tips for design:
You must draw design in paper or whiteboard don’t go to code directly
Don’t overdesign or overdraw
We have to develop iteratively but early steps should be kept simple
Class names should be nouns based on their intention

Single Responsibility Priniciple(SRP): Not all the things in the same class

Don’t repeat yourself(DRY):

Arrow sign always describe that it is depends on that dependency class:

 


DAO=Data Access Object

Source Imtiaz Ahmed Master OOP Design course

JDBC

JDBC=Java Database Connectivity

ArrayList in Java

ArrayList in Java:

Generics:

 

LinkedList is faster for manipulation but slower for retrieval and ArrayList is slower for manipulation but faster for retrieval

 

My Beautiful Crafted Java OOP

Human.java

Earth.java

 

Started Course: Java In Depth Become a Complete Java Engineer

I have started this course from Udemy and will complete soon with all my effort In Sha Allah:

 

Book Recommendation: Effective Java, Second Edition, Joshua Bloch
Harnessing Java by Kishori Shoron
Head First Java

 

1st video:

Installed JDK
Environment Setup
Made Hello.java with Notepad++
then done javac Hello from cmd:
It made Hello class which is platform independent

2nd Video:

Installing Intellij and Setup for Running Java Application:

Section:3 Classes and Objects

2d Array and 3D array some problem but will clear later now I should move on with other topics.

Mission Programer

Data Science Interview Question

 

 

Must Read For Becoming a Successful Software Developer

https://content.techgig.com/7-habits-of-successful-developers/articleshow/72996679.cms

 

https://content.techgig.com/5-aptitude-interview-questions-that-can-get-you-a-tech-job/articleshow/73080737.cms

Phone Interview Success

 

 

 

What is this keyword in OOP

What is “this”?

You may have noticed something slightly strange in our methods. Look at this one for example:

You are probably wondering what “this” is. The this keyword refers to the current object the code is being written inside — so in this case this is equivalent to person.

Java Programming Recap In Sha Allah

OOP concept clearings from some MOOC courses

Code:

Student.java

 


 

StudentTest.java

 

 

 

Job Interview Tips Must See