Content deleted Content added
added section on polymorphism |
m added little more description to polymorphism and header |
||
Line 34:
| accessdate = 2012-08-28
| url = http://shop.oreilly.com/product/9780596007126.do
}}</ref>
A '''class skeleton''' is an outline of a [[class (computer science)|class]] that is used in [[software engineering]]. It contains a description of the class's roles, and describes the purposes of the [[Variable (programming)|variables]] and [[method (computer science)|method]]s, but does not implement them. The class is later [[implementation|implemented]] from the skeleton. The skeleton can also be known as either an [[Interface (computing)|interface]] or an [[abstract class]], with languages that follow a polymorphic paradigm.
== Background ==
Line 46:
== Relation to Pseudocode ==
[[Pseudocode]] is most commonly found when [[Plan|developing]] the structure of a new piece of [[software]]. It is a plain English portrayal of a particular function within a larger system, or can even be a representation of a whole program. Pseudocode is similar to skeleton programming, however deviates in the fact that pseudocode is primarily an informal method of programming.<ref name=":0">{{Cite journal|last=Bellamy|first=Rachel K. E.|date=1994-06-01|title=What Does Pseudo-Code Do? A Psychological Analysis of the use of Pseudo-Code by Experienced Programmers|url=https://www.tandfonline.com/doi/abs/10.1207/s15327051hci0902_3|journal=Human–Computer Interaction|volume=9|issue=2|pages=225–246|doi=10.1207/s15327051hci0902_3|issn=0737-0024}}</ref> Dummy code is also very similar to this, where code is used simply as a placeholder, or to signify the intended existence of a method in a class or interface.
[[Programmer|Computer programmers]] are extremely dependent on pseudocode, so much so that it has a measurable impact on their [[Psyche (psychology)|psyche]].<ref name=":0" /> A typical programmer is so conditioned with the idea of writing simplified code in some manner, be it by writing pseudocode or skeleton code, or even just by drawing a diagram, that this has a measurable impact on how well they can write their final implementation. This has been found over a number of applications, with different programmers working in different languages and varied [[Programming paradigm|programming paradigms]].
Line 60:
[[Java (programming language)|Java]], an [[Object-oriented programming|object oriented language]], focuses heavily on a structured documentation page with completely separated methods for each object part of Java’s packages<ref>{{Cite web|last=|first=|date=|title=Object (Java Platform SE 8 )|url=https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html|url-status=live|archive-url=|archive-date=|access-date=2020-10-02|website=docs.oracle.com}}</ref>. Object oriented languages focus on a hierarchy based structure to their implementations, rather than a simple top-down approach found in other languages. ‘Objects’ store data and variables in them, allowing for a typically more efficient program to be written. These objects have individual functions that can access internal variables, known as methods.
Each method is defined in the same format, with the name of the method as well as the syntax to be used in
[[Python (programming language)|Python]] has a similar approach to document it’s in-built methods, however mimics the language’s lack of fixation on scope and data types <ref>{{Cite web|last=|first=|date=2009-02-14|title=Built-in Functions — Python v3.0.1 documentation|url=https://docs.python.org/3.0/library/functions.html|url-status=live|archive-url=|archive-date=|access-date=2020-10-03|website=docs.python.org}}</ref>. This documentation has the syntax of each method, along with a short description and an example of the typical use of the method or function. The skeleton code provided in the example gives programmers a good understanding of the function at a quick glance.
Line 71:
Other forms of NLIs use different forms of input, ranging from other users speaking different languages, to gesture based input to produce a very similar result. With programming languages being developed and written primarily in english, people speaking other languages find it hard to develop new software. NLIs have been used in some studies <ref>{{Cite journal|last=Özcan|first=E.|date=2004|title=GENERATING JAVA CLASS SKELETON USING A NATURAL LANGUAGE INTERFACE|url=http://dx.doi.org/10.5220/0002683301260134|journal=Proceedings of the 1st International Workshop on Natural Language Understanding and Cognitive Science|publisher=SciTePress - Science and Technology Publications|volume=1|pages=126 - 134|doi=10.5220/0002683301260134|isbn=972-8865-05-8|via=}}</ref> to assist people in these situations. The study showed classes written in Java through the use of NLIs. This removed the need for learning syntactical rules, however meant that the class was written using a basic set of skeleton code.
===
[[Polymorphism (computer science)|Polymorphism]] is an ideology that follows with the [[Object-oriented programming|object oriented programming]] [[paradigm]], where methods can be overridden or [[Overloaded method|overloaded]] (methods with the same name in a child class which will take priority over a method written in a parent class). The definition of methods is based on a skeleton framework defined by the [[syntax]] of the language.<ref>{{Citation|last=Benaya|first=Tamar|title=Understanding Object Oriented Programming Concepts in an Advanced Programming Course|url=http://dx.doi.org/10.1007/978-3-540-69924-8_15|work=Lecture Notes in Computer Science|volume=|pages=161–170|place=Berlin, Heidelberg|publisher=Springer Berlin Heidelberg|isbn=978-3-540-69923-1|access-date=2020-11-18|last2=Zur|first2=Ela}}</ref>
Line 91:
* ‘Reduces’ or ‘scans’ are used to apply prefixes to a set of data, before then applying an operation upon the data. These are different to ‘maps’ as they have a set of partial results during the runtime of the method itself.
===
These operations, as their name suggests, work on tasks. Each type of algorithm under this is different due to a change in the behaviour between tasks. Task parallel algorithms include ‘sequentials’, ‘farms’, ‘pipes’, ‘if’, ‘for’ and ‘while’.
Line 101:
* ‘While’ is an algorithm very similar to the operation of a ‘for’ algorithm, where a task is completed a number of times. However in ‘while’ algorithms, the program computes the task a number of times before a conditional statement is met. This means that the ‘while’ algorithm can perform its task a different number of times for each time it is run.
===
These skeletons are very different to the typical skeletons found above. ‘Resolution’ algorithms use a combination of methods to solve a specified problem. The algorithm’s given problem can be a “family of problems” <ref name=":1" />. There are two main types of these skeletons, ‘divide and conquer’ or ‘brand and bound’.
|