Tutorial for Polymorphism in OOPS

What is Polymorphism?

Polymorphism, as its name implies, comes in a variety of forms. OOP allows for the use of a variety of techniques I. Simply expressed, they have to do with how methods are used, and how different methods operate for different objects. Method Overriding and Method Overloading are two ways that polymorphic methods allow for different actions to be done.

The benefits of Polymorphism are:

  • Objects of different types can be passed through the same interface
  • Method overriding
  • Method overloading

Method Overriding:- Overriding is used in the polymorphism of runtime. By overriding a parent class’s method, a child class can implement a different method. In the case of our dogs, we may prefer a specific type of bark that is distinct from the generic type of dog (TrackingDog).

Example:-

TrackingDog’s overriding the bark() method

Method Overloading:- Overloading is used at the polymorphic build time. Although methods and functions may have the same name, the call method has its own set of arguments. Different results may be obtained depending on the number of parameters entered.

Example:- There are no parameters supplied to the updateAttendance() method. The count will be added one day. When the updateAttendance(4) argument is used, the x xupdateAttendance(x) parameter is used, and four days are added to the total.

Tagged : / / / / / / / / /

Bootstrap:-Component “Progress”

Progress Bar in Bootstrap 4 is mainly used to indicate to the user, how much progress of the process is done. progress bars featuring support for stacked bars, animated backgrounds, and text labels. Use utility classes for the background (bg-success, bg- info, bg-light, bg-dark, bg-danger, bg-warning) for creating a progress bar with a different color.

Where to use Progress Bar:-

  • Progress Bar With Label by placing text within the .progress-bar.
  • Progress Bar With Height.
  • Colored Progress Bar by using .progress-bar-sucess|info|warning|danger.
  • Striped Progress Bar by using .progress-bar-striped class.
  • Animated Progress Bar by using .active class.
  • Stacked Progress Bars by using <div class=”progress”>.
Tagged : / / / / / / / / / / /

Different ways to write the transitions and transforms in image tag using HTML & CSS.

In this blog, I am creating the transitions and transforms in image tags using HTML & CSS. So, Let’s create an index.html & style.css below-

When refreshing the page then will be shown like this-
When you will be used hover then shown this like this.
Tagged : / / / / / /

Tutorial for Abstraction in OOPS

What is Abstraction?

Basics of Computation Theory. What is "abstraction"? Abstraction unifies  multiple and different objects into one concept  describes the common  properties. - ppt download

Abstraction in OOP allows information/access about how codes are applied to be concealed, allowing just the required access. These details may be found in the object definitions. A famous example is the counting approach that works with list items. One thing to keep in mind is that, given the same OOP concept, all Python I data types and structures are objects. In this sense, a list is a class that has methods for completing tasks.

What is Abstraction in OOPS? - JournalDev

What is the Function of Abstraction?

Abstraction use simpler high-level instruments to get access to a complex object:

  • Using simple things to represent complexity
  • Hide complex details from user
JavaScript ES7 OOP. Abstraction. Class. #1 - YouTube

Abstraction also serves a significant security role. We only present selected data items and provide data access via classes and methods to protect the data from being exposed. In the case of an automobile, an open gas tank would make it impossible to continue driving.

There are some benefits of abstraction which is mention below:

  • Simple, high level user interfaces
  • Complex code is hidden
  • Security
  • Easier software maintenance
  • Code updates rarely change abstraction

Tagged : / / / / / / / / /

Complete guide of Scala with Spark Advance training

What is Scala and why it is used?

Scala could be a programing language used for useful programming and powerful static systems. It’s object-oriented and runs on JVM. It’s the potential to interoperate with existing Java code and libraries. It’s powerfully thought of to be a static kind of language and doesn’t have an idea of primitive information.

What is Apache Spark?

Apache Spark could be a powerful open-source process engine designed around speed, simple use, and complex analytics, with APIs in Java, Scala, Python, R, and SQL. Spark runs programs up to 100x quicker than Hadoop MapReduce in memory, or 10x quicker on disk.

Why do we need Scala?

  • Scala is capable to figure out the information that is kept in a Distributed fashion. It accesses all the accessible resources and supports parallel processing.
  • Scala supports changeless information and its support to the higher-order functions.
  • Scala is an associate degree upgraded version of Java that was designed to eliminate reserve code. It supports multiple Libraries and Apis which can permit the computer programmer to realize Less Down Time.
  • Scala supports multiple type Constructs which enables the programmer to work with wrappers/container types with ease.

Applications of Scala

Some of the important applications of Scala are as follows:

  • Designing Web Applications and Web Pages
  • Spark Framework uses Scala to perform real-time data streaming
  • Concurrency and Distributed data processing applications
  • Scala supports both Batch Data Processing and Parallel Data Processing
  • Spark Framework uses Scala in Data Analytics

Frameworks of Scala

Akka, Spark, Play, Neo4j, Scalding are some of the major frameworks that Scala can support.

  • Akka is a toolkit on runtime for building highly concurrent, distributed, and fault-tolerant applications on the JVM. Akka is written in Scala, with language bindings provided for both Scala and Java.
  • Spark Framework is designed to handle, and process big data and it solely supports Scala.
  • Play framework is designed to create web applications and it uses Scala in the process in order to obtain the best in class performance.
  • Scalding is a domain-specific language (DSL)in the Scala programming language, which integrates Cascading. It is a functional programming paradigm used in Scala which is much closer than Java to the original model for MapReduce functions.
  • Neo4j is a java spring framework supported by Scala with domain-specific functionality, analytical capabilities, graph algorithms, and many more.

Features of Scala

Type Inference

In Scala, you do not need to say information sort and performance come back sort expressly. Scala is enough sensible to deduce the kind of information. The come-back style of performance is set by the kind of last expression gift within the performance.

Singleton object

Scala uses a singleton object, which is actually a category with just one object within the supply file. Singleton object is said by using an object rather than the category keyword. In Scala, there aren’t any static variables or strategies.

Immutability

Scala uses the immutability conception. every declared variable is immutable by default. Immutable means that you cannot modify its price. you’ll be able to conjointly produce mutable variables which might be modified. Immutable knowledge helps to manage concurrency management which needs managing knowledge.

Lazy Computation

In Scala, computation is lazy by default. Scala evaluates expressions only they’re needed. You’ll declare a lazy variable by victimization the lazy keyword. It’s wont to increase performance.

Case categories and Pattern matching

Scala case categories are simply regular categories that are immutable by default and complex through pattern matching.

All the parameters listed within the case category are public and immutable by default.

Case categories support pattern matching. So, you’ll write a lot of logical code.

Concurrency control

Scala provides a standard library that includes the actor model. You can write concurrency code by using actors. Scala provides one more platform and tool to deal with concurrency known as Akka. Akka is a separate open-source framework that provides actor-based concurrency. Akka actors may be distributed or combined with software transactional memory.

String Interpolation

Since Scala 2.10.0, Scala offers a replacement mechanism to make strings from your information. It’s referred to as string interpolation. String interpolation permits users to enter variable references directly in processed string literals. Scala provides 3 string interpolation methods: s, f, and raw.

Higher-Order Functions

A higher-order operate may be an operation that either takes performance as an argument or returns an operation. In alternative words, we will say an operation that works with another performance is termed a higher-order operate. The higher-order operation permits you to form perform composition, lambda operates or anonymous perform, etc.

Traits

An attribute is like an interface with a partial implementation. In Scala, the attribute could be an assortment of abstract and non-abstract ways. you’ll be able to produce traits that will have all abstract ways or some abstract and a few non-abstract ways.

Traits area unit compiled into Java interfaces with corresponding implementation categories that hold anyways enforced within the traits.

Rich Set of Collection

Scala provides an expensive set of assortment libraries. It contains categories and traits to gather information. These collections may be changeable or immutable. You’ll be able to use it in step with your demand. Scala collection mutable package contains all the changeable collections. You’ll be able to add, take away and update information whereas mistreatment this package.

Scala and Other Languages

The Name Scala portraits the measurability the language is capable of providing, currently you would possibly raise a question. Aren’t the newest programming languages like Python, Ruby, Perl, and Legendary Java not scalable?

The answer is yes, they are scalable, however with some restrictions just like the boiler plated codes like system.print.ln in Java. Scala is fictional to beat these limitations and minimize the execution time and quality of the code.

In the year 2006 Twitter was introduced in America and the developers used ruby on rails as their weapon of choice to develop this application, which later proved out to be a wrong choice when they had to manage the gigantic amount Big-Data that was dropping into Twitter.

Then they switched their backend to Java and used Scala as their new programming language to handle the massive information mistreatment Hadoop and Spark frameworks that worked in an exceedingly spectacular method.

Scope for Scala

Scala is that the miracle of the 20th century in multiple streams. It’s seen astounding growth since day one and it’s as expected it is one of the programming languages that are in higher demand. The stats below make a case for additional regarding the scope of Scala within the close to future.

About Scala with Spark Advance Training:

Scala is one of the most popular languages and enterprises that run on a Java virtual machine. It’s been with success deployed to production at corporations like Samsung, Verizon, Walmart, Twitter, and plenty of a lot of. Learning new ideas and dealing with Scala, which is able to cause you to be a higher and a productive computer programmer. Learning Scala opens doors to programming methodologies like useful programming and doing concurrency the correct method. It also encourages you to put in writing clean and testable code whereas writing less code at constant time.

Agenda of the Scala

Agenda of the Spark:

Conclusion

This advanced coaching has been ready for beginners to assist them to perceive the fundamentals of Scala in straightforward and straightforward steps. Once finishing this course, you may find yourself at a moderate level of experience in victimization Scala with Spark from wherever you’ll be able to take yourself to successive levels.

If you wanna learn more related to this topic, then I will suggest go and check out DevOpsSchool it is the best platform for learning.

Thank you!

Tagged : / / /