Презентация 4. Java OOP. 5. Abstract Classes онлайн
На нашем сайте вы можете скачать и просмотреть онлайн доклад-презентацию на тему 4. Java OOP. 5. Abstract Classes абсолютно бесплатно. Урок-презентация на эту тему содержит всего 32 слайда. Все материалы созданы в программе PowerPoint и имеют формат ppt или же pptx. Материалы и темы для презентаций взяты из открытых источников и загружены их авторами, за качество и достоверность информации в них администрация сайта не отвечает, все права принадлежат их создателям. Если вы нашли то, что искали, отблагодарите авторов - поделитесь ссылкой в социальных сетях, а наш сайт добавьте в закладки.
Презентации » Устройства и комплектующие » 4. Java OOP. 5. Abstract Classes
Оцените!
Оцените презентацию от 1 до 5 баллов!
- Тип файла:ppt / pptx (powerpoint)
- Всего слайдов:32 слайда
- Для класса:1,2,3,4,5,6,7,8,9,10,11
- Размер файла:238.00 kB
- Просмотров:80
- Скачиваний:0
- Автор:неизвестен
Слайды и текст к этой презентации:
№4 слайд
![An Abstract Classes II A](/documents_6/c8c6fb6a004699717250a92572cadb1b/img3.jpg)
Содержание слайда: An Abstract Classes II
A subclass of an abstract class usually provides implementations for all of the abstract methods in its parent class
If it does not, the subclass must also be declared abstract
Abstract classes can contain fields and implemented methods (partial implementation)
An abstract class may have static fields and static methods. You can use these static members with a class reference as you would with any other class
№7 слайд
![How to Create and Use Library](/documents_6/c8c6fb6a004699717250a92572cadb1b/img6.jpg)
Содержание слайда: How to Create and Use Library
To create depo library:
Right click on the app package -> Export -> Java -> JAR file -> Next
JAR file = depo.jar
Finish
How you can use depo.jar library:
Create new project 451aAbstractDepo
Right click on the project name -> Build Path
-> Configure Build Path
Go to Library tab -> Add External JARs -> find and click on depo.jar -> Open -> Ok
№11 слайд
![The Interface Body The](/documents_6/c8c6fb6a004699717250a92572cadb1b/img10.jpg)
Содержание слайда: The Interface Body
The interface body contains method declarations for all the methods included in the interface
A method declaration within an interface is followed by a semicolon, but no braces
All methods declared in an interface are implicitly public
An interface can contain constant declarations in addition to method declarations
All constant values defined in an interface are implicitly public, static, and final
№12 слайд
![Use an Interface To use an](/documents_6/c8c6fb6a004699717250a92572cadb1b/img11.jpg)
Содержание слайда: Use an Interface
To use an interface, you write a class that implements the interface
When an instantiable class implements an interface, it provides a method body for each of the methods declared in the interface
public class OperateBMW760i implements GroupedInterface {
. . . .
}
№13 слайд
![Interfaces and Multiple](/documents_6/c8c6fb6a004699717250a92572cadb1b/img12.jpg)
Содержание слайда: Interfaces and Multiple Inheritance
In Java, a class can inherit from only one class but it can implement more than one interface
This means that if a variable is declared to be the type of an interface, its value can reference any object that is instantiated from any class that implements the interface
№17 слайд
![Cloning of Use clone method](/documents_6/c8c6fb6a004699717250a92572cadb1b/img16.jpg)
Содержание слайда: Cloning (1 of 2)
Use clone() method to get independent object instead of object’s assignment
clone() method can make only a field-by-
field copy
Cloning is correct if a class contains only primitive fields or references to immutable objects
“Deep” cloning is necessary otherwise
№21 слайд
![Interfaces in Java SE The](/documents_6/c8c6fb6a004699717250a92572cadb1b/img20.jpg)
Содержание слайда: Interfaces in Java SE 8
The interface body can contain:
abstract methods (followed by a semicolon, but no braces – it does not contain an implementation
default methods (are defined with the default modifier)
static methods (with the static keyword)
constant declarations
№22 слайд
![Interface Default Methods You](/documents_6/c8c6fb6a004699717250a92572cadb1b/img21.jpg)
Содержание слайда: Interface Default Methods
You specify that a method definition in an interface is a default method with the default keyword at the beginning of the method signature
Default method defines a default implementation
Default methods enable you to add new functionality to the interfaces of your libraries and ensure binary compatibility with code written for older versions of those interfaces
Any class that implements the interface with default method will have this method already defined
№25 слайд
![Functional Interfaces A](/documents_6/c8c6fb6a004699717250a92572cadb1b/img24.jpg)
Содержание слайда: Functional Interfaces
A functional interface is any interface that contains only one abstract method
A functional interface may contain one or more default methods or static methods
The abstract method of a functional interface can be implemented with help of lambda expression
№28 слайд
![Example of Lambda Expression](/documents_6/c8c6fb6a004699717250a92572cadb1b/img27.jpg)
Содержание слайда: Example of Lambda Expression II
public static void main(String... args) {
Calculator myApp = new Calculator();
IntegerMath addition = (a, b) -> a + b;
IntegerMath subtraction = (a, b) -> a - b;
System.out.println("40 + 2 = " +
myApp.operateBinary(40, 2, addition));
System.out.println("20 - 10 = " +
myApp.operateBinary(20, 10, subtraction));
}
}
№31 слайд
![Lambda Expression Syntax II](/documents_6/c8c6fb6a004699717250a92572cadb1b/img30.jpg)
Содержание слайда: Lambda Expression Syntax II
You can omit the data type of the parameters in a lambda expression
You can omit the parentheses if there is only one parameter
If you specify a single expression, then the Java runtime evaluates the expression and then returns its value
Alternatively, you must enclose statements in braces {}
Скачать все slide презентации 4. Java OOP. 5. Abstract Classes одним архивом:
Похожие презентации
-
4. Java OOP. 6. Inner Classes
-
Java 4 WEB. Lesson 3 - OOP
-
Prefer interfaces to abstract classes. (Item 18, 19)
-
Arrays Loops. Java Core
-
Introduction to JavaScript. OOP in JavaScript
-
3. Essential Java Classes 5. Some Useful Classes
-
3. Essential Java Classes 3. Date and Time Home Tasks
-
4. Java OOP. 4. Inheritance and Polymorphism
-
3. Essential Java Classes. 3a. Date and Time in Java SE8
-
3. Essential Java Classes 3. Date and Time