Loading Image

Monday, August 17, 2020

OOP Basics

OOP is a design philosophy. It stands for Object-Oriented Programming. Object-Oriented Programming (OOP) uses a different set of programming languages than old procedural programming languages.

Object

An object can be considered a "thing" that can perform a set of related activities. OOP terms of an object is an instance of a class. 
My name is Khalid, and I am an example/object of class men. When we say, being human, male or female, we, you, your friend, to me we are forms of this class. A class is simply a logical definition when we have a physical existence. We are objects.

Class

A class is simply a representation of a type of object. It is the blueprint, or plan, or template, that describes the details of an object. A class is a blueprint from which the individual objects are created. Class is composed of three things: a name, attributes, and operations.

OOP has 4 key concepts

These are  
  1. Encapsulation 
  2. Abstraction 
  3.  Inheritance  
  4.  Polymorphism.


1. Encapsulation:

The encapsulation is the inclusion-within a program object-of all the resources needed for the object to function, basically, the methods and the data.  It also enables the reusability of an instant of an already implemented class within a new class while hiding & protecting.  Those variables that are declared in private that have to direct access from outer. These variables are seen as hidden from the outer class, This situation is known as data hiding

To Acces in those variables, there are need some public method as Getter() and Setter(), by using these two methods privately declared variables can be accessed. 

Benefits:
  • Data hiding
  • Classes reusability
  •  Code Can be modified without breaking the main code.

2. Inheritance

Inheritance is a way of organizing classes. The term comes from the inheritance of traits like eye color, hair color, and so on. Classes with properties in common can be grouped so that their common properties are only defined once in the parent class. 
Superclass: Inherit its attributes & methods to the subclass. Subclass:  can inherit all its superclass attributes & methods besides having its own unique attributes & methods.





3. Abstraction

Data Abstraction is one of the essential and important features of object-oriented programming in C ++. Abstraction means simply showing the necessary information and hiding the details. Data abstraction refers to providing only the necessary information about data to the outside world by hiding the details or implementation of the background.

For example, Humans can talk, walk, listen, eat, but the details are hidden from the outside world. We can take our skin as the cause of abstraction in our case, hiding the internal process.


4. polymorphism

The word polymorphism means many forms. Simply, we can define polymorphism as the ability to display messages in multiple forms.

At the same time, a person may have different characteristics. A man has a father, a husband, an employee at the same time. So the same person is entitled to different behaviors in different situations. This is called polymorphism.

If we walk using our hands, and not legs, here we will change the parts used to perform something. Hence this is called Overloading.

And if there is a defined way of walking, but I wish to walk differently, but using my legs, like everyone else. Then I can walk like I want, this will be called Overriding.

Thursday, February 13, 2020

4th JUST Intra University Programming Contest

Department of Mathematics | JUST


4th JUST Intra University Programming Contest-2020

Hello JUSTians!
CSE club is going to arrange a programming contest for enthusiasts within the campus on 16th February.
This is your chance to show off your skill among peers and win exciting prizes.
There will be special prizes for 1st-year participants and girl participants along with podium holders. Don’t miss the opportunity.
Registration link :   shorturl.at/jsuEQ
Last date of registration  within 2:00 PM, 15 Feb 2020, 
Contest Time: 9:00 AM to 12:00 PM, 16 Feb-2020

Friday, February 7, 2020

Corona Virus at a glance

Corona Virus at a glance 

Researchers claim that coronavirus has spread from bats to China. Recently, two studies were published in the journal Nature. These studies have shown that coronas, such as SARS (Save Acute Respiratory Syndrome) virus, also spread from the bats.

The first study was done by Feng University teacher Yang Zhen Jung and one of his colleagues. They collected samples from a patient's lungs for research. The patient was admitted to the hospital with symptoms of fever. The patient was working at the South China Seafood Wholesale Market.
A sample analysis from that person showed that the coronavirus was similar to the SARS virus. This coroner genome sequence corresponds to the CARS's genome sequencing of 5.7%. Earlier in China, circus was spread in 20, which spread from bats.

Image result for coronavirus
File Image


Another study, published in Nature, says that the researchers analyzed the data and found that the virus had spread to the bats. It is a virus similar to the SARS virus.

SomeQuestionares about CoronaVirus:
##.What is the duration of symptoms of the coronavirus in the body of the person?
Answer: According to the World Health Organization(WHO), it can take a minimum of 7 days to determine if a person has been infected with the coronavirus. This is because the virus can remain dormant in the person for 2 to 3 days before the symptoms are revealed. However, this time may be shorter.

##. How to spread the SARS (Save Acute Respiratory Syndrome)? How did it get started?

Answer: Another type of coronavirus is the SARS (spread in 2013). The virus was infected with bats. Later it spread to the bodies of those who had contact with the Fox. Then the cough and coughing of these persons spread to the bodies of others, with the objects they had taken.



Source:  ProthomAlo

Friday, January 31, 2020

JAVA MVC Model

The Model View Controller (MVC) design pattern specifies that an application consists of a data model, presentation information, and control information. The pattern requires that each of these is separated into different objects.
MVC is more of an architectural pattern, but not for a completed application. MVC mostly relates to the UI / interaction layer of an application. You’re still going to need a business logic layer, maybe some service layer and data access layer
Advantage of MVC (Model 2) Architecture
  1. Navigation Control is centralized
  1. Easy to maintain the large application




Tuesday, April 3, 2018

Runs on the top of the moon's water

If you've ever gone canoeing, you may have noticed water striders,  those small, long-legged bugs that easily stroll across the surface of the water without breaking the surface tension. In Central and South America, the slightly larger basilisk lizard can pull a similar trick, but it has to move pretty fast to do it. And we seem to remember a story about another guy way back when who was kind of famous for walking on water (not sure if that had anything to do with surface tension, though). But actually, a lot of people can perform that "miracle" — as long as they go to the moon first.
  
Image result for walking on moon water





A Whole New Way to Moonwalk

What kind of people do this important research into the human capacity to traverse theoretical lunar swimming pools? The same kind of people who win Ig Nobel Prizes. The 2013 science gag prize in physics went to a team of Italian scientists who wanted to find an answer to that question. Their findings? It's possible — but difficult.
To get their results, the scientists devised a brilliant simulation of lunar gravity consisting of a springy harness hanging from the ceiling. They then equipped their study participants with swim fins to mimic the broad feet of basilisk lizards, because while low gravity, high speed, and broad feet can each on their own help with the endeavor, the best way to get results is to combine all three. The researchers rigged the harness to simulate various amounts of gravity and found that the most physically fit of their participants was able to stay afloat at about 22 percent of Earth's gravity. Reduce that amount down to 10 percent, and almost everybody was able to do it. Since the gravity on the moon is about 17 percent of Earth's gravity, that means that running across a lake is certainly possible — it's just closer to the "elite athletes only" side of the spectrum.
By the way, if you think that the sight of somebody strapped into a complicated harness, wearing floppy swim fins, and splashing frantically at the top of a pool of water would be a pretty funny sight, shame on you. This is serious science. And also, you're totally right.

Refferenced By:   courisity 

Monday, April 2, 2018

April Fools Contest 2018

Saturday, November 18, 2017

Codefoce

Wellcomes by Codeforces 

     









Thanks Codeforces 

Friday, November 17, 2017

Let's a walk with GO

শুরুর আগেঃ

সর্বপ্রথম ২০০৩ সালে ফ্রান্সিস ম্যাককেকে এবং কিথ ক্লার্কের পরিকল্পনায় এই প্রোগ্রামিং ভাষাকে নিয়ে পত্রিকায় একটি প্রতিবেদন ছাপা হয়। এই প্রতিবেদনে Go’কে যুক্তিবিজ্ঞান ও এজেন্ট-ভিত্তিক প্রোগ্রামিং ভাষা হিসাবে দেখানো হয়।
                                                        
আশ্চর্যের বিষয়, নভেম্বর ২০০৯ সালে Google সবাইকে অবাক করে দিয়ে একই নামে Go প্রোগ্রামিং ভাষা প্রকাশ করে। এ বিষয়ে ফ্রান্সিস ম্যাককেকে মুখ খুললেও তাঁর এই প্রতিবাদ কোন কাজে আসেনি। এই মতবিরোধকে প্রতিহত করে Google Go’কে নিয়ে ইতিমধ্যে যে চিত্রনাট্য দেখিয়েছে তা সত্যিই ঈর্ষনীয়!
বিরোধ সম্পর্কে বিস্তারিত জানতে ঘুরে আসতে পারেন এখানে

ইতিহাসঃ

২00৭ সালের ২৫ শে সেপ্টেম্বর, Google প্রকৌশলী রব পাইকি, রবার্ট গ্রিসেরার এবং কেঞ্চ থম্পসন নতুন একটি প্রোগ্রামিং ভাষা নিয়ে আলোচনা করছিলেন তখন রব পাইকি এই প্রোগ্রামিং ভাষার নাম “Go” সুপারিশ করেন।
পরবর্তীতে ১০ নভেম্বর, ২০০৯ সালে সর্বপ্রথম অফিসিয়ালি এই প্রোগ্রামিং ভাষা পৃথিবীতে মুখ দেখার সামর্থ্য লাভ করে। বলে রাখা ভাল যে, Go ফ্রি, ওপেন সোর্স ভিত্তিক প্রোগ্রামিং ভাষাগুলোর মধ্যে একটি। এই ওপেন সোর্স কমিউনিটির সহায়তায় সর্বপ্রথম ২0১২ সালের ২৮ শে মার্চ Go ভার্শন ১ প্রকাশ পায়।
এরই ধারাবাহিকতায় ২০১৭ সালের ২৪ মে Go’র সর্বশেষ ভার্সন ১.৮.৩ অবমুক্ত করা হয়। এই প্রোগ্রামিং ভাষা Linux, macOS, FreeBSD, NetBSD, OpenBSD, Windows, Plan 9, DragonFly BSD, Solaris সহ সকল অপারেটিং সিস্টেমে কাজ করার সামর্থ্য রাখে।
“শুরুর দিকে Google এই প্রোগ্রামিং ভাষা তাঁর নিজের কাজে ব্যবহার করলেও বর্তমানে এটি বহুল ব্যবহৃত প্রোগ্রামিং ভাষাগুলোর মধ্যে একটি”

Syntax বা শব্দবিন্যাসঃ

এই প্রোগ্রামিং ভাষার শব্দ বিন্যাস খুবেই সহজ এবং সাবলীল। C প্রেমীরা জেনে খুশি হবেন যে, Go’র শব্দবিন্যাস C এর সাথে কিছু ব্যতিক্রম থাকলেও অনেক খানিই সামঞ্জস্যপূর্ণ। প্রখ্যাত সফটওয়্যার ইঞ্জিনিয়ার Mark Summerfield বলেছেন, “Go অন্যান্য প্রোগ্রামিং ভাষার তুলনায় C এর খুব কাছাকাছি একটি প্রোগ্রামিং ভাষা।”
এজন্যই হয়ত গতিতে এ প্রোগ্রামিং ভাষা অন্য প্রোগ্রামিং ভাষা থেকে একটু এগিয়ে।
এছাড়াও Java, C, C++ এদের মতো এই প্রোগ্রামিং ভাষায় ‘;’ সেমিকোলন এর কোন ঝামেলা নেই। তাই আপনারা Go’র কোড করে অনেক স্বাচ্ছন্দ্যবোধ করবেন। তাহলে আর দেরি কেন, চলুন না পরিচয় হওয়া যাক …
প্যাকেজ প্রধান 

আমদানি "fmt" 

func main () { 
    fmt.Println ("প্রজেক্টর Avijatri") 
}

পরিপূর্ণতায় Go:

এই প্রোগ্রামিং ভাষার পরিপূর্ণতা এক কথায় প্রকাশ করতে গেলে সবার আগে Shopify এর CEO Tobias Lütke’র উক্তিটি জানা খুবই গুরুত্বপূর্ণ। “ভবিষ্যতে Go’ই পৃথিবীর সার্ভার ভাষার নেতৃত্ব দিবে”-এই উক্তিটিই আসলে বলে দেয় এই প্রোগ্রামিং ভাষার ব্যাপকতা কতটা গভীর!
এরই ধারাবাহিকতায় ইতিমধ্যে, Go পৃথিবীর প্রায় অজস্র মাল্টিন্যাশনাল কোম্পানিছাড়াও Testing Frameworks, Relational Databases, Natural Language Processing, Web Frameworks, Science and Data Analysis, Machine Learning, Embeddable Scripting Languages, Game Development, Secuirty, Networking, Code Analysis সহ নানা ক্ষেত্রে ব্যাপক সফলতা দেখিয়েছে।
তাই এত সব পরিপূর্ণতা Go’কে নিয়ে গেছে এক অনন্য উচ্চতায়।
Go’র অফিসিয়াল website এ যেতে ক্লিক করুন এখানে

তথ্যসূত্রঃ

Thursday, November 16, 2017

Future

Waiting for us..





Pictures



 Expectation!!!

Number Theory

Number Theory Even-Odd propositions.


Even-Odd proposition :-
even even = even
  1. odd odd=even
  2. even odd= odd
  3. even even= even
  4. even odd= even
  5. odd odd= odd

Number Theory 11’s divisibility

11’s Divisibility 


image



To check a number which is divisible by 11 or not , we need to summation of all even positions digits and subtraction of all odd(except 1) positions digits. if the result is divisible by 11 then the whole number is divisible is by 11, otherwise not.

example :- Is 56782431895057 divisible by 11?
solution :-
here, summation of digits is :
5+6-7+8-2+4-3+1-8+9-5+0-5+7 = 11
which is divisible by 11,
so, the number is divisible by 11.


To see previous Post Visit here :-
https://mostafijurkajol.blogspot.com

Number Theory

 9th Divisor!!


প্রথমে আমরা গণিতে ৯ দিয়ে বিভাজ্যতার একটি মজার বিষয় দেখি। বলুন তো ৬৯৮৪ সংখ্যাটি কি ৯ দিয়ে নিঃশেষে বিভাজ্য? এক নজর দেখেই বলতে হবে। পারলেন না তো? আমি বলছি, হ্যাঁ, নিঃশেষে বিভাজ্য। কীভাবে বললাম? খুব সোজা। প্রথমে সংখ্যার অঙ্কগুলো যোগ করি। যোগফল যদি ৯ দিয়ে নিঃশেষে বিভাজ্য হয়, তাহলেই সংখ্যাটি ৯ দিয়ে বিভাজ্য হবে। যোগফল যদি বড় হয়ে যায়, তাহলে অবশ্য আমরা এর অঙ্কগুলো আবার যোগ করি। এভাবে যোগ করতে করতে যদি তা ৯-এ পৌঁছায়, তাহলে পুরো সংখ্যাটি ৯ দিয়ে বিভাজ্য হবে। আর যদি যোগফল ৯ দিয়ে বিভাজ্য না হয়, তাহলে সংখ্যাটি ৯ দিয়ে বিভাজ্য হবে না। এ ক্ষেত্রে দেখছি, ৬৯৮৪ = (৬ + ৯ + ৮ +৪) = ২৭ = (২ + ৭) = ৯। সুতরাং, ৬৯৮৪ সংখ্যাটি ৯ দিয়ে নিঃশেষে বিভাজ্য।
প্রশ্ন হচ্ছে, কেন এটা হয়? এর কারণ হলো, ১০-এর যেকোনো ঘাত (পাওয়ার) নিয়ে প্রাপ্ত সংখ্যাকে ৯ দিয়ে ভাগ করলে ১ অবশিষ্ট থাকে। এবং যেকোনো সংখ্যার অঙ্কগুলোকে আমরা স্থানাঙ্ক দিয়ে প্রকাশ করলে তা ১০-এর কতগুলো ঘাত নিয়ে প্রাপ্ত সংখ্যার সমষ্টি হিসাবে প্রকাশ করতে পারি। তাই শেষ পর্যন্ত দেখা যায়, যেকোনো সংখ্যার অঙ্কগুলোর যোগফল ৯ দিয়ে বিভাজ্য হলে পুরো সংখ্যাটিই বিভাজ্য হয়।
যেমন: আমরা লিখতে পারি, ৬৯৮৪ = ৬০০০ + ৯০০ + ৮০ + ৪ = ৬*১০০০ + ৯*১০০ + ৮*১০ + ৪*১ = ৬*(১০০০) + ৯*(১০০) + ৮*(১০) + ৪*(১) = ৬*(১ + ৯*১১১) + ৯*(১ + ৯*১১) + ৮*(১ + ৯*১) + ৪*(১ + ৯*০) = (৬ + ৯ + ৮ + ৪) + (৯ দিয়ে বিভাজ্য একটি সংখ্যা)।
এখন আমরা দেখছি, সংখ্যাটির অঙ্কগুলোর যোগফল ৯ দিয়ে বিভাজ্য হলেই পুরো সংখ্যাটি ৯ দিয়ে বিভাজ্য হবে।
আরেকটি মজার প্রশ্ন দেখুন। বলুন তো দুই অঙ্কের কয়টি সংখ্যা ৯ দিয়ে নিঃশেষে বিভাজ্য?
এর উত্তর বের করার জন্য আমরা প্রথমে দেখব দুই অঙ্কের কোন সংখ্যাগুলোর অঙ্ক দুটির যোগফল ৯। তাহলেই উত্তর পেয়ে যাব।
দুই অঙ্কের সংখ্যাগুলো ১০ থেকে ৯৯-এর মধ্যে থাকবে। এদের মধ্যে ১৮, ২৭, ৩৬, ৪৫, ৫৪, ৬৩, ৭২, ৮১, ৯০ ও ৯৯—এই ১০টি সংখ্যাই ৯ দিয়ে বিভাজ্য।

Wishing

 Wellcome to my blog