Introduction to Object-Oriented Programming

Object-Oriented Programming (OOP)  is a type of programming in which programmers define not only the data type of a data structure, but also the types of operations (functions) that can be applied to the data structure.

In this way, the data structure becomes an object that includes both data and functions. In addition, programmers can create relationships between one object and another. For example, objects can inherit characteristics from other objects.

The following topics will explain more details about the concepts used in OOP.

Classes and Objects

A class is simply a representation of a type of object, is the template from which individual objects are created. It is composed of three things: a name, attributes, and operations.

The abstract classes provide a common definition of a base class that can be shared by multiple derived classes. The sealed classes, on the other hand, provide complete functionality but cannot be used as base classes.

An object can be considered a "thing" that can perform a set of related activities. The set of activities that the object performs defines the object's behavior. Objects are self-contained data structures that consist of properties, methods, and events.

The following images explain the object-class relation. The Car class contains attributes and methods. You can create unlimited objects from the Car class.

Click to enlarge.

Encapsulation

The encapsulation is mainly achieved by creating classes, the classes expose public methods and properties. The class is kind of a container or capsule or a cell, which encapsulate the set of methods, attribute and properties to provide its indented functionalities to other classes. In that sense, encapsulation also allows a class to change its internal implementation without hurting the overall functioning of the system.

The idea of encapsulation is to hide how a class does it but to allow requesting what to do.

The following picture explain the concept of Encapsulation.



Inheritance

Inheritance is a feature of object-oriented programming that allows you to develop a class once, and then reuse that code over and over as the basis of new classes. Inheritance enables you to create new classes that reuse, extend, and modify the functionality defined in existing classes. 

The class that inherits the functionality is called a derived class, and the class whose functionality is inherited is called a base class. A derived class inherits all the functionality of the base class and can also define additional features that make it different from the base class.

Inheritance aids in the reuse of code. 

The following picture shows an example of inherance.

Click to enlarge.

Polymorphism

The word "polymorphism" means "many forms".

Polymorphism refers to a programming language's ability to process objects differently depending on their data type or class. More specifically, it is the ability to redefine methods for derived classes.

For example, given a base class shape, polymorphism enables the programmer to define different area methods for any number of derived classes, such as circles, rectangles and triangles. No matter what shape an object is, applying the area method to it will return the correct results.

The following picture shows an example of polymorphism.


Interfaces

An interface is a programming structure/syntax that allows the computer to enforce certain properties on an object (class).

For example, say we have a car class and a scooter class and a truck class. Each of these three classes should have a start_engine() action. How the "engine is started" for each vehicle is left to each particular class, but the fact that they must have a start_engine action is the domain of the interface.

An interface definition consists of a set of signatures for methods, properties, delegates, events, or indexers. An interface definition cannot consist of any data fields or any implementation details such as method bodies.

Conclusion 3

Object-oriented programming, or OOP, is a programming paradigm that represents concepts as "objects" that have data fields (the attributes that describe the object) and associated procedures known as methods.

Objects, which are usually instances of classes, are used to interact with one another to design applications and computer programs.

Some examples of object-oriented programming languages are C++ and Java.

The investigation of these concepts allow me to have a better understanding of the object-oriented programming, in order to prepare myself for the Software Development Fundamentals exam.

HP Omni 120-1102es


The HP Omni 120-1102es it's an "all-in-one" desktop PC that integrates a 20 inches screen and Wi-Fi connection more organized desktop. It counts with a double core processor Intel® Core™ i3-2120 and it offers a wide 1 TB capacity hard disk.
The configuration it's simple and easy to love; the minimalist design and the one-cable only configuration reduce the disorder, for a fancy workplace. The elegant and improved support design holds the high definition screen in vertical position, with a curve surface and a metal finishing that gives a different creative touch and style to the computer.

Some of the features of this computer are:
  • Operative System: Windows® 7 Home Premium 64 bits.
  • Processor: Intel® Core™ i3-2120.
  • Number of cores: 2.
  • Speed: 3,3 Ghz.
  • RAM: 4 GB DDR3 (1x4 GB).
  • RAM Slots: 2 (1 free).
  • Hard Disk: 1 TB SATA 3G 7200 rpm.
  • Graphic Card: Intel HD.
  • Graphic Memory: Up to 1,7 GB.
  • Lector: Lector / Recorder CD + DVD.
  • Dimensions: 50,6 x 10,02 x 39,77 Cms.
  • Weight: 6,08 Kgs.
  • Connections: RJ45, audio, microphone.
  • Screen: WLED.
  • Screen size: 20" (50,8 Cms.).
  • Screen Resolution: 1600 x 900.
  • Webcam: Integrated, with microphone.
  • USB ports: 6 x USB 2.0.
Note: The information was gathered to make a presentation of this computer.

Tablets

The following information was gathered and prepared to make a presentation about the tablet qualities before the debate.

The tablets are touchscreen-operated computers that can be used anywhere at anytime. It has a special operating system that allow users to interact and control the tablet easily. You can find a tablet in many brands, models and sizes. There are also very lightweight, most of them weight less than a kilo.

The first tablet prototypes were created in the late 70's and they were based on science fiction ideas. In 1994 the European Union initiated the NewsPad project, which lead to the development of the Intel Web Tablet, in 1999.
In 2002 Microsoft released the Tablet PC, but it didn't get enough popularity. However, in 2009 Linux released their Android Tablet and one year later, Apple presented the Ipad, creating a new and strong computing market.

Some of the feature of Tablets are integrated WIFI, touch technology and GPS. Most tablets have bluetooth technology, that means you can easily transfer files to other devices such as cellphones, smartphones and other tablets. Most of them also include 3G or 4G technology, and HTML 5 support. The most common operating systems are Android, Windows and iOS.

Tablets have a lot of applications installed such as the calculator, calendar, clock, organizer and games. You can install others applications aswell, gadgets and games. You can create and display all your personal documents and presentations, watch high quality images and videos, use the integrated camera and connect peripherals such as headphones and a keyboard.

Tablets are cheaper and smaller than a desktop pc or a laptop. There are portable, which means you can use them anywhere at anytime. You can add a keyboard or a docking station to turn the tablet into a full-featured netbook. You can surf the internet, create and share files, download applications, play games, watch videos, manage your documents, check your emails and much more.

Debate: Tablet vs. Laptop


A debate its a formal contest of argumentation between two groups or teams. In this case, one group have to defend the use of the tablet, while the other one defend the use of the laptop. In the middle, there is always a neutral character, in this case, the teacher.

To prepare for the debate, we have to analize our strengths and weaknesses. We also study their weaknesses in order to make strong questions.

Some of the tablet features are:
  • Lightweight.
  • Portable.
  • Integrated Wifi.
  • 3G or 4G technology.
  • Touch technology.
  • GPS.
  • Bluetooth technology.
  • Variety of brands models and sizes.
  • Integrated camera.
  • Applications (clock, calculator, organizer, calendar).
Tablet weaknesses:
  • Fragile.
  • Less RAM and disk space capacity.
  • Repairs are expensive.
Laptop weaknesses:
  • It's heavier.
  • It's more expensive.
  • It's bigger and less confortable.
  • It's slower in many ways (turning on and off, surfing the internet).
  • Most of the laptops doesn't have touch or bluetooth technology.
Arguments they can use against us:
  • The tablet is fragile. - Answer: It depends of the person who use it. You can also use a tablet protector.
  • The tablet has low storage capacity. - Answer: The files on the tablet are lightweight, and you can store up to 32 gigabites.
  • Tablets have low memory capacity. - Answer: Tablets programs work with less resourses, so the system doesn't freeze like on a laptop.
  • Tablet maintenance is expensive. - Answer: It is because tablets include modern technologies, and replace the pieces its complicated. There are several Technical Support centers to repair tablets.
Questions we can ask them (accourding to their weaknesses):
  • What can you do if you forget the notebook battery pack? it won't be portable anymore.
  • How can you protect a notebook against damages?
  • How do you send files when you don't have internet connection?
  • What can you do if you close the screen with an object inside and the screen breaks?
  • Why is the battery pack life only last for a few hours while the tablet battery last over 10 hours?
  • Why are notebooks more expensive than tablets, if they are bigger, heavier and do the same things?
  • What can you do if dirt or a small object fall under the keyboard?
  • Why does the notebook take so much time turning on and off?
  • Why does the notebook take so much time on connecting to the internet?
  • Why do you think carring a notebook its more confortable than carring a tablet?
  • How can you send files to other electronic devices (like a smartphone), without a pendrive?
  • Can you explain how can a notebook be more confortable than a tablet while traveling?
  • What can you do if the notebook doesn't recognize a peripheral?
  • How do you use the notebook if the mouse pad doesn't work?

Additional argument: One of the contenders ask me if there exist any program on a tablet that allow me to create applications. Here is my answer, used on the second presentation:

There are several programs that allow you to create applications. App Cloud Core is a free licence platform that can be used to create applications for tablets and smartphones, App Cloud Core works on the cloud, that means that it works completely on the internet. You can create applications for Android and iOS. 
App Cloud Core use a SDK, an application development platform that allows you to create, manage, and upload applications without been an expert programmer. You can also use App Cloud Workshop to test those applications before upload them in the App Store.
IOS also offers WebWorks SDK for the development of different applications and games.



    Conclusion 2

    At first, we had to investigate and make a presentation about a computer model. It was very interesting to know a fancy and modern type of desktop computer.
    I realize debating to defend the tablet is very difficult when you have never used one.
    When you debate, you have to understand what you're defending, gather a lot of information in order to have strong arguments and solid answers. You have to analize what are your strong points and which ones are your weaknesses. You can also use their group weaknesses at your advantage, by detecting which contender is the weakest.
    It's important that you study the strategy of the contender group. They will attack your weak points, so you have to predict their questions and prepare good answers to defend your posture.
    In the case of the Tablet/Laptop debate, they could say that the tablet is fragile. If you know the tablet weaknesses you can predict that argument and respond, saying that you can use a tablet protector.
    We could attack their weaknesses too, saying (for example), that the laptop it's less confortable, heavier and more expensive.
    I think a debate can be very hard depending of the idea you're defending. The fact that we have to improvise and use arguments in english makes it harder.