0% found this document useful (0 votes)
12 views2 pages

Ilt MD 02 H

pertemuan 2

Uploaded by

hoax magazine
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views2 pages

Ilt MD 02 H

pertemuan 2

Uploaded by

hoax magazine
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Abstract

ILT-MD-02-H

On this day, the learning raised is about functional programming and OOP (Object Oriented
Programming), where we will discuss what is called functional programming and OOP (Object
Oriented Programming). consists of various functions including lambda, higher-order function
etc, this is because Kotlin is included in functional programming. First we learn about the
functional programming style, where the function in the Kotlin consists of a header function
and a body function. functional programming has several advantages, namely immutable state,
first class citizen and declarative rather than imperative, the kinds of functional programming
in Kotlin are Extension, function type, lamda, High-Order and scope-function, Anatomy of
functions consisting of visibility modifiers, functions name, parameters, return types are
located in the function header and function body. In functions there are named arguments to
overcome the many arguments so they are not confused during input. There is also a function
extension where we can add new functions without inheriting the class, there is a nullable
receiver used to overcome nullable exceptions. There is a lambda which is also called
anonymous which does not require a function name, a high order function which can use other
functions as parameters. The second lesson is OOP (Object Oriented Programming), OOP
(Object Oriented Programming) itself is like a mold in programming where in Kotlin there are
several OOP (Object Oriented Programming), namely inheritance, abstract, interface,
overloading etc, in OOP (Object Oriented Programming) ) there are setters and getters, setters
are used for data sets so we can use setters to input data and set data into functions or classes
and getters to retrieve data that has been inputted by the setter that can be used properly, the
constructor is also a function which is used to initialize the properties used to make it easier to
enter data to be inputted where the constructor has a primary constructor, such as property
function parameters, just write it in the class header starting with var and val, there is also an
init block that can allow us to write properties in the body class. we use primary construct or,
in addition to its function to initialize class properties and to assist in validating a property
value before it is initialized. Inheritance is also the inheritance of classes to other classes so
that the functions in the interface can be used in other classes, this can be used properly to
summarize the script to be created, abstracts are usually used as the main framework of the
class and are a general description of a class it also cannot realized in an object, while interfaces
are used to inherit from other classes and can be used by classes, classes that inherit the
interface must override all properties and functions contained in the interface in the
implementation of the interface class the same as the class extends on the super and parent
class. There are also visibility modifiers where this is used to determine whether this class can
be accessed by outside the class or not, there are several modifiers, including public, which can
be accessed from anywhere, private can be accessed in the same scope, protected can be
accessed by its derived classes, while internal cannot be accessed from outside the classroom
.. From today's material learn and explore about OOP (Object Oriented Programming) and
functions in Kotlin.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy