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.

    The Digital Age

    We are now living in the digital ages, meaning that computers have become an essencial part of out lives. We are sorrounded by technology.


    How are computers used?

    • Cashpoints or ATM, are used to take out cash, check your balance and print receipts.
    • Computers allow students to search information, create documents, send and recieve files.
    • Air traffic can use the computer to find the exact location of each plane, recieve information about the weather and comunicate with all the planes.
    • Modern cellphones are used to make calls, send and recieve messages, organize the schedules for hormeworks and exams.
    There are different types of words in a text, reading the text allow us to recognize the what type of word is.
    1. Perform: Verb.
    2. Word processor: Noun.
    3. Online: Adverb.
    4. Download: Verb.
    5. Build-in: Adjetive.
    6. Digital: Adjetive.
    7. Store: Verb.
    8. Financial: Adjetive.
    9. Monitor: Noun.
    10. Data: Noun.
    Match the previous words with the correct meanings.
    1. Keep, save: Store.
    2. Execute, do: Perform.
    3. Monetary: Financial.
    4. Screen: Monitor.
    5. Integrated: Built-in.
    6. Connected to the internet: Online.
    7. Collection of facts and figures: Data.
    8. Describes information that is recorded or broadcast using computers: Digital.
    9. Program used for text manipulation: Word processor.
    10. Copy files from a server to your PC or mobile: Download.

    Collocations

    Collocations are a combination of words between verbs and nouns.


    Look at the Help Box and match the verbs with the nouns to make collocations.

    1. Give presentations.
    2. Keep records.
    3. Access databases.
    4. Enter a PIN.
    5. Transfer money.
    Use the previous collocations and the help box to complete the sentences.
    1. Thank's to Wi-fi, it's now easy to access the internet from cafes, hotels, parks and many other public places.
    2. Online banking lets you carry out transactions between your accounts easily and securely.
    3. Skype is a technology that enables users to make calls over the internet for free.
    4. In many universities, students are encouraged to give presentations using Powerpoint in order to make their talks more visually attactive.
    5. The web has revolutionized the way people do research with sites such as Google and Wikipedia, you can find the information you need in seconds.
    6. Cookies allow a website to store information on a user's machine and later retrieve it, when you visit the website again, it remembers your preferences.
    7. With the latest mobile phones, you can send texts with multimedia attachments - pictures, audio, even video.

    How do I use my Computer

    The next image it's a scan from my notebook. I had to describe how do I normally use my laptop.

    Computer Essentials

    Label the elements of the computer system.
    Click to enlarge.


    Read these advertising slogans and say witch computer element each pair refers to.
    Click to enlarge.
    1. Mouse.
    2. Screen/Monitor.
    3. DVD.
    4. CPU.
    5. Printer.
    Find words in the slogans with the following meanings.
    1. To press the mouse button: click.
    2. Clear; easy to see: sharp.
    3. To make an extra copy of something: back up.
    4. Selection: point.
    5. Shows: display.

    Whats a Computer?

    Click to enlarge.
    Match these words from the previous text with the correct meanings.
    Click to enlarge.

    1. Software: c.
    2. Peripherals: f.
    3. Main Memory: g.
    4. Hard Disk: h.
    5. Hardware: b.
    6. Input: d.
    7. Ports: i.
    8. Output: e.
    9. CPU: a.

    Computer: Concept Map

    Using the text from the book Infotech English for Computer Users (http://thebookisonthetable1.blogspot.com/2013/04/whats-computer.html)
    I created a Conceptual Map that includes all the parts of a computer.
    Click to enlarge.

    Classifying

    Click to enlarge.
    Look at the Help Box and then use suitable classifying expressions to complete there sentences.
    1. A computer can be divided in hardware and software.
    2. Peripherals are classified into three types; input, output and storage devices.
    3. A word processing program consist of a software witch lets the user create and edit text.
    4. There are two classes of network architecture; peer-to-peer, where all computers have the same capabilities, and client-server (e.g. the internet), where servers store and distribute data, and clients access this data.

    Inside a PC System: Concept Map


    Using the following text from the book Infotech English for Computer Users, I created a Conceptual Map that includes all the parts of a PC System.
    Click to enlarge.
    Click to enlarge.

    Relative Clauses

    Look at the Help Box and then complete the sentences with suitable relative clauses. Put brackets round the relative pronouns you can leave out.

    1. That's the computer [which] I'd like to buy.
    2. Core 3 Duo is a new intel processor that contains about 291 million transistors.
    3. A webmaster is a person who designs, develops and mantains a website.
    4. A bus is an electronic pathway which carries signals between computer devices.
    5. Here's the DVD [that] you lent me!.
    6. Last night I met someone who works for GA as a software engineer.

    Conclusion 1

    In the first unit I learned about the huge influence of the computers and the technology in our lives. 

    It's very important to read the texts carefully, because many types of word can be used in different ways. For example, "store" it can be used as a verb or a noun, depending of the context.

    I also learned to recognize adverbs on a sentence. Adverbs complements the verb, in the same way the nouns are complemented by the adjetives.

    Something I didn't know were the collocations, phrases conformed by a noun and a verb. For example "surf the web" and "make calls".

    Classifying is used to put things on groups, and it's very useful when we are designing a concept map, there are many expressions we can use such as "includes", "consists of" and "there are X types of Y".

    Finally, we discovered more details about the PC system's components and I learned how to define things or people using the relative clauses, that can be left out in some cases.