Selenium WebDriver Web Test Tool Training Portnov Computer School Selenium WebDriver Web Test Tool Training Test Automation For Web-Based Applications Presenter: Ellie Skobel
Day 1 Java Concepts
What Is an Object? Software objects are used to model real-world objects that you find in everyday life Objects have state and behavior Object stores its state in fields (a.k.a variables) Object exposes its behavior through methods Methods operate on an object's internal state Methods serve as the primary mechanism for object-to- object communication. Hiding internal state and requiring all interaction to be performed through an object's methods is known as data encapsulation
Object Behaviors = Methods State= Variable Bark 50 lb Chase_Cat Hungry Wag_Tail Fluffy
What Is a Class? A class is a blueprint or prototype from which objects are created
What Is Inheritance? Objects often have a certain amount in common with each other Object-oriented programming allows classes to inherit commonly used state and behavior from other classes. The class from which common state and behavior are inherited becomes the superclass Each class is allowed to have one direct superclass, and each superclass has the potential for an unlimited number of subclasses:
Inheritance 4 Paws Bark Tail
What Is Interface? An interface is a contract between a class and the outside world. When a class implements an interface, it promises to provide the behavior published by that interface. An interface is a group of related methods with empty bodies Implementing an interface allows a class to become more formal about the behavior it promises to provide If a class implements an interface, all methods defined by that interface must appear in its source code before the class will successfully compile.
Interface Chase Bark Roll-over Tail Wet Nose
What Is a Package? A package is a namespace for organizing classes and interfaces in a logical manner Conceptually packages are similar to different folders on a computer Java platform provides an enormous class library (a set of packages) suitable for use in your own applications known as the Java Application Programming Interface (API) The Java Platform API Specification contains the complete listing for all packages, interfaces, classes, fields, and methods supplied by the Java Platform